mirror of
https://github.com/vladmandic/automatic
synced 2026-09-19 09:14:35 +02:00
fix img2img resize
This commit is contained in:
@@ -1089,8 +1089,7 @@ class StableDiffusionProcessingImg2Img(StableDiffusionProcessing):
|
||||
image = np.array(image).astype(np.float32) / 255.0
|
||||
image = np.moveaxis(image, 2, 0)
|
||||
imgs.append(image)
|
||||
if shared.backend == shared.Backend.DIFFUSERS:
|
||||
self.init_images = unprocessed # assign early for diffusers
|
||||
self.init_images = unprocessed if shared.backend == shared.Backend.DIFFUSERS else imgs
|
||||
if len(imgs) == 1:
|
||||
batch_images = np.expand_dims(imgs[0], axis=0).repeat(self.batch_size, axis=0)
|
||||
if self.overlay_images is not None:
|
||||
|
||||
@@ -162,7 +162,7 @@ def process_diffusers(p: StableDiffusionProcessing, seeds, prompts, negative_pro
|
||||
sd_samplers.create_sampler(sampler.name, shared.sd_model) # TODO(Patrick): For wrapped pipelines this is currently a no-op
|
||||
|
||||
cross_attention_kwargs={}
|
||||
if p.init_images is not None and len(p.init_images) > 0:
|
||||
if len(getattr(p, 'init_images', [])) > 0:
|
||||
while len(p.init_images) < len(prompts):
|
||||
p.init_images.append(p.init_images[-1])
|
||||
if lora_state['active']:
|
||||
|
||||
Reference in New Issue
Block a user