fix sd1.5: pass height/width to pipeline
This commit is contained in:
parent
adddb80bbc
commit
e2e2f5f853
@ -134,6 +134,8 @@ class SD(InpaintModel):
|
|||||||
self.image_key: PIL.Image.fromarray(image),
|
self.image_key: PIL.Image.fromarray(image),
|
||||||
}
|
}
|
||||||
|
|
||||||
|
img_h, img_w = image.shape[:2]
|
||||||
|
|
||||||
output = self.model(
|
output = self.model(
|
||||||
prompt=config.prompt,
|
prompt=config.prompt,
|
||||||
mask_image=PIL.Image.fromarray(mask[:, :, -1], mode="L"),
|
mask_image=PIL.Image.fromarray(mask[:, :, -1], mode="L"),
|
||||||
@ -142,6 +144,8 @@ class SD(InpaintModel):
|
|||||||
guidance_scale=config.sd_guidance_scale,
|
guidance_scale=config.sd_guidance_scale,
|
||||||
output_type="np.array",
|
output_type="np.array",
|
||||||
callback=self.callback,
|
callback=self.callback,
|
||||||
|
height=img_h,
|
||||||
|
width=img_w,
|
||||||
**_kwargs
|
**_kwargs
|
||||||
).images[0]
|
).images[0]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user