(
self,
timestep: torch.Tensor,
added_cond_kwargs: Dict[str, torch.Tensor] = None,
)
| 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 | |
| 298 | class PixArtAlphaTextProjection(nn.Module): |
nothing calls this directly
no outgoing calls
no test coverage detected