Update nodes.py

This commit is contained in:
Extraltodeus
2024-03-27 19:43:10 +01:00
committed by GitHub
parent 7eef8c972f
commit dbfeb0c389
+4 -4
View File
@@ -97,10 +97,10 @@ class advancedDynamicCFG:
target_intensity = self.last_cfg_ht_one / 10
if sigma_boost and cond_scale > 1:
for b in range(len(cond)):
for c in range(len(cond[b])):
uncond[b][c] = uncond[b][c] * torch.norm(cond[b][c]) / torch.norm(uncond[b][c])
# if sigma_boost and cond_scale > 1:
# for b in range(len(cond)):
# for c in range(len(cond[b])):
# uncond[b][c] = uncond[b][c] * torch.norm(cond[b][c]) / torch.norm(uncond[b][c])
if automatic_cfg == "None" or (cond_scale == 1 and automatic_cfg != "include_boost"):
return uncond + cond_scale * (cond - uncond)