Skip to content

Commit

Permalink
fix stable diffusion rank error (#2208)
Browse files Browse the repository at this point in the history
  • Loading branch information
divyashreepathihalli authored Dec 1, 2023
1 parent d74a37a commit 2604105
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion keras_cv/models/stable_diffusion/stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,7 @@ def generate_image(

if diffusion_noise is not None:
diffusion_noise = ops.squeeze(diffusion_noise)
if diffusion_noise.shape.rank == 3:
if len(ops.shape(diffusion_noise)) == 3:
diffusion_noise = ops.repeat(
ops.expand_dims(diffusion_noise, axis=0), batch_size, axis=0
)
Expand Down

0 comments on commit 2604105

Please sign in to comment.