From 1c3137caf506bfbecf1cfd3e66b09edf40015df2 Mon Sep 17 00:00:00 2001 From: Extraltodeus Date: Fri, 5 Apr 2024 03:59:14 +0200 Subject: [PATCH] Update nodes.py --- nodes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 8f87cb9..9059fde 100644 --- a/nodes.py +++ b/nodes.py @@ -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}