diff --git a/modules/processing.py b/modules/processing.py index 2f8c0c7aa..22b852fd0 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -307,16 +307,15 @@ def process_samples(p: StableDiffusionProcessing, samples): info = create_infotext(p, p.prompts, p.seeds, p.subseeds, index=i) images.save_image(Image.fromarray(sample), path=p.outpath_samples, basename="", seed=p.seeds[i], prompt=p.prompts[i], extension=shared.opts.samples_format, info=info, p=p, suffix="-before-detailer") sample = detailer.detail(sample, p) - if sample is not None: - if isinstance(sample, list) and len(sample) > 1: + if isinstance(sample, list): + if len(sample) > 0: image = Image.fromarray(sample[0]) + if len(sample) > 1: annotated = Image.fromarray(sample[1]) out_images.append(annotated) out_infotexts.append("Detailer annotations") - elif isinstance(sample, list): - image = Image.fromarray(sample[0]) - else: - image = Image.fromarray(sample) + elif sample is not None: + image = Image.fromarray(sample) if p.color_corrections is not None and i < len(p.color_corrections): p.ops.append('color') diff --git a/wiki b/wiki index 213bdc836..6fc069677 160000 --- a/wiki +++ b/wiki @@ -1 +1 @@ -Subproject commit 213bdc836534bc29ed353dc89b5b582e455a9bf5 +Subproject commit 6fc0696770923e78e1ae07cb849942568ec11dde