Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions docs/source/en/_toctree.yml
Original file line number Diff line number Diff line change
Expand Up @@ -379,6 +379,8 @@
title: Krea2Transformer2DModel
- local: api/models/latte_transformer3d
title: LatteTransformer3DModel
- local: api/models/llada_image_transformer2d
title: LLaDA-Image
- local: api/models/longcat_image_transformer2d
title: LongCatImageTransformer2DModel
- local: api/models/ltx2_video_transformer3d
Expand Down Expand Up @@ -617,6 +619,8 @@
title: Latent Diffusion
- local: api/pipelines/ledits_pp
title: LEDITS++
- local: api/pipelines/llada_image
title: LLaDA-Image
- local: api/pipelines/longcat_image
title: LongCat-Image
- local: api/pipelines/lumina2
Expand Down
23 changes: 23 additions & 0 deletions docs/source/en/api/models/llada_image_transformer2d.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# LLaDA-Image

The LLaDA-Image model family combines a denoising transformer with a QueryFormer, text projection model, and SigVQ
image tokenizer. Together, these components support text-to-image generation, VQ-conditioned generation, and
instruction-guided image editing.

The original code and checkpoints are available in the [LLaDA-Image repository](https://github.com/inclusionAI/LLaDA-Image).

## LLaDAImageTransformer2DModel

[[autodoc]] LLaDAImageTransformer2DModel

## LLaDAImageQueryFormerModel

[[autodoc]] LLaDAImageQueryFormerModel

## LLaDAImageTextProjectionModel

[[autodoc]] LLaDAImageTextProjectionModel

## LLaDAImageSigVQModel

[[autodoc]] LLaDAImageSigVQModel
57 changes: 57 additions & 0 deletions docs/source/en/api/pipelines/llada_image.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# LLaDA-Image

[LLaDA-Image](https://huggingface.co/inclusionAI/LLaDA-Image) is a unified image generation and editing model. The
same pipeline supports text-to-image generation, VQ-conditioned generation, and instruction-guided editing with a
reference image. The Base checkpoint is designed for 50 sampling steps, while
[LLaDA-Image-Turbo](https://huggingface.co/inclusionAI/LLaDA-Image-Turbo) is distilled for 4 steps.

The checkpoint includes a custom LLaDA2 text encoder, so pass `trust_remote_code=True` when loading it.

```python
import torch

from diffusers import LLaDAImagePipeline

pipe = LLaDAImagePipeline.from_pretrained(
"inclusionAI/LLaDA-Image",
dtype=torch.bfloat16,
trust_remote_code=True,
)
pipe.enable_model_cpu_offload()

image = pipe(
prompt="A cinematic photograph of a red fox standing in fresh snow",
height=1024,
width=1024,
num_inference_steps=50,
guidance_scale=5.0,
generator=torch.Generator("cuda").manual_seed(42),
).images[0]
```

For image editing, pass a reference image and select the editing mode.

```python
from diffusers.utils import load_image

reference_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png")
image = pipe(
prompt="Turn it into a watercolor painting",
image=reference_image,
generation_mode="editing",
height=1024,
width=1024,
num_inference_steps=50,
guidance_scale=5.0,
).images[0]
```

## LLaDAImagePipeline

[[autodoc]] LLaDAImagePipeline
- all
- call

## LLaDAImagePipelineOutput

[[autodoc]] pipelines.LLaDAImagePipelineOutput
12 changes: 12 additions & 0 deletions src/diffusers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -309,6 +309,10 @@
"Kandinsky5Transformer3DModel",
"Krea2Transformer2DModel",
"LatteTransformer3DModel",
"LLaDAImageQueryFormerModel",
"LLaDAImageSigVQModel",
"LLaDAImageTextProjectionModel",
"LLaDAImageTransformer2DModel",
"LongCatAudioDiTTransformer",
"LongCatAudioDiTVae",
"LongCatImageTransformer2DModel",
Expand Down Expand Up @@ -727,6 +731,8 @@
"LEditsPPPipelineStableDiffusionXL",
"LLaDA2Pipeline",
"LLaDA2PipelineOutput",
"LLaDAImagePipeline",
"LLaDAImagePipelineOutput",
"LongCatAudioDiTPipeline",
"LongCatImageEditPipeline",
"LongCatImagePipeline",
Expand Down Expand Up @@ -1191,6 +1197,10 @@
Kandinsky5Transformer3DModel,
Krea2Transformer2DModel,
LatteTransformer3DModel,
LLaDAImageQueryFormerModel,
LLaDAImageSigVQModel,
LLaDAImageTextProjectionModel,
LLaDAImageTransformer2DModel,
LongCatAudioDiTTransformer,
LongCatAudioDiTVae,
LongCatImageTransformer2DModel,
Expand Down Expand Up @@ -1584,6 +1594,8 @@
LEditsPPPipelineStableDiffusionXL,
LLaDA2Pipeline,
LLaDA2PipelineOutput,
LLaDAImagePipeline,
LLaDAImagePipelineOutput,
LongCatAudioDiTPipeline,
LongCatImageEditPipeline,
LongCatImagePipeline,
Expand Down
10 changes: 10 additions & 0 deletions src/diffusers/models/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,6 +131,12 @@
_import_structure["transformers.transformer_joyimage_edit_plus"] = ["JoyImageEditPlusTransformer3DModel"]
_import_structure["transformers.transformer_kandinsky"] = ["Kandinsky5Transformer3DModel"]
_import_structure["transformers.transformer_krea2"] = ["Krea2Transformer2DModel"]
_import_structure["transformers.transformer_llada_image"] = [
"LLaDAImageQueryFormerModel",
"LLaDAImageSigVQModel",
"LLaDAImageTextProjectionModel",
"LLaDAImageTransformer2DModel",
]
_import_structure["transformers.transformer_longcat_audio_dit"] = ["LongCatAudioDiTTransformer"]
_import_structure["transformers.transformer_longcat_image"] = ["LongCatImageTransformer2DModel"]
_import_structure["transformers.transformer_ltx"] = ["LTXVideoTransformer3DModel"]
Expand Down Expand Up @@ -273,6 +279,10 @@
Kandinsky5Transformer3DModel,
Krea2Transformer2DModel,
LatteTransformer3DModel,
LLaDAImageQueryFormerModel,
LLaDAImageSigVQModel,
LLaDAImageTextProjectionModel,
LLaDAImageTransformer2DModel,
LongCatAudioDiTTransformer,
LongCatImageTransformer2DModel,
LTX2VideoTransformer3DModel,
Expand Down
6 changes: 6 additions & 0 deletions src/diffusers/models/transformers/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,12 @@
from .transformer_joyimage_edit_plus import JoyImageEditPlusTransformer3DModel
from .transformer_kandinsky import Kandinsky5Transformer3DModel
from .transformer_krea2 import Krea2Transformer2DModel
from .transformer_llada_image import (
LLaDAImageQueryFormerModel,
LLaDAImageSigVQModel,
LLaDAImageTextProjectionModel,
LLaDAImageTransformer2DModel,
)
from .transformer_longcat_audio_dit import LongCatAudioDiTTransformer
from .transformer_longcat_image import LongCatImageTransformer2DModel
from .transformer_ltx import LTXVideoTransformer3DModel
Expand Down
Loading
Loading