Update for latest comfy commit
parent
5cce1c8e11
commit
2998d4c074
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in New Issue