Skip to content

Commit a6375d4

Browse files
yiyixuxuyiyixuxu
andauthored
Image processor latent (#8513)
* fix * up --------- Co-authored-by: yiyixuxu <yixu310@gmail,com>
1 parent 8e1b7a0 commit a6375d4

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

src/diffusers/image_processor.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -569,7 +569,7 @@ def preprocess(
569569

570570
channel = image.shape[1]
571571
# don't need any preprocess if the image is latents
572-
if channel == 4:
572+
if channel == self.vae_latent_channels:
573573
return image
574574

575575
height, width = self.get_default_height_width(image, height, width)
@@ -585,7 +585,6 @@ def preprocess(
585585
FutureWarning,
586586
)
587587
do_normalize = False
588-
589588
if do_normalize:
590589
image = self.normalize(image)
591590

0 commit comments

Comments
 (0)