baidu/ERNIE-Image

Hugging Face Models Trending 模型

摘要

百度发布ERNIE-Image,这是一个基于扩散Transformer架构、拥有8B参数的开源权重文本到图像生成模型。它在开源模型中达到了最先进的性能,在文本渲染、指令跟随和结构化图像生成方面表现出色。

任务:text-to-image 标签:diffusers, safetensors, text-to-image, 8B, license:apache-2.0, diffusers:ErnieImagePipeline, region:us
查看原文
查看缓存全文

缓存时间: 2026/04/20 14:45

baidu/ERNIE-Image · Hugging Face

来源:https://huggingface.co/baidu/ERNIE-Image

🤗 ERNIE-Image (https://huggingface.co/Baidu/ERNIE-Image) | 🤗 ERNIE-Image-Turbo (https://huggingface.co/Baidu/ERNIE-Image-Turbo) | 🤖 ERNIE-Image (https://www.modelscope.cn/models/PaddlePaddle/ERNIE-Image/summary) | 🤖 ERNIE-Image-Turbo (https://www.modelscope.cn/models/PaddlePaddle/ERNIE-Image-Turbo/summary) 🖥️ Huggingface Demo1 (https://huggingface.co/spaces/baidu/ERNIE-Image-Turbo) | 🖥️ Huggingface Demo2(ZeroGPU) (https://huggingface.co/spaces/akhaliq/ERNIE-Image-Turbo) | 🖥️ AI Studio Demo (https://aistudio.baidu.com/ernieimage) Github (https://github.com/baidu/ernie-image) | 📖 Blog (https://yiyan.baidu.com/blog/posts/ernie-image) | 🖼️ Art Gallery (https://ernieimageprompt.com/) 💬 WeChat(微信) (https://github.com/baidu/ERNIE-Image/blob/main/assets/contacts/WeChat_small.jpg) | 🫨 Discord (https://discord.gg/ByUTbjfG5k) | 🏷️ X (https://x.com/ErnieforDevs)

ERNIE-Image 是由百度 ERNIE-Image 团队开发的开放文本到图像生成模型。它基于单流扩散变换器(DiT),并配有一个轻量级的提示增强器(Prompt Enhancer),可将简短的用户输入扩展为更丰富的结构化描述。尽管 DiT 参数量仅为 8B,但在开放权重文本到图像模型中达到了最先进的性能。该模型不仅追求强大的视觉质量,还注重实际生成场景中的可控性,在内容准确实现与美学同样重要的情况下表现出色。尤其是,ERNIE-Image 在复杂指令遵循、文本渲染和结构化图像生成方面表现强劲,非常适合商业海报、漫画、多面板布局以及其他需要视觉质量与精确控制的内容创作任务。它还支持广泛的视觉风格,包括写实摄影、设计导向图像以及更具风格化的美学输出。

ERNIE-Image 马赛克

亮点:

  • 小巧但强大:尽管 ERNIE-Image 规模仅为 8B,但在多项基准测试中仍与参数量大得多的开源模型保持高度竞争力。
  • 文本渲染:ERNIE-Image 在密集、长文本及布局敏感的文本处理方面表现尤为出色,是海报、信息图表、类似 UI 的图像及其他文本密集型视觉内容的理想选择。
  • 指令跟随:该模型能够可靠地遵循涉及多个对象、复杂关系及知识密集型描述的复杂提示。
  • 结构化生成:ERNIE-Image 在结构化视觉任务(如海报、漫画、故事板和多面板构图)中尤其有效,其中布局和组织至关重要。
  • 风格覆盖:除了清晰可读的设计导向输出外,该模型还支持写实摄影和独特的美学风格,包括更柔和、更具电影感的视觉色调。
  • 实用部署:得益于紧凑的尺寸,ERNIE-Image 可在具有 24G VRAM 的消费级 GPU 上运行,降低了研究、下游使用和模型适配的门槛。

https://huggingface.co/baidu/ERNIE-Image#released-versions 发布版本

ERNIE-Image (https://huggingface.co/Baidu/ERNIE-Image):我们的 SFT 模型,通常在 50 步推理中提供更强的通用能力和指令忠实度。

ERNIE-Image-Turbo (https://huggingface.co/Baidu/ERNIE-Image-Turbo):我们的 Turbo 模型,通过 DMD 和 RL 优化,仅需 8 步推理即可实现更快速度和更高美学质量。

https://huggingface.co/baidu/ERNIE-Image#benchmark 基准测试

https://huggingface.co/baidu/ERNIE-Image#geneval GENEval

模型单个物体两个物体计数颜色位置属性绑定总体
ERNIE-Image (w/o PE)1.00000.95960.77810.92820.85500.79250.8856
ERNIE-Image (w/ PE)0.99060.95960.81870.88300.86250.72250.8728
Qwen-Image0.99000.92000.89000.88000.76000.77000.8683
ERNIE-Image-Turbo (w/o PE)1.00000.96210.79060.92020.79750.73000.8667
ERNIE-Image-Turbo (w/ PE)0.99380.94190.83750.83510.79500.70250.8510
FLUX.2-klein-9B0.93130.95710.82810.91490.71750.74000.8481
Z-Image1.00000.94000.78000.93000.62000.77000.8400
Z-Image-Turbo1.00000.95000.77000.89000.65000.68000.8233

https://huggingface.co/baidu/ERNIE-Image#oneig-en OneIG-EN

模型对齐文本推理风格多样性总体
Nano Banana 2.00.88800.94400.33400.48100.24500.5780
Seedream 4.50.89100.99800.35000.43400.20700.5760
ERNIE-Image (w/ PE)0.86780.97880.35660.43090.24110.5750
Seedream 4.00.89200.98300.34700.45300.19100.5730
ERNIE-Image-Turbo (w/ PE)0.86760.96660.35370.41910.22120.5656
ERNIE-Image (w/o PE)0.89090.96680.29500.44710.16870.5537
Z-Image0.88100.98700.28000.38700.19400.5460
Qwen-Image0.88200.89100.30600.41800.19700.5390
ERNIE-Image-Turbo (w/o PE)0.87950.94880.29130.42770.12320.5341
FLUX.2-klein-9B0.88710.86570.31170.44170.15600.5324
Qwen-Image-25120.87600.99000.29200.33800.15100.5300
GLM-Image0.80500.96900.29800.35300.21300.5280
Z-Image-Turbo0.84000.99400.29800.36800.13900.5280

https://huggingface.co/baidu/ERNIE-Image#oneig-zh OneIG-ZH

模型对齐文本推理风格多样性总体
Nano Banana 2.00.84300.98300.31100.46100.23600.5670
ERNIE-Image (w/ PE)0.82990.95390.30560.43420.24780.5543
Seedream 4.00.83600.98600.30400.44300.20000.5540
Seedream 4.50.83200.98600.30000.42600.21300.5510
Qwen-Image0.82500.96300.26700.40500.27900.5480
ERNIE-Image-Turbo (w/ PE)0.82580.93860.30430.42080.22810.5435
Z-Image0.79300.98800.26600.38600.24300.5350
ERNIE-Image (w/o PE)0.84210.89790.26560.42120.17720.5208
Qwen-Image-25120.82300.98300.27200.34200.15700.5150
GLM-Image0.73800.97600.28400.33500.22100.5110
Z-Image-Turbo0.78200.98200.27600.36100.13400.5070
ERNIE-Image-Turbo (w/o PE)0.83260.90860.25800.40020.13160.5062
FLUX.2-klein-9B0.82010.49200.25990.41660.16250.4302

https://huggingface.co/baidu/ERNIE-Image#longtextbench LongTextBench

模型LongText-Bench-ENLongText-Bench-ZH平均
Seedream 4.50.98900.98730.9882
ERNIE-Image (w/ PE)0.98040.96610.9733
GLM-Image0.95240.97880.9656
ERNIE-Image-Turbo (w/ PE)0.96750.96360.9655
Nano Banana 2.00.98080.94910.9650
ERNIE-Image-Turbo (w/o PE)0.96020.96750.9639
ERNIE-Image (w/o PE)0.96790.95940.9636
Qwen-Image-25120.95610.96470.9604
Qwen-Image0.94300.94600.9445
Z-Image0.93500.93600.9355
Seedream 4.00.92140.92610.9238
Z-Image-Turbo0.91700.92600.9215
FLUX.2-klein-9B0.86420.21830.5413

https://huggingface.co/baidu/ERNIE-Image#quick-start 快速开始

https://huggingface.co/baidu/ERNIE-Image#recommended-parameters 推荐参数

  • 分辨率:- 1024x1024 - 848x1264 - 1264x848 - 768x1376 - 896x1200 - 1376x768 - 1200x896
  • 引导尺度:4.0
  • 推理步数:50

https://huggingface.co/baidu/ERNIE-Image#diffusers Diffusers

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,
    width=848,
    num_inference_steps=50,
    guidance_scale=4.0,
    use_pe=True # 使用提示增强器
).images[0]

image.save("output.png")

https://huggingface.co/baidu/ERNIE-Image#sglang SGLang

安装最新版本的 sglang:

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

启动服务器:

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

发送生成请求:

curl -X POST http://localhost:30000/v1/images/generations \
  -H "Content-Type: application/json" \
  -d '{
    "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

相似文章

baidu/ERNIE-Image-Turbo

Hugging Face Models Trending

百度发布了ERNIE-Image-Turbo,一个蒸馏文本到图像生成模型,可在8步推理中实现快速生成,同时保持强大的文本渲染、指令遵循和结构化图像生成能力。

unsloth/ERNIE-Image-Turbo-GGUF

Hugging Face Models Trending

unsloth 发布了基于百度的 ERNIE-Image-Turbo 模型的 GGUF 量化版本,采用 Unsloth Dynamic 2.0 方法,能够在配备 24GB 显存的消费级 GPU 上通过 8 步推理高效实现文生图。

最强本地AI图像生成器来了!

YouTube AI Channels

Ernie Image,全新开源扩散模型,文字渲染与提示词忠实度全面超越Zage,可在ComfyUI本地运行,仅需约20 GB显存。