From a6375d4101ee705e9d2d5f3e3f8542e07a6d22a5 Mon Sep 17 00:00:00 2001 From: YiYi Xu Date: Sun, 16 Jun 2024 22:34:55 -1000 Subject: [PATCH] Image processor latent (#8513) * fix * up --------- Co-authored-by: yiyixuxu --- src/diffusers/image_processor.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/diffusers/image_processor.py b/src/diffusers/image_processor.py index a49586e51c..8738ff49fa 100644 --- a/src/diffusers/image_processor.py +++ b/src/diffusers/image_processor.py @@ -569,7 +569,7 @@ class VaeImageProcessor(ConfigMixin): channel = image.shape[1] # don't need any preprocess if the image is latents - if channel == 4: + if channel == self.vae_latent_channels: return image height, width = self.get_default_height_width(image, height, width) @@ -585,7 +585,6 @@ class VaeImageProcessor(ConfigMixin): FutureWarning, ) do_normalize = False - if do_normalize: image = self.normalize(image)