Fix ImportError with newer Kornia versions (missing pad import)
Nobody has claimed this yet.
Assessment
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Newbie friendliness
- 72/100
- Issue type
- Bug
- Clarity
- Clearly specified
- Activity status
- Quiet
- Tech stack
- python
- Domain
- ai, machine-learning
Research direction
The failing line is the from kornia.geometry.transform.pyramid import ... statement that includes pad; the payload does not name the file, so search the repository for that import. Replace the pad import with torch.nn.functional.pad as the issue suggests, then confirm the node package loads without an ImportError. Done means the import succeeds on current Kornia.
Written by the indexing model from the issue text.
Description
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
- Dominant language
- Python
- Stars
- 4.2k
- Forks
- 508
- Avg merge
- 7h 14m
- Merged PRs (30d)
- 3
Getting set up
This project ships no dev container, Dockerfile or contributing guide, so setting up is up to you: start from its README, and see our first-contribution guide for the general steps.
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from Lightricks/ComfyUI-LTXVideo
-
Difficulty 2/5 1-3 hours Newbie friendliness 74/100
Lightricks/ComfyUI-LTXVideo#569 · 1 comment ·
-
Difficulty 1/5 Under an hour Newbie friendliness 75/100
Lightricks/ComfyUI-LTXVideo#525 · 6 comments · 3 reactions ·
-
001Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
Lightricks/ComfyUI-LTXVideo#589 ·
-
001Open
Difficulty 5/5 Over a week Newbie friendliness 15/100
Lightricks/ComfyUI-LTXVideo#588 ·
-
bong_tangent optionOpen
Difficulty 2/5 1-3 hours Newbie friendliness 47/100
Lightricks/ComfyUI-LTXVideo#587 ·
All issues in Lightricks/ComfyUI-LTXVideo
Similar issues
-
bug
Difficulty 1/5 Under an hour Newbie friendliness 78/100
splunk/security_content#4418 ·
Maintainers usually reply within 1 day
-
[Bug / Enhancement]: Improve teleop_robot CLI with configurable timeout, robust input validation, and clean ROS shutdownPossibly taken @muskan-creates352 claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 72/100
Maintainers usually reply within 3 days
-
bug(pipelines): shortcode stripping deletes text between a {{< >}} shortcode and the next {{% %}}Possibly taken @Ashborne-lab claimed this today. Open
Difficulty 2/5 1-3 hours Newbie friendliness 70/100
kubeflow/docs-agent#293 ·
Maintainers usually reply within 3 days
-
Difficulty 2/5 1-3 hours Newbie friendliness 62/100
Imbad0202/academic-research-skills#1093 ·
Maintainers usually reply within 1 day
-
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
pierreaubert/gpui-toolkit#114 ·
Maintainers usually reply within 1 day