allow tcfg node to skip shorter unconditional prediction

This commit is contained in:
Extraltodeus 2025-08-21 03:43:17 +02:00 committed by GitHub
parent e73a9dbe30
commit aef957683c
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -49,7 +49,7 @@ class TCFG(ComfyNodeABC):
# Assume [cond, uncond, ...]
x = args["input"]
conds_out = args["conds_out"]
if len(conds_out) <= 1 or None in args["conds"][:2]:
if len(conds_out) <= 1 or None in args["conds"][:2] or not args["conds_out"][1].any():
# Skip when either cond or uncond is None
return conds_out
cond_pred = conds_out[0]