fix progress api

This commit is contained in:
Vladimir Mandic
2024-01-07 08:57:50 -05:00
parent 13b295f525
commit 52d19637d8
4 changed files with 4 additions and 2 deletions
+1
View File
@@ -110,6 +110,7 @@ And it also includes fixes for all reported issues so far
- sdxl: fix positive prompt embeds
- img2img: clip and blip interrogate
- img2img: sampler selection offset
- api: return current image in progress api if requested
- sampler: guard against invalid sampler index
- config: reset default cfg scale to 6.0
- processing: correct display metadata
+1 -1
View File
@@ -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)
+1
View File
@@ -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 = []
+1 -1
View File
@@ -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