File size: 7,644 Bytes
b5c6ea0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
09b31a0
 
 
 
 
 
 
 
b13f6bc
09b31a0
b5c6ea0
 
 
 
 
 
 
 
 
 
 
09b31a0
b13f6bc
 
09b31a0
b13f6bc
09b31a0
 
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
b13f6bc
09b31a0
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
 
 
 
b13f6bc
09b31a0
 
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
 
 
 
b13f6bc
09b31a0
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
b13f6bc
09b31a0
 
 
b13f6bc
09b31a0
 
b13f6bc
09b31a0
 
 
b13f6bc
09b31a0
 
 
 
 
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
b13f6bc
b5c6ea0
 
 
 
 
 
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
b13f6bc
09b31a0
 
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
 
 
 
 
b13f6bc
09b31a0
 
 
 
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
 
 
 
 
b13f6bc
09b31a0
b13f6bc
09b31a0
b13f6bc
09b31a0
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
---
pipeline_tag: text-to-image
tags:
- text-to-image
- image-generation
- diffusion-transformer
- dit
- comfyui
- checkpoint
- safetensors
- aio
- all-in-one
- ernie-image
- ernie-image-turbo
- bf16
- fp8
license: apache-2.0
widget:
- text: >-
    A premium sci-fi poster with readable text, cinematic lighting, and a
    futuristic city skyline at night.
- text: >-
    A clean product advertisement for a coffee brand with readable package text,
    elegant layout, and warm morning light.
language:
- en
---

# 🖼️ ERNIE AIO for ComfyUI

**All-in-One Checkpoints • Base + Turbo • BF16 & FP8 • Text Encoder + VAE Included**

[![License](https://img.shields.io/badge/License-Apache%202.0-blue.svg)](https://opensource.org/licenses/Apache-2.0)
[![ComfyUI](https://img.shields.io/badge/ComfyUI-Compatible-green.svg)](https://github.com/comfyanonymous/ComfyUI)

---

- [📦 Models](#📦-models "📦 Models")
- [📋 Workflow](#📋-workflow "📋 Workflow")
- [📸 ERNIE-AIO-Base](#📸-ernie-aio-base "📸 ERNIE-AIO-Base")
- [⚡ ERNIE-AIO-Turbo](#⚡-ernie-aio-turbo "⚡ ERNIE-AIO-Turbo")
- [🔄 FP8 vs BF16](#🔄-fp8-vs-bf16 "🔄 FP8 vs BF16")
- [⚙️ Common Settings](#⚙️-common-settings "⚙️ Common Settings")
- [🗂️ Prompt Enhancer](#🗂️-prompt-enhancer "🗂️ Prompt Enhancer")
- [💡 Prompting](#💡-prompting "💡 Prompting")
- [📥 Downloads](#📥-downloads "📥 Downloads")
- [📁 Files](#📁-files "📁 Files")
- [🙏 Credits](#🙏-credits "🙏 Credits")

---

## 📦 Models

| Model | Style | FP8 | BF16 | Best For |
|---|---|---|---|---|
| 📸 **ERNIE-AIO-Base** | Realistic / Structured | ✅ | ✅ | High-quality, refined output |
| ⚡ **ERNIE-AIO-Turbo** | Realistic / Structured | ✅ | ✅ | Fast iteration, 8-step generation |

**All models:** Integrated Text Encoder + VAE • Single Checkpoint • No extra loaders needed

---

## 📋 Workflow

| File | Description |
|---|---|
| `Workflow/ERNIE-AIO-Upscale.json` | Standard ComfyUI workflow with upscaler |

> ✅ A ready-to-use **ComfyUI workflow** is included in the `Workflow/` folder.  
> ✅ Optional **Prompt Enhancer** files are included in the `prompt-enhancer/` folder.

---

## 📸 ERNIE-AIO-Base

The Base version is intended for high-quality, deliberate, and stable generation.

**Features:** 📖 Strong instruction following • 🖋️ Text rendering • 📐 Structured layouts

```
Steps: 50  |  CFG: 4.0
```

[![ERNIE-AIO-Base preview](https://huggingface.co/SeeSee21/ERNIE-AIO/resolve/main/images/ernie-aio-base.png)](https://huggingface.co/SeeSee21/ERNIE-AIO/blob/main/images/ernie-aio-base.png)

Use this version when you want:
- Stronger refinement and more careful rendering
- Full non-turbo quality
- Best results for posters, infographics, and text-heavy layouts

---

## ⚡ ERNIE-AIO-Turbo

The Turbo version is a distilled variant for fast generation and quick iteration.

**Features:** ⚡ 8-step generation • 🎯 High prompt fidelity • 🚀 Quick turnaround

```
Steps: 8  |  CFG: 1.0
```

[![ERNIE-AIO-Turbo preview](https://huggingface.co/SeeSee21/ERNIE-AIO/resolve/main/images/ernie-aio-turbo.png)](https://huggingface.co/SeeSee21/ERNIE-AIO/blob/main/images/ernie-aio-turbo.png)

Use this version when you want:
- Fast output for prototyping and iteration
- Strong visual quality with minimal steps
- Efficient VRAM usage

---

## 🔄 FP8 vs BF16

| | 🟡 FP8 | 🌟 BF16 |
|---|---|---|
| **Quality** | ~95% | 100% |
| **File Size** | Smaller | Full |
| **Speed** | Faster | Standard |
| **VAE** | FP32 (stable) | FP32 (stable) |
| **Best For** | Daily use | Final renders |

> **Note:** The FP8 versions in this repository were quantized by me.  
> VAE is kept at **FP32** in all variants for stable decoding.

---

## ⚙️ Common Settings

```
# ERNIE-AIO-Base
Steps:    50
CFG:      4.0

# ERNIE-AIO-Turbo
Steps:    8
CFG:      1.0

# Placement (both variants)
ComfyUI/models/checkpoints/

# Loader
Standard "Load Checkpoint" node — no extra VAE or text encoder loader needed
```

**Minimal workflow:**
1. **Checkpoint Loader**
2. **CLIP Text Encode (Prompt)**
3. **Empty Latent Image**
4. **KSampler**
5. **VAE Decode**
6. **Save Image**

---

## 🗂️ Prompt Enhancer

An optional **Prompt Enhancer** is included in the `prompt-enhancer/` folder.

- Automatically expands short prompts into richer, more descriptive prompts
- Used by the included workflow
- Fully optional — works without it too

> ⚠️ **Placement:** The Prompt Enhancer files must be placed in:
> ```
> ComfyUI/models/text_encoders/
> ```
> **Not** in a `prompt-enhancer/` subfolder — place the files directly into `text_encoders/`.

---

## 💡 Prompting

**Natural language works best!** These models excel at instruction following and text rendering.

```
✅ A cinematic movie poster with a bold readable title at the top,
   dramatic lighting, a futuristic skyline in the background,
   and a heroic figure silhouetted against a neon-lit city.

❌ movie poster, city, hero, cinematic, dramatic
```

**ERNIE-Image is especially strong for:**

| Category | Examples |
|---|---|
| 🎬 Posters & Title Cards | Movie posters, event flyers, title images |
| ☕ Product Ads | Coffee brands, packaging with readable text |
| 📊 Infographics | Labeled sections, structured layouts |
| 💬 Comics | Speech bubbles, panel compositions |
| 🖥️ UI-style Visuals | Interface mockups, app screens |
| 🖼️ Realistic Imagery | Portraits, environments, product shots |

**For best results, describe:**
- Subject & environment
- Composition & layout
- Mood & lighting
- Camera framing
- Any text that should appear in the image

---

## 📥 Downloads

### ERNIE-AIO Checkpoints

| Model | Precision | CivitAI |
|---|---|---|
| ⚡ **ERNIE-AIO-Turbo** | 🌟 BF16 | [Download](https://civitai.red/models/2551548?modelVersionId=2868512) |
| ⚡ **ERNIE-AIO-Turbo** | 🟡 FP8 | [Download](https://civitai.red/models/2551548?modelVersionId=2868512) |
| 📸 **ERNIE-AIO-Base** | 🌟 BF16 | [Download](https://civitai.red/models/2551548?modelVersionId=2867462) |
| 📸 **ERNIE-AIO-Base** | 🟡 FP8 | [Download](https://civitai.red/models/2551548?modelVersionId=2867462) |

> All files are also available directly on this HuggingFace page.

---

## 📁 Files

```
├── ERNIE-AIO-Base-bf16.safetensors        # 📸 Base  — BF16
├── ERNIE-AIO-Base-fp8.safetensors         # 📸 Base  — FP8
├── ERNIE-AIO-Turbo-bf16.safetensors       # ⚡ Turbo — BF16
├── ERNIE-AIO-Turbo-fp8.safetensors        # ⚡ Turbo — FP8

├── Workflow/
│   └── ERNIE-AIO-Upscale.json             # 🚀 ComfyUI workflow with upscaler

├── prompt-enhancer/                        # 🗂️ Optional Prompt Enhancer files

└── images/
    ├── ernie-aio-base.png                  # 📸 Base preview image
    └── ernie-aio-turbo.png                 # ⚡ Turbo preview image
```

---

## 🙏 Credits

**Original Model:** Baidu ERNIE-Image Team • Single-Stream DiT • Apache 2.0

**AIO Conversion & FP8 Quantization:** [SeeSee21](https://huggingface.co/SeeSee21)

**Official Sources:**

| Resource | Link |
|---|---|
| ERNIE-Image (HuggingFace) | [baidu/ERNIE-Image](https://huggingface.co/baidu/ERNIE-Image) |
| ERNIE-Image-Turbo (HuggingFace) | [baidu/ERNIE-Image-Turbo](https://huggingface.co/baidu/ERNIE-Image-Turbo) |
| GitHub | [baidu/ERNIE-Image](https://github.com/baidu/ERNIE-Image) |

---

**Download → Load Checkpoint → Generate!** 🚀

**Place in `checkpoints/`, load with "Load Checkpoint", and generate in seconds!**