mirror of
https://github.com/vladmandic/automatic
synced 2026-09-07 05:20:47 +02:00
@@ -1627,7 +1627,7 @@ class StableDiffusionDiffImg2ImgPipeline(DiffusionPipeline):
|
||||
|
||||
if isinstance(image[0], PIL.Image.Image):
|
||||
w, h = image[0].size
|
||||
w, h = map(lambda x: x - x % 8, (w, h)) # resize to integer multiple of 8
|
||||
w, h = map(lambda x: x - x % 8, (w, h)) # resize to integer multiple of 8 # noqa: C417
|
||||
|
||||
image = [np.array(i.resize((w, h), resample=PIL_INTERPOLATION["lanczos"]))[None, :] for i in image]
|
||||
image = np.concatenate(image, axis=0)
|
||||
|
||||
Reference in New Issue
Block a user