Spaces:
Runtime error
Runtime error
Update modules/model.py
Browse files- modules/model.py +4 -4
modules/model.py
CHANGED
@@ -543,8 +543,8 @@ class StableDiffusionPipeline(DiffusionPipeline):
|
|
543 |
noise_pred_text - noise_pred_uncond
|
544 |
)
|
545 |
|
546 |
-
if
|
547 |
-
noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=
|
548 |
|
549 |
return noise_pred
|
550 |
|
@@ -715,8 +715,8 @@ class StableDiffusionPipeline(DiffusionPipeline):
|
|
715 |
noise_pred_text - noise_pred_uncond
|
716 |
)
|
717 |
|
718 |
-
if
|
719 |
-
noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=
|
720 |
|
721 |
return noise_pred
|
722 |
|
|
|
543 |
noise_pred_text - noise_pred_uncond
|
544 |
)
|
545 |
|
546 |
+
if guidance_scale > 0.0:
|
547 |
+
noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=guidance_scale)
|
548 |
|
549 |
return noise_pred
|
550 |
|
|
|
715 |
noise_pred_text - noise_pred_uncond
|
716 |
)
|
717 |
|
718 |
+
if guidance_scale > 0.0:
|
719 |
+
noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=guidance_scale)
|
720 |
|
721 |
return noise_pred
|
722 |
|