MCPcopy Create free account
hub / github.com/Meshcapade/difflocks / freqs_pixel_log

Function freqs_pixel_log

k_diffusion/models/axial_rope.py:78–83  ·  view source on GitHub ↗
(max_freq=10.0)

Source from the content-addressed store, hash-verified

76
77
78def freqs_pixel_log(max_freq=10.0):
79 def init(shape):
80 log_min = math.log(math.pi)
81 log_max = math.log(max_freq * math.pi / 2)
82 return torch.linspace(log_min, log_max, shape[-1]).expand(shape)
83 return init
84
85
86class AxialRoPE(nn.Module):

Callers 1

__init__Method · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected