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)