nyanko7 commited on
Commit
3eced2a
1 Parent(s): 15e4f70

Update modules/model.py

Browse files
Files changed (1) hide show
  1. 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 guidance_rescale > 0.0:
547
- noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=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 guidance_rescale > 0.0:
719
- noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=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