mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
fix progress api
This commit is contained in:
+1
-1
@@ -428,7 +428,7 @@ class Api:
|
||||
if shared.state.job_count == 0:
|
||||
return models.ProgressResponse(progress=0, eta_relative=0, state=shared.state.dict(), textinfo=shared.state.textinfo)
|
||||
|
||||
shared.state.set_current_image()
|
||||
shared.state.do_set_current_image()
|
||||
current_image = None
|
||||
if shared.state.current_image and not req.skip_current_image:
|
||||
current_image = encode_pil_to_base64(shared.state.current_image)
|
||||
|
||||
@@ -12,6 +12,7 @@ from modules.paths import script_path, models_path
|
||||
|
||||
diffuser_repos = []
|
||||
|
||||
|
||||
def walk(top, onerror:callable=None):
|
||||
# A near-exact copy of `os.path.walk()`, trimmed slightly. Probably not nessesary for most people's collections, but makes a difference on really large datasets.
|
||||
nondirs = []
|
||||
|
||||
@@ -106,7 +106,7 @@ class State:
|
||||
self.do_set_current_image()
|
||||
|
||||
def do_set_current_image(self):
|
||||
if self.current_latent is None or self.api:
|
||||
if self.current_latent is None:
|
||||
return
|
||||
from modules.shared import opts
|
||||
import modules.sd_samplers # pylint: disable=W0621
|
||||
|
||||
Reference in New Issue
Block a user