Reuse code.

This commit is contained in:
comfyanonymous 2024-06-11 07:20:26 -04:00
parent 73ce178021
commit 9424522ead

View File

@ -573,13 +573,8 @@ class SD3(BaseModel):
return kwargs["pooled_output"]
def extra_conds(self, **kwargs):
out = {}
adm = self.encode_adm(**kwargs)
if adm is not None:
out['y'] = comfy.conds.CONDRegular(adm)
out = super().extra_conds(**kwargs)
cross_attn = kwargs.get("cross_attn", None)
if cross_attn is not None:
out['c_crossattn'] = comfy.conds.CONDRegular(cross_attn)
return out