jank hacky experimental UniPC impl

This is definitely not the ideal way to do this. But. Uh. It exists now.
This commit is contained in:
Alex "mcmonkey" Goodwin
2023-03-22 10:02:01 -07:00
parent c26db23af7
commit 7a9f2694f4
3 changed files with 130 additions and 9 deletions
+3 -1
View File
@@ -48,7 +48,9 @@ class DynThresh:
### Normal first part of the CFG Scale logic, basically
diff = cond_stacked - uncond.unsqueeze(1)
relative = (diff * weights).sum(1)
if weights is not None:
diff = diff * weights
relative = diff.sum(1)
### Get the normal result for both mimic and normal scale
mim_target = uncond + relative * mimicScale