interrrupt will now show last known preview image

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2025-09-29 19:25:47 -04:00
parent 6b67a9d0c4
commit 2621aecacc
3 changed files with 12 additions and 3 deletions
+2
View File
@@ -53,6 +53,8 @@
- networks ability to filter lora by base model version
- **Other**
- server will note when restart is recommended due to package updates
- **interrrupt** will now show last known preview image
*keep incomplete* setting is now *save interrupted*
- **logging** enable `debug`, `docs` and `api-docs` by default
- **ipex** simplify internal implementation
- refactor to use new libraries
+9 -2
View File
@@ -427,13 +427,20 @@ def process_images_inner(p: StableDiffusionProcessing) -> Processed:
for script_image, script_infotext in zip(results.images, results.infotexts):
output_images.append(script_image)
infotexts.append(script_infotext)
if samples is None:
from modules.processing_diffusers import process_diffusers
samples = process_diffusers(p)
timer.process.record('process')
if not shared.opts.keep_incomplete and shared.state.interrupted:
samples = []
if shared.state.interrupted:
shared.log.debug(f'Process: batch={n+1}/{p.n_iter} interrupted')
p.do_not_save_samples = not shared.opts.keep_incomplete
if shared.state.current_image is not None and isinstance(shared.state.current_image, Image.Image):
samples = [shared.state.current_image]
infotexts = [create_infotext(p, p.all_prompts, p.all_seeds, p.all_subseeds, index=0)]
else:
samples = []
if p.scripts is not None and isinstance(p.scripts, scripts_manager.ScriptRunner):
p.scripts.postprocess_batch(p, samples, batch_number=n)
+1 -1
View File
@@ -471,7 +471,7 @@ options_templates.update(options_section(('system-paths', "System Paths"), {
options_templates.update(options_section(('saving-images', "Image Options"), {
"samples_save": OptionInfo(True, "Save all generated images"),
"keep_incomplete": OptionInfo(True, "Keep incomplete images"),
"keep_incomplete": OptionInfo(True, "Save interrupted images"),
"samples_format": OptionInfo('jpg', 'File format', gr.Dropdown, {"choices": ["jpg", "png", "webp", "tiff", "jp2", "jxl"]}),
"jpeg_quality": OptionInfo(90, "Image quality", gr.Slider, {"minimum": 1, "maximum": 100, "step": 1}),
"img_max_size_mp": OptionInfo(1000, "Maximum image size (MP)", gr.Slider, {"minimum": 100, "maximum": 2000, "step": 1}),