This commit is contained in:
TheToxin-git 2026-07-06 17:34:00 +08:00 committed by GitHub
commit 84d1ad8583
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -73,7 +73,7 @@ class APG(io.ComfyNode):
guidance = cond - uncond
if momentum != 0:
if not torch.is_tensor(running_avg):
if not torch.is_tensor(running_avg) or (running_avg.shape != guidance.shape):
running_avg = guidance
else:
running_avg = momentum * running_avg + guidance