Instructions to use GSAI-ML/LLaDA-o with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use GSAI-ML/LLaDA-o with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-text-to-text", model="GSAI-ML/LLaDA-o") messages = [ { "role": "user", "content": [ {"type": "image", "url": "https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/p-blog/candy.JPG"}, {"type": "text", "text": "What animal is on the candy?"} ] }, ] pipe(text=messages)# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("GSAI-ML/LLaDA-o", dtype="auto") - Notebooks
- Google Colab
- Kaggle
- Local Apps
- vLLM
How to use GSAI-ML/LLaDA-o with vLLM:
Install from pip and serve model
# Install vLLM from pip: pip install vllm # Start the vLLM server: vllm serve "GSAI-ML/LLaDA-o" # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:8000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GSAI-ML/LLaDA-o", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker
docker model run hf.co/GSAI-ML/LLaDA-o
- SGLang
How to use GSAI-ML/LLaDA-o with SGLang:
Install from pip and serve model
# Install SGLang from pip: pip install sglang # Start the SGLang server: python3 -m sglang.launch_server \ --model-path "GSAI-ML/LLaDA-o" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GSAI-ML/LLaDA-o", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }'Use Docker images
docker run --gpus all \ --shm-size 32g \ -p 30000:30000 \ -v ~/.cache/huggingface:/root/.cache/huggingface \ --env "HF_TOKEN=<secret>" \ --ipc=host \ lmsysorg/sglang:latest \ python3 -m sglang.launch_server \ --model-path "GSAI-ML/LLaDA-o" \ --host 0.0.0.0 \ --port 30000 # Call the server using curl (OpenAI-compatible API): curl -X POST "http://localhost:30000/v1/chat/completions" \ -H "Content-Type: application/json" \ --data '{ "model": "GSAI-ML/LLaDA-o", "messages": [ { "role": "user", "content": [ { "type": "text", "text": "Describe this image in one sentence." }, { "type": "image_url", "image_url": { "url": "https://cdn.britannica.com/61/93061-050-99147DCE/Statue-of-Liberty-Island-New-York-Bay.jpg" } } ] } ] }' - Docker Model Runner
How to use GSAI-ML/LLaDA-o with Docker Model Runner:
docker model run hf.co/GSAI-ML/LLaDA-o
LLaDA-o
We introduce LLaDA-o, an effective and length-adaptive omni diffusion model for unified multimodal understanding and generation.
LLaDA-o extends diffusion language modeling to a broader multimodal setting, supporting both visual understanding and visual generation within a single framework. The released codebase provides a practical inference pipeline for interleaved text-image processing and a notebook-based workflow for reproducible experiments.
It was presented in the paper LLaDA-o: An Effective and Length-Adaptive Omni Diffusion Model.
Code: https://github.com/ML-GSAI/LLaDA-o
Highlights
- Unified multimodal modeling for both understanding and generation
- Support for text-to-image generation
- Support for image understanding
- Support for instruction-based image editing
- Reproducible inference workflow through
multimodal_demo.ipynb
Supported Tasks
The current release is designed for the following multimodal inference settings:
- Text-to-image: generate images from natural language prompts
- Image understanding: produce textual responses conditioned on an input image
- Image editing: edit an image according to a textual instruction
- Interleaved multimodal inference: process text and image context within a shared diffusion-based framework
Quick Start
Please first download the model checkpoint locally, then use the official repository for inference:
git clone https://github.com/ML-GSAI/LLaDA-o
cd LLaDA-o
bash init_env.sh
The recommended inference entry point is:
multimodal_demo.ipynb
In the notebook, set:
MODEL_PATH = "/path/to/local/GSAI-ML-LLaDA-o"
and run the cells sequentially to perform text-to-image generation, image understanding, and image editing.
Notes
- The current inference pipeline expects a local checkpoint path.
- The released demo is intended for GPU-based inference.
- For a complete inference workflow and implementation details, please refer to the official GitHub repository.
Citation
If you find LLaDA-o useful in your research, please consider citing:
@article{you2026lladao,
title={LLaDA-o: An Effective and Length-Adaptive Omni Diffusion Model},
author={You, Zebin and Zhang, Xiaolu and Zhou, Jun and Li, Chongxuan and Wen, Ji-Rong},
journal={arXiv preprint arXiv:2603.01068},
year={2026}
}
Contact
If you have any questions, please feel free to contact us at zebin@ruc.edu.cn.
docker model run hf.co/GSAI-ML/LLaDA-o