mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 17:24:32 +02:00
interrrupt will now show last known preview image
Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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
@@ -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}),
|
||||
|
||||
Reference in New Issue
Block a user