"docs/en/vscode:/vscode.git/clone" did not exist on "f256abffd38e848211c208ac706a2e35b1ac2e94"
Commit 574efd37 authored by comfyanonymous's avatar comfyanonymous
Browse files

Fix perpneg not working on SDXL.

parent 172984db
...@@ -29,8 +29,9 @@ class PerpNeg: ...@@ -29,8 +29,9 @@ class PerpNeg:
x = args["input"] x = args["input"]
sigma = args["sigma"] sigma = args["sigma"]
model_options = args["model_options"] model_options = args["model_options"]
nocond_processed = comfy.samplers.encode_model_conds(model.extra_conds, nocond, x, x.device, "negative")
(noise_pred_nocond, _) = comfy.samplers.calc_cond_uncond_batch(model, nocond, None, x, sigma, model_options) (noise_pred_nocond, _) = comfy.samplers.calc_cond_uncond_batch(model, nocond_processed, None, x, sigma, model_options)
pos = noise_pred_pos - noise_pred_nocond pos = noise_pred_pos - noise_pred_nocond
neg = noise_pred_neg - noise_pred_nocond neg = noise_pred_neg - noise_pred_nocond
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment