inclusionAI/LLaDA-Image
- License
- apache-2.0
- Size
- 46 GB
- Revision
- main
Mirrored from inclusionAI/LLaDA-Image
All models by inclusionAI →Mirrored from inclusionAI/LLaDA-Image
All models by inclusionAI →git clone https://github.com/inclusionAI/LLaDA-Image.gitcd LLaDA-Image
conda create -n llada-image python=3.11 -yconda activate llada-image
pip install -r requirements.txtimport 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")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")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]@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}}