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

Update modules/model.py

Browse files
Files changed (1) hide show
  1. modules/model.py +2 -6
modules/model.py CHANGED
@@ -543,9 +543,7 @@ class StableDiffusionPipeline(DiffusionPipeline):
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
 
551
  sampler_args = self.get_sampler_extra_args_i2i(sigma_sched, sampler)
@@ -715,9 +713,7 @@ class StableDiffusionPipeline(DiffusionPipeline):
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
 
723
  extra_args = self.get_sampler_extra_args_t2i(
 
543
  noise_pred_text - noise_pred_uncond
544
  )
545
 
546
+ noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=0.7)
 
 
547
  return noise_pred
548
 
549
  sampler_args = self.get_sampler_extra_args_i2i(sigma_sched, sampler)
 
713
  noise_pred_text - noise_pred_uncond
714
  )
715
 
716
+ noise_pred = rescale_noise_cfg(noise_pred, noise_pred_text, guidance_rescale=0.7)
 
 
717
  return noise_pred
718
 
719
  extra_args = self.get_sampler_extra_args_t2i(