Skip to content

Commit 1c012d6

Browse files
It doesn't make sense for c_crossattn and c_concat to be lists.
1 parent 5f101f4 commit 1c012d6

2 files changed

Lines changed: 4 additions & 4 deletions

File tree

‎comfy/model_base.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,10 +50,10 @@ def register_schedule(self, given_betas=None, beta_schedule="linear", timesteps=
5050

5151
def apply_model(self, x, t, c_concat=None, c_crossattn=None, c_adm=None, control=None, transformer_options={}):
5252
if c_concat is not None:
53-
xc = torch.cat([x] + c_concat, dim=1)
53+
xc = torch.cat([x] + [c_concat], dim=1)
5454
else:
5555
xc = x
56-
context = torch.cat(c_crossattn, 1)
56+
context = c_crossattn
5757
dtype = self.get_dtype()
5858
xc = xc.to(dtype)
5959
t = t.to(dtype)

‎comfy/samplers.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,9 +165,9 @@ def cond_cat(c_list):
165165
c_crossattn_out.append(c)
166166

167167
if len(c_crossattn_out) > 0:
168-
out['c_crossattn'] = [torch.cat(c_crossattn_out)]
168+
out['c_crossattn'] = torch.cat(c_crossattn_out)
169169
if len(c_concat) > 0:
170-
out['c_concat'] = [torch.cat(c_concat)]
170+
out['c_concat'] = torch.cat(c_concat)
171171
if len(c_adm) > 0:
172172
out['c_adm'] = torch.cat(c_adm)
173173
return out

0 commit comments

Comments
 (0)