From b049bbc64e3a6a367c55c3d1c2a627938d78a88b Mon Sep 17 00:00:00 2001 From: Kyle Schouviller Date: Sun, 13 Nov 2022 21:56:43 -0800 Subject: [PATCH] Fix iterative outpainting by restoring original images --- ldm/invoke/generator/inpaint.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/ldm/invoke/generator/inpaint.py b/ldm/invoke/generator/inpaint.py index 7c0c6d2574..e6c8dc6517 100644 --- a/ldm/invoke/generator/inpaint.py +++ b/ldm/invoke/generator/inpaint.py @@ -262,6 +262,8 @@ class Inpaint(Img2Img): # Seam paint if this is our first pass (seam_size set to 0 during seam painting) if seam_size > 0: + old_image = self.pil_image or init_image + old_mask = self.pil_mask or mask_image result = self.seam_paint( result, @@ -279,7 +281,10 @@ class Inpaint(Img2Img): # Restore original settings self.get_make_image(prompt,sampler,steps,cfg_scale,ddim_eta, - conditioning,init_image,mask_image,strength, + conditioning, + old_image, + old_mask, + strength, mask_blur_radius, seam_size, seam_blur, seam_strength, seam_steps, tile_size, step_callback, inpaint_replace, enable_image_debugging,