mirror of
https://github.com/Comfy-Org/ComfyUI.git
synced 2026-10-03 19:38:19 -05:00
16 lines
382 B
Python
16 lines
382 B
Python
import torch
|
|
from torch import nn
|
|
|
|
from comfy.ldm.lama import FourierUnit
|
|
|
|
|
|
def test_fourier_unit_preserves_non_square_spatial_shape():
|
|
unit = FourierUnit(4, nn).eval()
|
|
source = torch.randn((2, 4, 6, 10), dtype=torch.float32)
|
|
|
|
result = unit(source)
|
|
|
|
assert result.shape == source.shape
|
|
assert result.dtype == source.dtype
|
|
assert torch.isfinite(result).all()
|