Skip to content

Commit cd9dfef

Browse files
RyanJDickhipsterusername
authored andcommitted
Fix inpainting mask shape assertions.
1 parent b9946e5 commit cd9dfef

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

invokeai/backend/stable_diffusion/diffusers_pipeline.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -255,8 +255,8 @@ def add_inpainting_channels_to_latents(
255255
# Validate assumptions about input tensor shapes.
256256
batch_size, latent_channels, latent_height, latent_width = latents.shape
257257
assert latent_channels == 4
258-
assert masked_ref_image_latents.shape == [1, 4, latent_height, latent_width]
259-
assert inpainting_mask == [1, 1, latent_height, latent_width]
258+
assert list(masked_ref_image_latents.shape) == [1, 4, latent_height, latent_width]
259+
assert list(inpainting_mask.shape) == [1, 1, latent_height, latent_width]
260260

261261
# Repeat original_image_latents and inpainting_mask to match the latents batch size.
262262
original_image_latents = masked_ref_image_latents.expand(batch_size, -1, -1, -1)

0 commit comments

Comments
 (0)