Update nodes.py

This commit is contained in:
Extraltodeus
2024-04-05 03:59:14 +02:00
committed by GitHub
parent ca077d736b
commit 1c3137caf5
+6 -1
View File
@@ -13,7 +13,12 @@ def sampling_function_patched(model, x, timestep, uncond, cond, cond_scale, mode
else:
uncond_ = uncond
cond_pred, uncond_pred = comfy.samplers.calc_cond_uncond_batch(model, cond, uncond_, x, timestep, model_options)
conds = [cond, uncond_]
out = comfy.samplers.calc_cond_batch(model, conds, x, timestep, model_options)
cond_pred = out[0]
uncond_pred = out[1]
if "sampler_cfg_function" in model_options:
args = {"cond": x - cond_pred, "uncond": x - uncond_pred, "cond_scale": cond_scale, "timestep": timestep, "input": x, "sigma": timestep,
"cond_denoised": cond_pred, "uncond_denoised": uncond_pred, "model": model, "model_options": model_options}