Open
Description
Env
- macOS 15, M-series Mac
- Python 3.13.3 (Homebrew)
- marker-pdf 1.7.2 (
pipx install marker-pdf[full]
) - torch 2.7.0
Repro
> GOOGLE_API_KEY=... marker_single 'filename.pdf' --output_format markdown --use_llm --format_lines
Recognizing layout: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 8/8 [00:09<00:00, 1.18s/it]
LLM layout relabelling: 3it [00:01, 2.14it/s]
Running OCR Error Detection: 100%|███████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:00<00:00, 17.09it/s]
Detecting bboxes: 100%|██████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████| 12/12 [00:05<00:00, 2.35it/s]
Recognizing Text: 3%|████▉ | 53/2032 [00:10<05:06, 6.45it/s]
zsh: segmentation fault GOOGLE_API_KEY=... marker_single
/opt/homebrew/Cellar/python@3.13/3.13.3_1/Frameworks/Python.framework/Versions/3.13/lib/python3.13/multiprocessing/resource_tracker.py:301: UserWarning: resource_tracker: There appear to be 1 leaked semaphore objects to clean up at shutdown: {'/loky-16920-_odxfu43'}
warnings.warn(
Work-arounds
TORCH_DEVICE=cpu marker_single …
→ works (no GPU).- Reinstall on Python 3.12:
pipx reinstall marker-pdf --python python3.12
→ works with MPS.
Likely Cause
Torch 2.3 MPS backend is still unstable on Python 3.13; Marker’s multi-process OCR hits a semaphore bug.
Suggestion
- Warn or auto-set
TORCH_DEVICE=cpu
when running on py 3.13 + macOS, or - Pin
requires-python
to < 3.13 until Torch fixes MPS.
Metadata
Metadata
Assignees
Labels
No labels