Skip to content

fix: lightonocr does not require longest edge to always be 1540, native resolution is the default - #30600

Merged
ngxson merged 1 commit into
ggml-org:masterfrom
staghado:fix/lightonocr-longest-edge-cap
Oct 15, 2026
Merged

ngxson merged 1 commit into
ggml-org:masterfrom
staghado:fix/lightonocr-longest-edge-cap

Conversation

@staghado

Copy link
Copy Markdown
Contributor

Overview

Current code for resizing LightOnOCR models upscales images below the cap until their longest edge is 1540. The expected behavior is to use native resolution below that cap, which is important for performance.

A 463x463 image currently becomes 1540x1540. With this fix it becomes 476x476 after patch alignment. The regression test covers small and large images.

Requirements

  • I have read and agree with the contributing guidelines
  • AI usage disclosure: Codex assisted with the code and regression test.

…ve resolution is the default

Assisted-by: Codex
@staghado
staghado requested review from a team and ggerganov as code owners October 15, 2026 13:24
@github-actions github-actions Bot added testing Everything test related mtmd Related to multimodal functionality (video/image/audio) labels Oct 15, 2026
@ngxson
ngxson merged commit 2f729cf into ggml-org:master Oct 15, 2026
12 checks passed
edwardyoon pushed a commit to edwardyoon/focus-llama that referenced this pull request Oct 24, 2026
auRose94 pushed a commit to auRose94/llama.cpp that referenced this pull request Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

mtmd Related to multimodal functionality (video/image/audio) testing Everything test related

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants