From 2998d4c074ede2bf59cb8c7c207c418687f165e7 Mon Sep 17 00:00:00 2001 From: "Alex \"mcmonkey\" Goodwin" Date: Wed, 1 Nov 2023 18:48:15 -0700 Subject: [PATCH] Update for latest comfy commit --- dynthres_comfyui.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dynthres_comfyui.py b/dynthres_comfyui.py index b07eb48..df3b23c 100644 --- a/dynthres_comfyui.py +++ b/dynthres_comfyui.py @@ -30,13 +30,14 @@ class DynamicThresholdingComfyNode: dynamic_thresh = DynThresh(mimic_scale, threshold_percentile, mimic_mode, mimic_scale_min, cfg_mode, cfg_scale_min, sched_val, 0, 999, separate_feature_channels == "enable", scaling_startpoint, variability_measure, interpolate_phi) def sampler_dyn_thresh(args): - cond = args["cond"] - uncond = args["uncond"] + input = args["input"] + cond = input - args["cond"] + uncond = input - args["uncond"] cond_scale = args["cond_scale"] time_step = args["timestep"] dynamic_thresh.step = 999 - time_step[0] - return dynamic_thresh.dynthresh(cond, uncond, cond_scale, None) + return input - dynamic_thresh.dynthresh(cond, uncond, cond_scale, None) m = model.clone() m.set_model_sampler_cfg_function(sampler_dyn_thresh) @@ -63,13 +64,14 @@ class DynamicThresholdingSimpleComfyNode: dynamic_thresh = DynThresh(mimic_scale, threshold_percentile, "CONSTANT", 0, "CONSTANT", 0, 0, 0, 999, False, "MEAN", "AD", 1) def sampler_dyn_thresh(args): - cond = args["cond"] - uncond = args["uncond"] + input = args["input"] + cond = input - args["cond"] + uncond = input - args["uncond"] cond_scale = args["cond_scale"] time_step = args["timestep"] dynamic_thresh.step = 999 - time_step[0] - return dynamic_thresh.dynthresh(cond, uncond, cond_scale, None) + return input - dynamic_thresh.dynthresh(cond, uncond, cond_scale, None) m = model.clone() m.set_model_sampler_cfg_function(sampler_dyn_thresh)