From b6d4702301365fc2a3dce6b4739ec534e09ce36f Mon Sep 17 00:00:00 2001 From: Daquan Lin Date: Sun, 25 Dec 2022 02:56:57 +0800 Subject: [PATCH] fix small mistake in annotation: 32 -> 64 (#1780) Fix inconsistencies between code and comments in the function 'preprocess' --- .../stable_diffusion/pipeline_stable_diffusion_upscale.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py index cfb05a16b0c6..528ed0dca3c0 100644 --- a/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py +++ b/src/diffusers/pipelines/stable_diffusion/pipeline_stable_diffusion_upscale.py @@ -39,7 +39,7 @@ def preprocess(image): if isinstance(image[0], PIL.Image.Image): w, h = image[0].size - w, h = map(lambda x: x - x % 64, (w, h)) # resize to integer multiple of 32 + w, h = map(lambda x: x - x % 64, (w, h)) # resize to integer multiple of 64 image = [np.array(i.resize((w, h)))[None, :] for i in image] image = np.concatenate(image, axis=0)