With recent versions of kornia, the following import fails:
from kornia.geometry.transform.pyramid import pad
This prevents the entire node package from loading:
ImportError: cannot import name 'pad' from 'kornia.geometry.transform.pyramid'
A simple fix is:
import torch.nn.functional as F
+pad = F.pad
from kornia.geometry.transform.pyramid import (
PyrUp,
build_laplacian_pyramid,
build_pyramid,
find_next_powerof_two,
is_powerof_two,
- pad,
)
After this change the nodes load correctly with current Kornia versions.
Environment:
- Linux (Arch)
- Python 3.14
- Latest ComfyUI
- Latest ComfyUI-LTXVideo
With recent versions of
kornia, the following import fails:This prevents the entire node package from loading:
A simple fix is:
After this change the nodes load correctly with current Kornia versions.
Environment: