Skip to content

Commit

Permalink
Reuse code.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jun 11, 2024
1 parent 73ce178 commit 9424522
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions comfy/model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -573,13 +573,8 @@ def encode_adm(self, **kwargs):
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

0 comments on commit 9424522

Please sign in to comment.