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

Method forward

diffsynth/models/svd_vae_decoder.py:28–42  ·  view source on GitHub ↗
(self, hidden_states, time_emb, text_emb, res_stack)

Source from the content-addressed store, hash-verified

26 ])
27
28 def forward(self, hidden_states, time_emb, text_emb, res_stack):
29 batch, _, height, width = hidden_states.shape
30 residual = hidden_states
31
32 hidden_states = self.norm(hidden_states)
33 inner_dim = hidden_states.shape[1]
34 hidden_states = hidden_states.permute(0, 2, 3, 1).reshape(batch, height * width, inner_dim)
35
36 for block in self.transformer_blocks:
37 hidden_states = block(hidden_states)
38
39 hidden_states = hidden_states.reshape(batch, height, width, inner_dim).permute(0, 3, 1, 2).contiguous()
40 hidden_states = hidden_states + residual
41
42 return hidden_states, time_emb, text_emb, res_stack
43
44
45class TemporalResnetBlock(torch.nn.Module):

Callers

nothing calls this directly

Calls 1

normMethod · 0.80

Tested by

no test coverage detected