Downloads · 30 days
16
14% of all-time downloads
lite-infer/ERNIE-Image-Turbo-nunchaku-lite-nvfp4
ERNIE-Image-Turbo-nunchaku-lite-nvfp4 is a text-to-image model from lite-infer. Use it when you need an image from a text prompt. It is set up for diffusers. The card lists the license as apache-2.0.
[!IMPORTANT] Experimental: This Nunchaku Lite quantized ERNIE-Image-Turbo checkpoint is experimental. APIs and loading behavior may change.
Downloads · 30 days
16
14% of all-time downloads
All-time downloads
114
Public
Parameters
4.5B
15.3 GB on disk
Likes
0
Public
Click a slice to open those files.
.safetensors15.3 GB · 100%
How the weights are stored.
I83.9B · 86%
From the Hugging Face model README
[!IMPORTANT] Experimental: This Nunchaku Lite quantized ERNIE-Image-Turbo checkpoint is experimental. APIs and loading behavior may change.
This repository contains a full Diffusers pipeline for baidu/ERNIE-Image-Turbo with:
text_encoderThe checkpoint safetensors were rewritten without safetensors metadata before upload.
The transformer uses a compact Nunchaku Lite quantization config stored in transformer/config.json.
| Component | Method | Precision | Group size | Rank | Targets |
|---|---|---|---|---|---|
Transformer svdq_w4a4 | Nunchaku Lite | fp4 / NVFP4 runtime | 16 | 32 | 252 |
Transformer awq_w4a16 | Nunchaku Lite | int4 | 64 | - | 6 |
| Text encoder | bitsandbytes | nf4 4-bit | - | - | 353 modules |
This checkpoint requires a Diffusers version that includes NunchakuLiteQuantizationConfig and the Nunchaku Lite loader path.
pip install git+https://github.com/huggingface/diffusers
pip install kernels bitsandbytes
Use a CUDA-capable PyTorch environment. The quantized transformer uses kernels from the Hugging Face kernels package, and the text encoder uses bitsandbytes 4-bit modules.
import torch
from diffusers import ErnieImagePipeline
pipe = ErnieImagePipeline.from_pretrained(
"lite-infer/ERNIE-Image-Turbo-nunchaku-lite-nvfp4",
torch_dtype=torch.bfloat16,
).to("cuda")
image = pipe(
prompt="A modern red armchair in a quiet studio, soft window light, realistic product photography",
height=1024,
width=1024,
num_inference_steps=8,
guidance_scale=1.0,
use_pe=False,
).images[0]
image.save("ernie-image-turbo-nunchaku-lite-nvfp4-bnb4-text-encoder.png")
Recommended ERNIE-Image-Turbo settings:
num_inference_steps=8guidance_scale=1.0use_pe=False for direct prompt usage, or use_pe=True to enable the inherited prompt enhancerEvaluation was run on an NVIDIA RTX PRO 6000 Blackwell Server Edition with CUDA, torch_dtype=torch.bfloat16, 1024x1024 output, 8 inference steps, guidance_scale=1.0, and use_pe=False.
| Variant | Load time | Generation latency | Avg eval latency | Peak allocated VRAM | Text encoder bnb modules |
|---|---|---|---|---|---|
| NVFP4 transformer + BNB4 text encoder | 3.719s | 3.957s | 3.952s | 9.572GB | 353 |




save_pretrained() serialization for Nunchaku Lite models is not supported yet.This repository follows the Apache-2.0 license from the base ERNIE-Image-Turbo release.