Update nodes.py

This commit is contained in:
Extraltodeus
2024-06-20 04:26:11 +02:00
committed by GitHub
parent bf6e30e65a
commit 470e01bcff
+2 -2
View File
@@ -19,7 +19,7 @@ class uncondZeroNode:
x_orig = args["input"]
x_orig -= x_orig.mean()
cond -= cond.mean()
return x_orig - cond / cond.std() ** .5 * scale
return x_orig - cond / cond.std() ** .5 * scale # the square root of the std is simply an ever changing scale that fits the bill.
def uncond_zero_v2(args):
cond = args["cond_denoised"]
@@ -68,4 +68,4 @@ class uncondZeroNode:
m = model.clone()
m.set_model_sampler_cfg_function({"uncond_zero_v1":uncond_zero,"uncond_zero_v2":uncond_zero_v2,"uncond_zero_v3":rescale_cfg}[method])
return (m, )
return (m, )