Skip to content

fix: use torch padding for kornia 0.8 compatibility#508

Open
Nianze Wu (wunianze666-netizen) wants to merge 1 commit into
Lightricks:masterfrom
wunianze666-netizen:fix/kornia-pad-compatibility
Open

fix: use torch padding for kornia 0.8 compatibility#508
Nianze Wu (wunianze666-netizen) wants to merge 1 commit into
Lightricks:masterfrom
wunianze666-netizen:fix/kornia-pad-compatibility

Conversation

@wunianze666-netizen

Copy link
Copy Markdown

Summary

This PR fixes pyramid_blending.py for newer Kornia versions where kornia.geometry.transform.pyramid.pad is no longer importable.

Problem

With Kornia 0.8.3, importing pad from kornia.geometry.transform.pyramid raises an ImportError, which prevents the node module from loading.

Changes

  • stop importing pad from Kornia's pyramid module
  • use torch.nn.functional.pad() for the existing reflect padding paths instead

Verification

  • python -m py_compile pyramid_blending.py

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant