Fix ImportError: kornia removed pad re-export from geometry.transform.pyramid#516
Open
Vivi (VixenVillainous) wants to merge 1 commit into
Open
Fix ImportError: kornia removed pad re-export from geometry.transform.pyramid#516Vivi (VixenVillainous) wants to merge 1 commit into
pad re-export from geometry.transform.pyramid#516Vivi (VixenVillainous) wants to merge 1 commit into
Conversation
Author
|
Quick context for reviewers: this is a one-line-equivalent fix for the Since that Tested locally on a current ComfyUI portable build (Python 3.13.12, kornia |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #494
Problem
pyramid_blending.pyimportspadfromkornia.geometry.transform.pyramid:Recent versions of kornia no longer re-export
padfrom that module, so theimport fails and the entire node pack fails to load with:
This breaks LTXVideo for anyone on a current kornia build.
Fix
That
padwas only ever a re-export oftorch.nn.functional.pad. The modulealready imports
torch.nn.functional as Fand usestorch.nn.functional.paddirectly elsewhere in the same file, so the swap is behavior-identical:
padfrom the kornia import block.pad(...)calls withF.pad(...)in_pad_for_laplacianand_gaussian_pyramid.No functional change —
F.padand the old korniapadare the same functionwith the same signature. Tested locally; node imports and runs cleanly.