Merge upstream RoMaV2 v2.0.1 into main (+ fork adaptations)#3
Merged
Conversation
Removed dataclasses dependency from project.
Integrates upstream RoMaV2 v2.0.1 with our PolyCam fork changes. Upstream changes brought in: - refiner.py: fix local_correlation to use raw f_B instead of warped f_BA (correctness fix); rename f_B_bdhw -> f_BA_bdhw for clarity - romav2.py: new v2.0.1 weights URL, add map_location=device on weights load, flip Cfg.compile default True -> False - pyproject.toml: drop obsolete dataclasses backport, promote fused-local-corr from optional extra to core Linux dependency, bump version to 2.0.1 Our local changes preserved (non-overlapping, auto-merged): - torch.profiler.record_function instrumentation across the forward pass - cache_features / cache_batch_features / coarse_cached_match / coarse_match batch-matching methods Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Upstream promoted fused-local-corr from an optional extra to a core Linux dependency (installed automatically by uv sync), so the '--extra fused-local-corr' / romav2[fused-local-corr] instructions are no longer valid. Document the new auto-install behavior instead. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Upstream flipped the RoMaV2 Cfg.compile default from True to False, so the bare RoMaV2() in batch_match.py silently stopped compiling and the production throughput path regressed. match() always interpolates inputs to fixed (H_lr/W_lr, H_hr/W_hr) sizes, so torch.compile compiles once and reuses the graph across all pairs -- a real throughput win with no recompilation. Restore compiled behavior by default and expose --no-compile for profiling/tracing runs (torch.compile graph capture hides the record_function annotations). batch_match_min.py is left on compile=False intentionally: its cached path batches a variable number of images, which would force a recompile per unique batch size. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
Merges upstream RoMaV2 v2.0.1 into the fork and applies small fork-side adjustments to keep docs and batch-matching throughput behavior consistent with the upstream defaults.
Changes:
- Updated model defaults and weight loading (Cfg.compile default
True → False, new v2.0.1 weights URL, andmap_location=deviceon load). - Fixed refiner local correlation input to use raw
f_B(not warpedf_BA) while keeping warped features for the main refinement tensor. - Fork adaptations: README install guidance for fused-local-corr (now core on Linux), and
scripts/batch_match.pyadds--no-compileto keep compilation enabled by default for throughput.
Reviewed changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| src/romav2/romav2.py | Updates compile default and weight download/loading behavior for v2.0.1. |
| src/romav2/refiner.py | Corrects local correlation feature source during refinement. |
| scripts/batch_match.py | Restores compiled throughput path via explicit CLI control (--no-compile). |
| README.md | Updates fused-local-corr installation instructions to match new dependency behavior. |
| pyproject.toml | Bumps version to 2.0.1 and promotes fused-local-corr to core Linux dependency. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
markcamera
approved these changes
Jun 18, 2026
markcamera
left a comment
Collaborator
There was a problem hiding this comment.
The changes look fine to my eyes. 👍
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.
Summary
Merges upstream Parskatt/RoMaV2
main(v2.0.1) into our fork, plus two smallfork-side adaptations so our scripts benefit from the upstream changes.
Upstream changes pulled in (v2.0.1)
Fork adaptations in this PR
--extra fused-local-corrflag no longer exists — it's auto-installed on Linux now)--no-compileflag (default compile=True); the upstream default flip had silently disabled compilationPreserved local work (auto-merged, no conflicts)
Follow-ups (not in this PR)
uv syncto pull the fused kernel