mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
Get rid of meshgrid warning.
This commit is contained in:
parent
c86cd58573
commit
da13b6b827
@ -53,7 +53,7 @@ class Patchifier(ABC):
|
|||||||
grid_h = torch.arange(h, dtype=torch.float32, device=device)
|
grid_h = torch.arange(h, dtype=torch.float32, device=device)
|
||||||
grid_w = torch.arange(w, 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_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 = torch.stack(grid, dim=0)
|
||||||
grid = grid.unsqueeze(0).repeat(batch_size, 1, 1, 1, 1)
|
grid = grid.unsqueeze(0).repeat(batch_size, 1, 1, 1, 1)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user