Text-to-Image
Diffusers
nunchaku-lite
diffuse-compressor
quantized
ernie-image
ernie-image-turbo
svdquant
int4
fp4
Instructions to use rootonchair/ERNIE-Image-Turbo-nunchaku-lite with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use rootonchair/ERNIE-Image-Turbo-nunchaku-lite with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("rootonchair/ERNIE-Image-Turbo-nunchaku-lite", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
ERNIE-Image-Turbo Nunchaku Lite
This repository contains Nunchaku Lite SVDQuant checkpoints for baidu/ERNIE-Image-Turbo.
- Runtime: rootonchair/nunchaku-lite
- Quantization framework: rootonchair/diffuse-compressor
Checkpoints
| File | Quantization | Rank | Recommended hardware |
|---|---|---|---|
svdq-int4_r32-ernie-image-turbo.safetensors |
INT4 | 32 | Turing, Ampere, Ada |
svdq-nvfp4_r32-ernie-image-turbo.safetensors |
NVFP4 | 32 | Blackwell |
Benchmark Artifacts
Detailed benchmark metadata is available in benchmarks/summary.json.
Usage
import torch
from diffusers import ErnieImagePipeline
from nunchaku_lite import load_nunchaku_pipeline
pipe = load_nunchaku_pipeline(
"Baidu/ERNIE-Image-Turbo",
pipeline_cls=ErnieImagePipeline,
checkpoint="rootonchair/ERNIE-Image-Turbo-nunchaku-lite/svdq-nvfp4_r32-ernie-image-turbo.safetensors",
precision="auto",
torch_dtype=torch.bfloat16,
device="cuda",
).to("cuda")
image = pipe(
prompt="This is a photograph depicting an urban street scene. Shot at eye level, it shows a covered pedestrian or commercial street. Slightly below the center of the frame, a cyclist rides away from the camera toward the background, appearing as a dark silhouette against backlighting with indistinct details. The ground is paved with regular square tiles, bisected by a prominent tactile paving strip running through the scene, whose raised textures are clearly visible under the light. Light streams in diagonally from the right side of the frame, creating a strong backlight effect with a distinct Tyndall effect-visible light beams illuminating dust or vapor in the air and casting long shadows across the street. Several pedestrians appear on the left side and in the distance, some with their backs to the camera and others walking sideways, all rendered as silhouettes or semi-silhouettes. The overall color palette is warm, dominated by golden yellows and dark browns, evoking the atmosphere of dusk or early morning.",
height=1264,
width=848,
num_inference_steps=8,
guidance_scale=1.0,
use_pe=True,
).images[0]
image.save("output.png")
For non-Blackwell GPUs, use the INT4 checkpoint instead:
checkpoint="rootonchair/ERNIE-Image-Turbo-nunchaku-lite/svdq-int4_r32-ernie-image-turbo.safetensors"
Citation
This is a quantized derivative of baidu/ERNIE-Image-Turbo. Please follow the base model's license and citation guidance.
- Downloads last month
- 14
Model tree for rootonchair/ERNIE-Image-Turbo-nunchaku-lite
Base model
baidu/ERNIE-Image-Turbo

