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

Method __init__

diffsynth/models/svd_unet.py:104–108  ·  view source on GitHub ↗
(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float, num_frames: int)

Source from the content-addressed store, hash-verified

102
103class 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]

Callers

nothing calls this directly

Calls 3

PositionalIDClass · 0.85
get_timestep_embeddingFunction · 0.70
__init__Method · 0.45

Tested by

no test coverage detected