Skip to content

Commit

Permalink
Cleanup old TODO.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jan 20, 2025
1 parent a00e148 commit d8a7a32
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
8 changes: 7 additions & 1 deletion comfy/model_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,9 @@ def _apply_model(self, x, t, c_concat=None, c_crossattn=None, control=None, tran

xc = xc.to(dtype)
t = self.model_sampling.timestep(t).float()
context = context.to(dtype)
if context is not None:
context = context.to(dtype)

extra_conds = {}
for o in kwargs:
extra = kwargs[o]
Expand Down Expand Up @@ -549,6 +551,10 @@ def extra_conds(self, **kwargs):

out['c_concat'] = comfy.conds.CONDNoiseShape(image)
out['y'] = comfy.conds.CONDRegular(noise_level)

cross_attn = kwargs.get("cross_attn", None)
if cross_attn is not None:
out['c_crossattn'] = comfy.conds.CONDCrossAttn(cross_attn)
return out

class IP2P:
Expand Down
1 change: 0 additions & 1 deletion comfy/sampler_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,6 @@ def convert_cond(cond):
temp = c[1].copy()
model_conds = temp.get("model_conds", {})
if c[0] is not None:
model_conds["c_crossattn"] = comfy.conds.CONDCrossAttn(c[0]) #TODO: remove
temp["cross_attn"] = c[0]
temp["model_conds"] = model_conds
temp["uuid"] = uuid.uuid4()
Expand Down

0 comments on commit d8a7a32

Please sign in to comment.