corsairnui/Unlimited-OCR-AMD-Strix-Halo
Unlimited-OCR AMD Strix Halo
AMD Strix Halo / ROCm packaging for baidu/Unlimited-OCR.
Original model: baidu/Unlimited-OCR.
This repository keeps the Unlimited-OCR model files at the root and adds a small ROCm runner for Ryzen AI Max+ 395 / Radeon 8060S systems. The goal is simple: make Unlimited-OCR practical to run locally on AMD Strix Halo.
This is a community package. It is not an official Baidu release and is not an official Corsair release.
Included
- Unlimited-OCR config, tokenizer, model code, assets, paper, license, wheel, and safetensors weight file.
scripts/run_ocr_rocm.pyfor image and PDF OCR.scripts/rocm_container.shfor the ROCm PyTorch container.scripts/setup_container_env.shfor OCR dependencies without replacing the ROCm PyTorch build.scripts/smoke_test.shfor a local smoke test.docs/AMD_VALIDATION.mdfor the validation snapshot from the tested machine.
Tested Machine
- CPU/APU: AMD Ryzen AI Max+ 395 w/ Radeon 8060S
- GPU target:
gfx1151 - Container:
docker.io/rocm/pytorch:rocm7.2.1_ubuntu24.04_py3.12_pytorch_release_2.9.1 - PyTorch observed locally:
2.9.1+rocm7.2.1.gitff65f5bc - HIP observed locally:
7.2.53211-e1a6bc5663 - Transformers:
4.57.1
Setup
git clone https://huggingface.co/corsairnui/Unlimited-OCR-AMD-Strix-Halo
cd Unlimited-OCR-AMD-Strix-Halo
bash scripts/rocm_container.sh bash scripts/setup_container_env.shVerify device access:
bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/verify_rocm.py'Run OCR
Single image:
bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/make_sample_image.py'
bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/run_ocr_rocm.py --image samples/strix_halo_ocr_sample.png --output-dir results/my_image --mode base --image-size 512 --max-length 2048'PDF, practical profile:
bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/run_ocr_rocm.py --pdf document.pdf --pdf-strategy pages --quality-profile excellent --quality-target 0.80 --excellent-pdf-dpi 220 --excellent-image-size 1024 --output-dir results/my_pdf --image-size 512 --pdf-dpi 120 --max-length 4096 --retry-image-size 1024 --retry-pdf-dpi 160'PDF, high-quality profile:
bash scripts/rocm_container.sh bash -lc 'PYTHONPATH=$PWD/.deps:$PYTHONPATH python scripts/run_ocr_rocm.py --pdf document.pdf --pdf-strategy pages --quality-profile high-quality --output-dir results/my_high_quality_pdf --image-size 1024 --pdf-dpi 300 --max-length 32768 --ngram-window 1024 --retry-image-size 1024 --retry-pdf-dpi 300'Smoke test:
bash scripts/rocm_container.sh bash scripts/smoke_test.shValidation Snapshot
Core public PDF benchmark, excellent profile:
High-quality representative subset:
Notes
This is a community AMD packaging of the upstream MIT-licensed Unlimited-OCR model. Runtime quality depends on document type, scan quality, PDF rendering settings, available memory, and ROCm/PyTorch versions.
