From 52046ca276e0d4b8ef85ff66aa330a87227c32f7 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Fri, 18 Oct 2024 20:40:54 -0400 Subject: [PATCH] update Signed-off-by: Vladimir Mandic --- modules/processing_diffusers.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/processing_diffusers.py b/modules/processing_diffusers.py index cd0763eb9..9b485d361 100644 --- a/modules/processing_diffusers.py +++ b/modules/processing_diffusers.py @@ -404,8 +404,10 @@ def process_diffusers(p: processing.StableDiffusionProcessing): shared.sd_model = sd_models.set_diffuser_pipe(shared.sd_model, sd_models.DiffusersTaskType.INPAINTING) # force pipeline if len(getattr(p, 'init_images', [])) == 0: p.init_images = [TF.to_pil_image(torch.rand((3, getattr(p, 'height', 512), getattr(p, 'width', 512))))] - p.prompts = p.all_prompts[p.iteration * p.batch_size:(p.iteration+1) * p.batch_size] - p.negative_prompts = p.all_negative_prompts[p.iteration * p.batch_size:(p.iteration+1) * p.batch_size] + if p.prompts is None or len(p.prompts) == 0: + p.prompts = p.all_prompts[p.iteration * p.batch_size:(p.iteration+1) * p.batch_size] + if p.negative_prompts is None or len(p.negative_prompts) == 0: + p.negative_prompts = p.all_negative_prompts[p.iteration * p.batch_size:(p.iteration+1) * p.batch_size] sd_models.move_model(shared.sd_model, devices.device) sd_models_compile.openvino_recompile_model(p, hires=False, refiner=False) # recompile if a parameter changes