HuggingFace镜像/LLaDA-Image
模型介绍
文件和版本
分析

LLaDA-Image:以完全开放的训练配方构建强大图像生成器

欢迎来到 LLaDA-Image 官方仓库,这是一个用于高质量图像生成与编辑的统一模型。

GitHub arXiv
Hugging Face 上的 LLaDA-Image Base Hugging Face 上的 LLaDA-Image Base FP8 版本 Hugging Face 上的 LLaDA-Image Turbo Hugging Face 上的 LLaDA-Image Turbo FP8 版本
Modelscope 上的 LLaDA-Image Base Modelscope 上的 LLaDA-Image Base FP8 版本 Modelscope 上的 LLaDA-Image Turbo Modelscope 上的 LLaDA-Image Turbo FP8 版本

LLaDA-Image 写实图像生成展示 具备自然光照、逼真细节与连贯场景的写实图像生成。

LLaDA-Image 文本渲染与海报生成展示 跨多种视觉风格的高质量文本渲染与创意海报生成。

LLaDA-Image 编辑展示 指令驱动的图像编辑,在忠实保留内容的基础上实现精准视觉修改。

简介

LLaDA-Image 是一个具备竞争力的 60 亿参数开源统一图像生成与编辑模型家族。它包括 LLaDA-Image——用于高质量文生图与指令引导编辑的 50 步 Base 模型,以及 LLaDA-Image-Turbo——用于快速生成与编辑的 4 步蒸馏模型。两种变体均支持实用级文生图、VQ 条件生成、参考图编辑以及中英文文字渲染。

本仓库提供 LLaDA-Image 模型家族的模型权重以及基于 Diffusers 的推理代码。

最新动态

  • 2026-09-04: 我们发布了 LLaDA-Image Base 与 Turbo 模型权重,以及推理代码。

亮点

  • 统一生成与编辑。 单个模型权重即可支持文生图与保留参考图、指令引导的编辑,无需独立的编辑骨干。
  • 统一扩散模型。 骨干与 DiT 均为扩散模型,并在统一框架中训练。
  • 真实感图像生成。 LLaDA-Image 能够生成具有丰富视觉细节、自然光照和连贯构图的高品质图像。
  • 面向视觉先验学习的仅图像预训练。 该报告在引入成对语言监督和生成-编辑联合训练之前,通过仅图像预训练与中期训练建立视觉先验。
  • 基于蒸馏模型的高效推理。 LLaDA-Image-Turbo 采用 Twin-DMD 蒸馏,仅需 2-4 个采样步即可实现快速图像生成与编辑。
  • 在 Qwen-Image-Bench 上取得 SOTA。 LLaDA-Image 的英文总分达到 53.53,中文总分达到 53.38。

Qwen-image 基准评测

模型库

模型描述采样步数Hugging Face(模型权重)ModelScope(模型权重)
LLaDA-Image用于高保真文生图与指令引导编辑的基础模型。50BF16: inclusionAI/LLaDA-Image
FP8: inclusionAI/LLaDA-Image-FP8
BF16: inclusionAI/LLaDA-Image
FP8: inclusionAI/LLaDA-Image-FP8
LLaDA-Image-Turbo用于快速生成与编辑的蒸馏模型。4BF16: inclusionAI/LLaDA-Image-Turbo
FP8: inclusionAI/LLaDA-Image-Turbo-FP8
BF16: inclusionAI/LLaDA-Image-Turbo
FP8: inclusionAI/LLaDA-Image-Turbo-FP8

开源计划

  • 推理代码与模型权重
  • 训练代码(即将发布)

快速开始

1. 创建环境

该实现适用于 Python 3.11、PyTorch 2.8、Transformers 4.57.6 和 Diffusers 0.39.0。

git clone https://github.com/inclusionAI/LLaDA-Image.git
cd LLaDA-Image

conda create -n llada-image python=3.11 -y
conda activate llada-image

pip install -r requirements.txt

2. 运行推理

该流水线可接收提示词,编辑时还可传入一个可选的参考图像。

LLaDA-Image (Base)

请使用 Base 检查点进行高保真生成与编辑。其推荐采样配置为 50 步。

import torch

from src import LLaDAImagePipeline

# Load the pipeline. The model is downloaded from Hugging Face on first use.
pipe = LLaDAImagePipeline.from_pretrained(
    "inclusionAI/LLaDA-Image",
    torch_dtype=torch.bfloat16,
    device="cuda",
)

# Generate an image.
prompt = (
    "A cinematic photograph of a red fox standing in fresh snow, "
    "soft winter light, detailed fur, shallow depth of field"
)
negative_prompt = ""

image = pipe(
    prompt=prompt,
    negative_prompt=negative_prompt,
    generation_mode="text",
    height=1024,
    width=1024,
    num_inference_steps=50,
    guidance_scale=5.0,
    generator=torch.Generator("cuda").manual_seed(42),
).images[0]

image.save("llada-image-base.png")

LLaDA-Image-Turbo

使用 Turbo 检查点进行快速生成和编辑。其推荐的采样配置为 4 步。

[!NOTE] 在 LLaDA-Image-Turbo 推理过程中,可以尝试将 scheduler/scheduler_config.json 中的 stochastic_sampling 设置为 false,在某些情况下可能获得更清晰的细节。

import torch

from src import LLaDAImagePipeline

# Load the distilled Turbo checkpoint.
pipe = LLaDAImagePipeline.from_pretrained(
    "inclusionAI/LLaDA-Image-Turbo",
    torch_dtype=torch.bfloat16,
    device="cuda",
)

prompt = "A quiet observatory above a sea of clouds at sunrise, golden light, wide-angle photograph"

image = pipe(
    prompt=prompt,
    generation_mode="text",
    height=1024,
    width=1024,
    num_inference_steps=4,
    guidance_scale=1.0,
    generator=torch.Generator("cuda").manual_seed(42),
).images[0]

image.save("llada-image-turbo.png")

生成模式

两个检查点均支持以下模式。文本生成和 VQ 条件生成要求高度与宽度均可被 16 整除;图像编辑要求尺寸可被 32 整除。

VQ 条件生成 会使用 LLaDA2 模型根据提示词生成图像 VQ tokens,随后由 SigVQ 在扩散前进行嵌入。请勿在 VQ 模式下提供输入图像。

image = pipe(
    prompt="A quiet observatory above a sea of clouds at sunrise",
    generation_mode="vq",
    height=1024,
    width=1024,
    num_inference_steps=50,  # Use 4 for LLaDA-Image-Turbo.
    guidance_scale=5.0,  # Use 1.0 for few-step inference.
    generator=torch.Generator("cuda").manual_seed(42),
).images[0]

图像编辑需要一张参考图像:

from diffusers.utils import load_image

reference_image = load_image("/path/to/input.png")
image = pipe(
    prompt="Turn it into a watercolor painting",
    image=reference_image,
    generation_mode="editing",
    height=1024,
    width=1024,
    num_inference_steps=50,  # Use 4 for LLaDA-Image-Turbo.
    guidance_scale=5.0,  # Use 1.0 for few-step inference.
    generator=torch.Generator("cuda").manual_seed(43),
).images[0]

引用

如果你在研究或应用中发现 LLaDA-Image 有帮助,请考虑引用我们的工作。

@article{LLaDAImage,
title = {LLaDA-Image: Building Strong Image Generators with Fully Open Training Recipes},
author = {Chuyan Chen and Haoxing Chen and Kun Chen and Zhenglin Cheng and Long Cui and Ruishan Fang and Zhangxuan Gu and Zhicheng Huang and Zhenzhong Lan and Yuanting Lei and Haoquan Li and Jianguo Li and Rongchuan Li and Sidu Li and Tao Lin and Deyuan Liu and Jiacheng Liu and Lin Liu and Yuxuan Lou and Zhisheng Lu and Yuxin Ma and Shuheng Shen and Peng Sun and Chaoyang Wang and Hongjun Wang and Xiaomei Wang and Yongxin Wang and Chengzhang Wu and Hongru Wu and Jun Xie},
journal = {arXiv preprint arXiv:2609.03796},
year = {2026}
}