Repository navigation
Conversation
Contributor
Author
|
@cubic-dev-ai review |
Contributor
@CyMule I have started the AI code review. It will take a few minutes to complete. |
Contributor
There was a problem hiding this comment.
No issues found across 4 files
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
Re-trigger cubic
CyMule
force-pushed
the
perf/pdf-render-once
branch
from
October 28, 2026 16:30
11bba46 to
fce0680
Compare
CyMule
marked this pull request as ready for review
November 10, 2026 16:53
CyMule
force-pushed
the
perf/pdf-render-once
branch
from
November 10, 2026 16:53
fce0680 to
d58479f
Compare
Contributor
There was a problem hiding this comment.
All reported issues were addressed across 3 files
Shadow auto-approve: would not auto-approve because issues were found.
View guided diff | Re-trigger cubic
Contributor
There was a problem hiding this comment.
0 issues found across 3 files (changes from recent commits).
Shadow auto-approve: would not auto-approve. This PR does not meet the repository auto-approval settings.
View guided diff | Re-trigger cubic
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.
What
DocumentLayout.from_fileandprocess_file_with_modelacceptimage_paths: page images the caller already rendered from the PDF. When given, the PDF is not rendered again, and each page keeps its path, so later page operations (such asannotate) read the caller's image instead of re-rendering.Nothing changes for callers that don't pass it. Pages rendered internally still keep no path, since their temporary directory is deleted on return.
Why
A hi_res request renders every page of the PDF several times: once here for layout inference, then again in
unstructuredfor OCR and once more per extracted image type. Each render is the same work (same dpi, same pages), so the only way to stop paying for it twice is to let the caller hand the pages in.Release
Listed under 1.6.18, which is on
mainand not yet released. The pairedunstructuredPR (Unstructured-IO/unstructured#4530) can pin it after 1.6.18 is published.Validation
image_pathsskips the render and is kept on each page;process_file_with_modelforwards it; internally rendered pages keep no path. The path test fails without the change.unstructuredPR.