(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float, num_frames: int)
| 102 | |
| 103 | class TrainableTemporalTimesteps(torch.nn.Module): |
| 104 | def __init__(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float, num_frames: int): |
| 105 | super().__init__() |
| 106 | timesteps = PositionalID()(num_frames) |
| 107 | embeddings = get_timestep_embedding(timesteps, num_channels, flip_sin_to_cos, downscale_freq_shift) |
| 108 | self.embeddings = torch.nn.Parameter(embeddings) |
| 109 | |
| 110 | def forward(self, timesteps): |
| 111 | t_emb = self.embeddings[timesteps] |
nothing calls this directly
no test coverage detected