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

Class TemporalTimesteps

diffsynth/models/svd_unet.py:84–100  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

82
83
84class TemporalTimesteps(torch.nn.Module):
85 def __init__(self, num_channels: int, flip_sin_to_cos: bool, downscale_freq_shift: float, computation_device = None):
86 super().__init__()
87 self.num_channels = num_channels
88 self.flip_sin_to_cos = flip_sin_to_cos
89 self.downscale_freq_shift = downscale_freq_shift
90 self.computation_device = computation_device
91
92 def forward(self, timesteps):
93 t_emb = get_timestep_embedding(
94 timesteps,
95 self.num_channels,
96 flip_sin_to_cos=self.flip_sin_to_cos,
97 downscale_freq_shift=self.downscale_freq_shift,
98 computation_device=self.computation_device,
99 )
100 return t_emb
101
102
103class TrainableTemporalTimesteps(torch.nn.Module):

Callers 2

__init__Method · 0.85
__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected