🚀 Lumina-Image 2.0
Lumina-Image 2.0是一個擁有20億參數、基於流的擴散變換器,能夠根據文本描述生成圖像。如需瞭解更多信息,請訪問我們的GitHub。
🚀 快速開始
體驗演示
我們提供了一個官方的Gradio演示。你可以使用我們提供的鏈接進行嘗試。
代碼使用
import torch
from diffusers import Lumina2Pipeline
pipe = Lumina2Pipeline.from_pretrained("Alpha-VLLM/Lumina-Image-2.0", torch_dtype=torch.bfloat16)
pipe.enable_model_cpu_offload()
prompt = "A serene photograph capturing the golden reflection of the sun on a vast expanse of water. The sun is positioned at the top center, casting a brilliant, shimmering trail of light across the rippling surface. The water is textured with gentle waves, creating a rhythmic pattern that leads the eye towards the horizon. The entire scene is bathed in warm, golden hues, enhancing the tranquil and meditative atmosphere. High contrast, natural lighting, golden hour, photorealistic, expansive composition, reflective surface, peaceful, visually harmonious."
image = pipe(
prompt,
height=1024,
width=1024,
guidance_scale=4.0,
num_inference_steps=50,
cfg_trunc_ratio=0.25,
cfg_normalization=True,
generator=torch.Generator("cpu").manual_seed(0)
).images[0]
image.save("lumina_demo.png")
這是論文 Lumina-Image 2.0: A Unified and Efficient Image Generative Framework 的Hugging Face Diffusers實現。
📄 許可證
本項目採用Apache 2.0許可證。
📚 引用
如果你發現提供的代碼或模型對你的研究有用,請考慮按以下方式引用:
@misc{lumina2,
author={Qi Qin and Le Zhuo and Yi Xin and Ruoyi Du and Zhen Li and Bin Fu and Yiting Lu and Xinyue Li and Dongyang Liu and Xiangyang Zhu and Will Beddow and Erwann Millon and Victor Perez,Wenhai Wang and Yu Qiao and Bo Zhang and Xiaohong Liu and Hongsheng Li and Chang Xu and Peng Gao},
title={Lumina-Image 2.0: A Unified and Efficient Image Generative Framework},
year={2025},
eprint={2503.21758},
archivePrefix={arXiv},
primaryClass={cs.CV},
url={https://arxiv.org/pdf/2503.21758},
}