mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2026-02-10 13:32:36 +08:00
Allow any number of input frames in VAE.
This commit is contained in:
parent
023036ef9d
commit
8ccd4ca886
@ -232,8 +232,8 @@ class Encoder(nn.Module):
|
|||||||
|
|
||||||
if self.refiner_vae:
|
if self.refiner_vae:
|
||||||
xl = [x[:, :, :1, :, :]]
|
xl = [x[:, :, :1, :, :]]
|
||||||
if x.shape[2] > 1:
|
if x.shape[2] > self.ffactor_temporal:
|
||||||
xl += torch.split(x[:, :, 1:, :, :], self.ffactor_temporal, dim=2)
|
xl += torch.split(x[:, :, 1: 1 + ((x.shape[2] - 1) // self.ffactor_temporal) * self.ffactor_temporal, :, :], self.ffactor_temporal, dim=2)
|
||||||
x = xl
|
x = xl
|
||||||
else:
|
else:
|
||||||
x = [x]
|
x = [x]
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user