From cba9c66fd23c9769dc4c513b9fc3fd4c8e1f64e8 Mon Sep 17 00:00:00 2001 From: JettHu Date: Sat, 20 Apr 2024 01:47:03 +0800 Subject: [PATCH] feat: sampler_cfg_rescaler timestep to sigma --- comfy/samplers.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/samplers.py b/comfy/samplers.py index bd8912bc2..252bea650 100644 --- a/comfy/samplers.py +++ b/comfy/samplers.py @@ -250,7 +250,7 @@ def cfg_function(model, cond_pred, uncond_pred, cond_scale, x, timestep, model_o #Returns denoised def sampling_function(model, x, timestep, uncond, cond, cond_scale, model_options={}, seed=None): if "sampler_cfg_rescaler" in model_options: - cond_scale = model_options["sampler_cfg_rescaler"]({"cond_scale": cond_scale, "timestep": timestep}) + cond_scale = model_options["sampler_cfg_rescaler"]({"cond_scale": cond_scale, "sigma": timestep}) if math.isclose(cond_scale, 1.0) and model_options.get("disable_cfg1_optimization", False) == False: uncond_ = None else: