Archive of AI

Source Snapshot / 2026-04-15-baidu-ernie-image-open-weights-2

ERNIE-Image 官方模型卡

Linked event: 2026-04-15 · Baidu ERNIE Open-Sources ERNIE-Image and Turbo Text-to-Image Models

Publisher
百度/Hugging Face
Archived
2026-11-23
Capture Method
Direct page capture
HTTP / SHA-256
200 / 8c204c5e7771c812
Original URL
Open source ↗
Wayback Backup
Not archived
This page preserves a plain-text static snapshot against link rot. When citing figures, tables, or full legal terms, verify against the original URL and Wayback Machine archive.

Hugging Face

Search models, datasets, users... ⌘K

Text-to-Image

ErnieImagePipeline

License: apache-2.0

Model card Files Files and versions

Copy to bucket

Use this model

🤗 ERNIE-Image  |

🤗 ERNIE-Image-Turbo  |

🤖 ERNIE-Image  |

🤖 ERNIE-Image-Turbo

🖥️ Huggingface Demo1  |

🖥️ Huggingface Demo2(ZeroGPU)  |

🖥️ AI Studio Demo

🖼️ Art Gallery

💬 WeChat(微信)  |

🫨 Discord  |

ERNIE-Image is an open text-to-image generation model developed by the ERNIE-Image team at Baidu. It is built on a single-stream Diffusion Transformer (DiT) and paired with a lightweight Prompt Enhancer that expands brief user inputs into richer structured descriptions. With only 8B DiT parameters, it reaches state-of-the-art performance among open-weight text-to-image models. The model is designed not only for strong visual quality, but also for controllability in practical generation scenarios where accurate content realization matters as much as aesthetics. In particular, ERNIE-Image performs strongly on complex instruction following, text rendering, and structured image generation, making it well suited for commercial posters, comics, multi-panel layouts, and other content creation tasks that require both visual quality and precise control. It also supports a broad range of visual styles, including realistic photography, design-oriented imagery, and more stylized aesthetic outputs.

Compact but strong: Despite its compact 8B scale, ERNIE-Image remains highly competitive with substantially larger open-weight models across a range of benchmarks.

Text rendering: ERNIE-Image performs particularly well on dense, long-form, and layout-sensitive text, making it a strong choice for posters, infographics, UI-like images, and other text-heavy visual content.

Instruction following: The model is able to follow complex prompts involving multiple objects, detailed relationships, and knowledge-intensive descriptions with strong reliability.

Structured generation: ERNIE-Image is especially effective for structured visual tasks such as posters, comics, storyboards, and multi-panel compositions, where layout and organization are critical.

Style coverage: In addition to clean and readable design-oriented outputs, the model also supports realistic photography and distinctive stylized aesthetics, including softer and more cinematic visual tones.

Practical deployment: Thanks to its compact size, ERNIE-Image can run on consumer GPUs with 24G VRAM, which lowers the barrier for research, downstream use, and model adaptation.

Released Versions

ERNIE-Image: Our SFT model, delivers stronger general-purpose capability and instruction fidelity in typically 50 inference steps.

ERNIE-Image-Turbo: Our Turbo model, optimized by DMD and RL, achieves faster speed and higher aesthetics in only 8 inference steps.

Single Object

Attribute Binding

ERNIE-Image (w/o PE)

ERNIE-Image (w/ PE)

ERNIE-Image-Turbo (w/o PE)

ERNIE-Image-Turbo (w/ PE)

FLUX.2-klein-9B

Z-Image-Turbo

Nano Banana 2.0

Seedream 4.5

Seedream 4.0

Qwen-Image-2512

LongTextBench

LongText-Bench-EN

LongText-Bench-ZH

Recommended Parameters

Guidance scale: 4.0

Inference steps: 50

pip install git+https://github.com/huggingface/diffusers

import torch

from diffusers import ErnieImagePipeline

pipe = ErnieImagePipeline.from_pretrained(

"Baidu/ERNIE-Image",

torch_dtype=torch.bfloat16,

).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,

num_inference_steps=50,

guidance_scale=4.0,

use_pe=True # use prompt enhancer

image.save("output.png")

Install the latest version of sglang:

git clone https://github.com/sgl-project/sglang.git

Start the server:

sglang serve --model-path baidu/ERNIE-Image

Send a generation request:

curl -X POST http://localhost:30000/v1/images/generations \

-H "Content-Type: application/json" \

"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": 50,

"guidance_scale": 4.0,

"use_pe": true

--output output.png

Downloads last month 1,299

Model tree for baidu/ERNIE-Image

Quantizations

Spaces using baidu/ERNIE-Image 49

Collection including baidu/ERNIE-Image

The serieas of image generation models, including text2img、img2img. • 4 items • Updated May 20 • 25