mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-11-22 12:57:02 +08:00
feat: sampler_cfg_rescaler timestep to sigma
This commit is contained in:
parent
0b56c97717
commit
cba9c66fd2
@ -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:
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user