diff --git a/modules/processing.py b/modules/processing.py index 6a99d383..a60dec24 100644 --- a/modules/processing.py +++ b/modules/processing.py @@ -339,6 +339,8 @@ def process_images(p: StableDiffusionProcessing) -> Processed: state.nextjob() + p.color_corrections = None + unwanted_grid_because_of_img_count = len(output_images) < 2 and opts.grid_only_if_multiple if (opts.return_grid or opts.grid_save) and not p.do_not_save_grid and not unwanted_grid_because_of_img_count: grid = images.image_grid(output_images, p.batch_size) diff --git a/scripts/loopback.py b/scripts/loopback.py index 8aca61f3..e90b58d4 100644 --- a/scripts/loopback.py +++ b/scripts/loopback.py @@ -40,8 +40,7 @@ class Script(scripts.Script): all_images = [] state.job_count = loops * batch_count - if opts.img2img_color_correction: - p.color_corrections = [processing.setup_color_correction(p.init_images[0])] + initial_color_corrections = [processing.setup_color_correction(p.init_images[0])] for n in range(batch_count): history = [] @@ -51,6 +50,9 @@ class Script(scripts.Script): p.batch_size = 1 p.do_not_save_grid = True + if opts.img2img_color_correction: + p.color_corrections = initial_color_corrections + state.job = f"Iteration {i + 1}/{loops}, batch {n + 1}/{batch_count}" processed = processing.process_images(p)