Jelajahi Sumber

fix wrong condition

AUTOMATIC1111 1 tahun lalu
induk
melakukan
45b8a499a7
1 mengubah file dengan 1 tambahan dan 1 penghapusan
  1. 1 1
      modules/sd_samplers_common.py

+ 1 - 1
modules/sd_samplers_common.py

@@ -156,7 +156,7 @@ replace_torchsde_browinan()
 
 
 
 
 def apply_refiner(cfg_denoiser, sigma=None):
 def apply_refiner(cfg_denoiser, sigma=None):
-    if opts.refiner_switch_by_sample_steps or not sigma:
+    if opts.refiner_switch_by_sample_steps or sigma is None:
         completed_ratio = cfg_denoiser.step / cfg_denoiser.total_steps
         completed_ratio = cfg_denoiser.step / cfg_denoiser.total_steps
         cfg_denoiser.p.extra_generation_params["Refiner switch by sampling steps"] = True
         cfg_denoiser.p.extra_generation_params["Refiner switch by sampling steps"] = True