This is an FP8 / INT8 quantized version of Lumina-Image-2.0.

  • Optimized for efficient inference with reduced memory footprint. Same-seed LPIPS vs the bf16 model (lower is better): 0.146 INT8, 0.116 FP8.

Samples

Prompt: "cute sloth typing on a computer"

INT8 INT8
FP8 FP8

Lumina-Image-2.0 is a 2 billion parameter flow-based diffusion transformer capable of generating images from text descriptions. For more information, visit our GitHub.

Gradio Demo

We provide an official Gradio demo. You can use the link we provided to try it out.

Usage

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() #save some VRAM by offloading the model to CPU. Remove this if you have enough GPU power

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")

This is a Hugging Face Diffusers implementation of the paper Lumina-Image 2.0: A Unified and Efficient Image Generative Framework.

Citation

If you find the provided code or models useful for your research, consider citing them as:

@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}, 
}

Quantized transformer checkpoints (this repo)

This repo adds pre-quantized diffusion transformer checkpoints for Alpha-VLLM/Lumina-Image-2.0, built with torchao dynamic activation quantization from the dense bf16 transformer. The official model card above is unchanged from the source repo.

Files:

  • Lumina-Image-2.0-INT8.pt (2.9 GB)
  • Lumina-Image-2.0-FP8.pt (2.6 GB)

Details:

  • int8: Int8DynamicActivationInt8WeightConfig (per-token activation, per-channel weight, torch._int_mm).
  • fp8: Float8DynamicActivationFloat8WeightConfig with PerRow granularity (e4m3, torch._scaled_mm). The loader must floor the dynamic activation scale (activation_value_lb=1e-12 on torchao 0.13+) so all-zero activation token rows cannot produce a zero scale.
  • Loading a checkpoint is bit-identical to quantizing the dense bf16 transformer on the fly; the checkpoint skips the dense load and quantize step.
  • Validated against same-seed dense bf16 renders, 28 cases per scheme, zero failures (SSIM, LPIPS-vgg, CLIP delta, non-finite and black-frame checks): INT8 LPIPS mean 0.146 / SSIM 0.937, FP8 LPIPS mean 0.116 / SSIM 0.946. torch 2.10 and torchao 0.17.

Samples

Prompt: "cute sloth typing on a computer" (1024x1024, family default steps/guidance, seeds 0-2).

int8

fp8

Pre-cast fp8 text encoder (this repo)

Lumina-Image-2.0-text_encoder-FP8.pt (3.2 GB) is the pipeline's text encoder (Gemma2Model, Gemma2-2B, the 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:

  • Loading it is bit-identical to downloading the dense encoder and casting on load (verified tensor for tensor: 288 tensors, 182 cast to fp8 storage).
  • Cuts the text-encoder download from 10.5 GB (the Hub stores it fp32) to 3.2 GB, a 3.3x cut.
  • Plain-tensor state dict: loads with torch.load(weights_only=True). Metadata records scheme fp8, component text_encoder, base Alpha-VLLM/Lumina-Image-2.0.
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Examples
Examples
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for unsloth/Lumina-Image-2.0-FP8

Finetuned
(17)
this model

Paper for unsloth/Lumina-Image-2.0-FP8