MCPcopy Create free account
hub / github.com/AMAP-ML/Eevee / unpatchify

Method unpatchify

models/dit.py:369–374  ·  view source on GitHub ↗
(self, x: torch.Tensor, grid_size: torch.Tensor)

Source from the content-addressed store, hash-verified

367 return x, grid_size # x, grid_size: (f, h, w)
368
369 def unpatchify(self, x: torch.Tensor, grid_size: torch.Tensor):
370 return rearrange(
371 x, 'b (f h w) (x y z c) -> b c (f x) (h y) (w z)',
372 f=grid_size[0], h=grid_size[1], w=grid_size[2],
373 x=self.patch_size[0], y=self.patch_size[1], z=self.patch_size[2]
374 )
375
376 def forward(self,
377 x: torch.Tensor,

Callers 2

forwardMethod · 0.95
model_fn_wan_videoFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected