Skip to content

mtmd: preserve tiled chunk geometry and reference resize rounding - #456

Closed
DmitryMalishev wants to merge 2 commits into
masterfrom
codex/mtmd-grid-rounding
Closed

DmitryMalishev wants to merge 2 commits into
masterfrom
codex/mtmd-grid-rounding

Conversation

@DmitryMalishev

Copy link
Copy Markdown

Overview

Valid tiled Qwen-style image requests can fail after the server creates a cached placeholder: serialization drops the tile grid, changing the restored token count and decoder positions. Preserve both grid dimensions and bump the chunk format version so incompatible saved chunks are rejected.

Dynamic image resizing also rounds half-way dimensions upward instead of using the reference processor's ties-to-even rule. Use integer rounding independent of the floating-point environment.

Additional information

  • Regression coverage: 1/2/3/4-tile chunk round trips, placeholder token/position equivalence, old-version rejection, truncated inputs, resize ties and adjacent dimensions, pixel budgets, and all four floating-point rounding modes. Keep C API assertions active in release builds.
  • Linux x64 / RTX 5090: all three mtmd test targets passed; a 100-request GPU server replay completed without errors (previously 13 failures); 14 batched requests and four CPU tile-grid controls passed.
  • Companion QVAC validation uses a temporary vcpkg overlay in packages/fabric and tests the runtime through the LLM addon and inference layer. Overlay and desktop CI validation are in progress; this PR remains draft until those checks complete.
  • Existing serialized chunk files must be recreated. Public model/addon APIs are unchanged.

Requirements

  • Human maintainer review against the contributing guidelines before merge.
  • AI usage disclosure: YES. Codex assisted implementation and local validation. Submitted for manual review.

@github-actions

Copy link
Copy Markdown

Review Status

Current Status: ❌ PENDING
Approvals so far: none

Pending reviews: Needs 1 Management or Team Lead, and 1 more from Management, Team Lead, or Member.

@DmitryMalishev

Copy link
Copy Markdown
Author

Superseded by #457, which applies the same focused fixes to the current shipping branch (temp-11259), preserving its existing model and backend support. Further overlay validation is tracked in #457 and tetherto/qvac#5489.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant