MinerU-Diffusion
[ECCV 2026] A diffusion-based framework for document OCR that replaces autoregressive decoding with block-level parallel diffusion decoding.
File Explorer
Download Latest Version (.zip)- banner.png
- decode.png
- homepage-demo.mp4
- huggingface_paper_gold_day.svg
- image.png
- performance_tradeoff.jpeg
- train.png
- __init__.py
- config.py
- demo_app.py
- inference.py
- parsers.py
- preview_renderers.py
- render.py
- .gitignore
- app.py
- diffusion_hf.py
- mineru_hf.py
- runtime_paths.example.json
- mineru_request.py
- README.md
- run_infer.sh
- run_server.sh
- MinerU-Diffusion-V1.pdf
- __init__.py
- runner.py
- 000000__text_block__anno1.txt
- 000001__text_block__anno2.txt
- 000002__text_block__anno3.txt
- 000003__text_block__anno4.txt
- 000004__equation_isolated__anno5.txt
- 000005__text_block__anno6.txt
- 000006__text_block__anno7.txt
- 000007__header__anno8.txt
- 000008__page_number__anno9.txt
- block_manager.py
- llm_engine.py
- model_runner.py
- scheduler.py
- sequence.py
- __init__.py
- block_prefill_attention_v2.py
- activation.py
- attention.py
- embed_head.py
- layernorm.py
- linear.py
- rotary_embedding.py
- sampler.py
- sdar_attention.py
- dmllm.py
- qwen2_vit.py
- sdar.py
- processor.py
- context.py
- loader.py
- __init__.py
- config.py
- llm.py
- sampling_params.py
- .gitignore
- __init__.py
- bench.py
- example.py
- LICENSE
- pyproject.toml
- __init__.py
- __init__.py
- __init__.py
- bbox.py
- __init__.py
- configuration_mineru_diffusion.py
- modeling_mineru_diffusion.py
- processing_mineru_diffusion.py
- run_end2end.py
- run_end2end.sh
- run_inference.py
- run_inference.sh
- run_sglang_server.sh
- .gitignore
- LICENSE
- README.md
- requirements.txt
# Installation Guide
git clone https://github.com/opendatalab/MinerU-Diffusion
Downloads the entire project code from GitHub to your computer.
cd MinerU-Diffusion
Moves into the project folder you just downloaded.
2. Official Install Script
Easy Recommended- Python 3 Python is required to use pip.
pip install --upgrade pip
Installs the package published on PyPI directly β no need to clone the source.
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
Installs the package published on PyPI directly β no need to clone the source.
pip install "transformers>=4.52.1"
Installs the package published on PyPI directly β no need to clone the source.
pip install flash_attn-2.8.3+cu12torch2.8cxx11abiFALSE-cp312-cp312-linux_x86_64.whl
Installs the package published on PyPI directly β no need to clone the source.
Pulled directly from this repo's README.
3. Python
Easypip install --upgrade pip
Installs the package published on PyPI directly β no need to clone the source.
pip install torch==2.8.0 torchvision==0.23.0 torchaudio==2.8.0 --index-url https://download.pytorch.org/whl/cu128
Installs the package published on PyPI directly β no need to clone the source.
pip install "transformers>=4.52.1"
Installs the package published on PyPI directly β no need to clone the source.
pip install flash_attn-2.8.3+cu12torch2.8cxx11abiFALSE-cp312-cp312-linux_x86_64.whl
Installs the package published on PyPI directly β no need to clone the source.
pip install -r requirements.txt
Installs the Python libraries listed in requirements.txt (or similar).
Pulled directly from this repo's README.
