Skip to content

Commit ce0052c

Browse files
Fix diffsynth controlnet regression. (#9597)
1 parent 0eb821a commit ce0052c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

comfy_extras/nodes_model_patch.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def __call__(self, kwargs):
108108
img = kwargs.get("img")
109109
block_index = kwargs.get("block_index")
110110
spacial_compression = self.vae.spacial_compression_encode()
111-
if self.encoded_image is None or self.encoded_image_size != (x.shape[-1] * spacial_compression, x.shape[-2] * spacial_compression):
111+
if self.encoded_image is None or self.encoded_image_size != (x.shape[-2] * spacial_compression, x.shape[-1] * spacial_compression):
112112
image_scaled = comfy.utils.common_upscale(self.image.movedim(-1, 1), x.shape[-1] * spacial_compression, x.shape[-2] * spacial_compression, "area", "center")
113113
loaded_models = comfy.model_management.loaded_models(only_currently_used=True)
114114
self.encoded_image = self.model_patch.model.process_input_latent_image(self.encode_latent_cond(image_scaled.movedim(1, -1)))

0 commit comments

Comments
 (0)