diff --git a/src/ocrmypdf/_pipelines/_common.py b/src/ocrmypdf/_pipelines/_common.py index 33d3728c..b371e5d0 100644 --- a/src/ocrmypdf/_pipelines/_common.py +++ b/src/ocrmypdf/_pipelines/_common.py @@ -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)