From bba97c079d5a07689005e6e88ab6cd3e8a803e02 Mon Sep 17 00:00:00 2001 From: kaibioinfo Date: Fri, 22 Dec 2023 15:35:27 +0100 Subject: [PATCH] Update dynthres_comfyui.py (#87) * Update dynthres_comfyui.py comfyui timestep arg returns the sigma instead of the timestep. Thanks to piezo for helping me figure out how to convert sigma to timestep. * fix over-deletion --------- Co-authored-by: Alex "mcmonkey" Goodwin --- dynthres_comfyui.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/dynthres_comfyui.py b/dynthres_comfyui.py index df3b23c..23112bb 100644 --- a/dynthres_comfyui.py +++ b/dynthres_comfyui.py @@ -34,8 +34,8 @@ class DynamicThresholdingComfyNode: cond = input - args["cond"] uncond = input - args["uncond"] cond_scale = args["cond_scale"] - time_step = args["timestep"] - dynamic_thresh.step = 999 - time_step[0] + time_step = model.model.model_sampling.timestep(args["sigma"]) + dynamic_thresh.step = 999 - time_step return input - dynamic_thresh.dynthresh(cond, uncond, cond_scale, None) @@ -68,8 +68,8 @@ class DynamicThresholdingSimpleComfyNode: cond = input - args["cond"] uncond = input - args["uncond"] cond_scale = args["cond_scale"] - time_step = args["timestep"] - dynamic_thresh.step = 999 - time_step[0] + time_step = model.model.model_sampling.timestep(args["sigma"]) + dynamic_thresh.step = 999 - time_step return input - dynamic_thresh.dynthresh(cond, uncond, cond_scale, None)