Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/Meshcapade/difflocks
/ make_grid
Function
make_grid
k_diffusion/models/axial_rope.py:36–39 ·
view source on GitHub ↗
(h_pos, w_pos)
Source
from the content-addressed store, hash-verified
34
35
36
def
make_grid(h_pos, w_pos):
37
grid = torch.stack(torch.meshgrid(h_pos, w_pos, indexing=
'ij'
), dim=-1)
38
h, w, d = grid.shape
39
return
grid.view(h * w, d)
40
41
42
def
bounding_box(h, w, pixel_aspect_ratio=1.0):
Callers
1
make_axial_pos
Function · 0.85
Calls
no outgoing calls
Tested by
no test coverage detected