fix: workaround PyTorch 2.6 torch.load incompatibility in ns-export - #222
Merged
crowecawcaw merged 2 commits intoMay 19, 2026
Conversation
Signed-off-by: Anika Suman <anika-suman-amazon@users.noreply.github.com>
Cherie-Chen
approved these changes
May 15, 2026
crowecawcaw
approved these changes
May 19, 2026
crowecawcaw
enabled auto-merge (squash)
May 19, 2026 19:44
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: nerfstudio-project/nerfstudio#3711
What was the problem/requirement? (What/Why)
NeRF Studio's
ns-exportfails on PyTorch 2.6+ becausetorch.loadnow defaults toweights_only=True, rejecting numpy globals in the checkpoint file.What was the solution? (How)
Monkey-patch
torch.loadwithweights_only=Falsebefore calling the exporter, by invokingns-exportfrom within Python instead of as a shell command.What is the impact of this change?
The NERFSTUDIO (splatfacto) trainer now produces a .ply file end-to-end when using the conda-forge nerfstudio package with PyTorch 2.6+.
How was this change tested?
Submitted the gsplat_pipeline job to a Deadline Cloud farm with a g5.4xlarge GPU fleet. Verified the full pipeline completes successfully: frame extraction, SfM solve, training (30,000 steps), and .ply export. Downloaded and viewed the output in SuperSplat.
Was this change documented?
Yes. Added a "Known issues" subsection to the README documenting the PyTorch 2.6 workaround, the custom package requirement for GSPLAT_SIMPLE_TRAINER/NERFSTUDIO_SPLATFACTOW, and simplified prerequisites for the default trainer.
By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.