Fix ConditioningZeroOut when there is no pooled output.

This commit is contained in:
comfyanonymous 2024-07-09 11:52:31 -04:00
parent d160073829
commit c3db344746
1 changed files with 3 additions and 2 deletions

View File

@ -232,8 +232,9 @@ class ConditioningZeroOut:
c = []
for t in conditioning:
d = t[1].copy()
if "pooled_output" in d:
d["pooled_output"] = torch.zeros_like(d["pooled_output"])
pooled_output = d.get("pooled_output", None)
if pooled_output is not None:
d["pooled_output"] = torch.zeros_like(pooled_output)
n = [torch.zeros_like(t[0]), d]
c.append(n)
return (c, )