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

Method forward

diffsynth/models/stepvideo_dit.py:286–295  ·  view source on GitHub ↗
(
        self,
        timestep: torch.Tensor,
        added_cond_kwargs: Dict[str, torch.Tensor] = None,
    )

Source from the content-addressed store, hash-verified

284 self.time_step_rescale = time_step_rescale ## timestep usually in [0, 1], we rescale it to [0,1000] for stability
285
286 def forward(
287 self,
288 timestep: torch.Tensor,
289 added_cond_kwargs: Dict[str, torch.Tensor] = None,
290 ) -> Tuple[torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor, torch.Tensor]:
291 embedded_timestep = self.emb(timestep*self.time_step_rescale, **added_cond_kwargs)
292
293 out = self.linear(self.silu(embedded_timestep))
294
295 return out, embedded_timestep
296
297
298class PixArtAlphaTextProjection(nn.Module):

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected