Skip to content

Commit 2e681ff

Browse files
ernestchusayakpaul
andauthored
Fix a bug of pano when not doing CFG (huggingface#3030)
* Fix a bug of pano when not doing CFG * enhance code quality * apply formatting. --------- Co-authored-by: Sayak Paul <[email protected]>
1 parent 148b7cf commit 2e681ff

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

pipelines/stable_diffusion/pipeline_stable_diffusion_panorama.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,7 +625,9 @@ def __call__(
625625
latents_for_view = latents[:, :, h_start:h_end, w_start:w_end]
626626

627627
# expand the latents if we are doing classifier free guidance
628-
latent_model_input = torch.cat([latents_for_view] * 2) if do_classifier_free_guidance else latents
628+
latent_model_input = (
629+
torch.cat([latents_for_view] * 2) if do_classifier_free_guidance else latents_for_view
630+
)
629631
latent_model_input = self.scheduler.scale_model_input(latent_model_input, t)
630632

631633
# predict the noise residual

0 commit comments

Comments
 (0)