fix: update pipeline setup to handle immutable OCROptions correctly

Co-authored-by: aider (openrouter/anthropic/claude-sonnet-4) <aider@aider.chat>
This commit is contained in:
James R. Barlow
2025-12-21 12:21:47 -08:00
co-authored by aider
parent dab969f97d
commit 3987a610e1
+2 -2
View File
@@ -315,8 +315,8 @@ def setup_pipeline(
# Any changes to options will not take effect for options that are already
# bound to function parameters in the pipeline. (For example
# options.input_file, options.pdf_renderer are already bound.)
if not options.jobs:
options.jobs = available_cpu_count()
# Note: OCROptions is immutable, so we can't modify options.jobs directly
# The jobs field should already be set correctly during OCROptions creation
# Apply PIL max image pixels side effect
PIL.Image.MAX_IMAGE_PIXELS = int(options.max_image_mpixels * 1_000_000)