Skip to content

Merge upstream RoMaV2 v2.0.1 into main (+ fork adaptations)#3

Merged
cdcseacave merged 6 commits into
mainfrom
merge/upstream-main
Jun 19, 2026
Merged

Merge upstream RoMaV2 v2.0.1 into main (+ fork adaptations)#3
cdcseacave merged 6 commits into
mainfrom
merge/upstream-main

Conversation

@cdcseacave

Copy link
Copy Markdown

Summary

Merges upstream Parskatt/RoMaV2 main (v2.0.1) into our fork, plus two small
fork-side adaptations so our scripts benefit from the upstream changes.

Upstream changes pulled in (v2.0.1)

  • refiner.py: local_correlation correctness fix (raw f_B, not warped f_BA)
  • romav2.py: new v2.0.1 weights URL, map_location=device on load, Cfg.compile default True→False
  • pyproject.toml: drop obsolete dataclasses backport; fused-local-corr promoted to core Linux dep; bump to 2.0.1

Fork adaptations in this PR

  • docs: rewrite README "Fused local correlation kernel" section (the --extra fused-local-corr flag no longer exists — it's auto-installed on Linux now)
  • scripts/batch_match.py: restore compiled throughput path via explicit --no-compile flag (default compile=True); the upstream default flip had silently disabled compilation

Preserved local work (auto-merged, no conflicts)

  • torch.profiler instrumentation + cache_features / coarse_match batch-matching methods

Follow-ups (not in this PR)

  • Rebuild CUDA Docker image / re-run uv sync to pull the fused kernel
  • Re-validate batch_match outputs against the new v2.0.1 weights + refiner fix

Parskatt and others added 5 commits April 4, 2026 18:47
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>

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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, and map_location=device on load).
  • Fixed refiner local correlation input to use raw f_B (not warped f_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.py adds --no-compile to 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.

Comment thread src/romav2/refiner.py

@markcamera markcamera left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The changes look fine to my eyes. 👍

@cdcseacave cdcseacave merged commit 626acfb into main Jun 19, 2026
@cdcseacave cdcseacave deleted the merge/upstream-main branch June 19, 2026 15:45
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.

6 participants