skip dynthresh if mimic == cfg

per chaotic reddit post https://www.reddit.com/r/StableDiffusion/comments/1enxcek/comment
pull/108/head
Alex "mcmonkey" Goodwin 2024-08-10 05:59:56 -07:00
parent 1a49c55c1a
commit 5d63447afb
1 changed files with 8 additions and 2 deletions

View File

@ -38,6 +38,9 @@ class DynamicThresholdingComfyNode:
time_step = time_step[0].item()
dynamic_thresh.step = 999 - time_step
if cond_scale == mimic_scale:
return input - (uncond + (cond - uncond) * cond_scale)
else:
return input - dynamic_thresh.dynthresh(cond, uncond, cond_scale, None)
m = model.clone()
@ -73,6 +76,9 @@ class DynamicThresholdingSimpleComfyNode:
time_step = time_step[0].item()
dynamic_thresh.step = 999 - time_step
if cond_scale == mimic_scale:
return input - (uncond + (cond - uncond) * cond_scale)
else:
return input - dynamic_thresh.dynthresh(cond, uncond, cond_scale, None)
m = model.clone()