MCPcopy Create free account
hub / github.com/OpenImagingLab/FlashVSR / reverse

Method reverse

diffsynth/models/wan_video_dit.py:105–112  ·  view source on GitHub ↗
(windows: torch.Tensor, win: Tuple[int, int, int], orig: Tuple[int, int, int])

Source from the content-addressed store, hash-verified

103
104 @staticmethod
105 def reverse(windows: torch.Tensor, win: Tuple[int, int, int], orig: Tuple[int, int, int]):
106 F, H, W = orig
107 wf, wh, ww = win
108 nf, nh, nw = F // wf, H // wh, W // ww
109 B = windows.size(0) // (nf * nh * nw)
110 x = windows.view(B, nf, nh, nw, wf, wh, ww, -1)
111 x = x.permute(0, 1, 4, 2, 5, 3, 6, 7).contiguous()
112 return x.view(B, F, H, W, -1)
113
114
115@torch.no_grad()

Callers 1

forwardMethod · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected