Get rid of meshgrid warning.

This commit is contained in:
comfyanonymous 2024-12-20 18:02:12 -05:00
parent c86cd58573
commit da13b6b827

View File

@ -53,7 +53,7 @@ class Patchifier(ABC):
grid_h = torch.arange(h, dtype=torch.float32, device=device)
grid_w = torch.arange(w, dtype=torch.float32, device=device)
grid_f = torch.arange(f, dtype=torch.float32, device=device)
grid = torch.meshgrid(grid_f, grid_h, grid_w)
grid = torch.meshgrid(grid_f, grid_h, grid_w, indexing='ij')
grid = torch.stack(grid, dim=0)
grid = grid.unsqueeze(0).repeat(batch_size, 1, 1, 1, 1)