Skip to content

Commit

Permalink
Uni pc sampler now works with audio and video models.
Browse files Browse the repository at this point in the history
  • Loading branch information
comfyanonymous committed Jan 18, 2025
1 parent 2f3ab40 commit 507199d
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions comfy/extra_samplers/uni_pc.py
Original file line number Diff line number Diff line change
Expand Up @@ -661,15 +661,15 @@ def multistep_uni_pc_bh_update(self, x, model_prev_list, t_prev_list, t, order,

if x_t is None:
if use_predictor:
pred_res = torch.einsum('k,bkchw->bchw', rhos_p, D1s)
pred_res = torch.tensordot(D1s, rhos_p, dims=([1], [0])) # torch.einsum('k,bkchw->bchw', rhos_p, D1s)
else:
pred_res = 0
x_t = x_t_ - expand_dims(alpha_t * B_h, dims) * pred_res

if use_corrector:
model_t = self.model_fn(x_t, t)
if D1s is not None:
corr_res = torch.einsum('k,bkchw->bchw', rhos_c[:-1], D1s)
corr_res = torch.tensordot(D1s, rhos_c[:-1], dims=([1], [0])) # torch.einsum('k,bkchw->bchw', rhos_c[:-1], D1s)
else:
corr_res = 0
D1_t = (model_t - model_prev_0)
Expand Down

0 comments on commit 507199d

Please sign in to comment.