Views
No views yet
| INT8 | INT8 |
![]() | ![]() |
| FP8 | FP8 |
![]() | ![]() |
1import torch
2from diffusers import Lumina2Pipeline
3
4pipe = Lumina2Pipeline.from_pretrained("Alpha-VLLM/Lumina-Image-2.0", torch_dtype=torch.bfloat16)
5pipe.enable_model_cpu_offload() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power
6
7prompt = "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."
8image = pipe(
9 prompt,
10 height=1024,
11 width=1024,
12 guidance_scale=4.0,
13 num_inference_steps=50,
14 cfg_trunc_ratio=0.25,
15 cfg_normalization=True,
16 generator=torch.Generator("cpu").manual_seed(0)
17).images[0]
18image.save("lumina_demo.png")1@misc{lumina2,
2 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},
3 title={Lumina-Image 2.0: A Unified and Efficient Image Generative Framework},
4 year={2025},
5 eprint={2503.21758},
6 archivePrefix={arXiv},
7 primaryClass={cs.CV},
8 url={https://arxiv.org/pdf/2503.21758},
9}





text_encoder subfolder of Alpha-VLLM/Lumina-Image-2.0) with the layerwise fp8
storage cast Unsloth Studio applies at load time, saved pre-cast: