artokun/comfyui-mcp/ernie-image
Claude Code and agent skill by artokun/comfyui-mcp
- community
Checking that the SKILL.md file is still in the repository.
Build Baidu ERNIE-Image / ERNIE-Image-Turbo workflows, primarily TEXT-TO-IMAGE. Pick ERNIE when you need precise multilingual text rendering, posters/signage, manga/anime multi-panel layouts, or strong instruction following for complex multi-object scenes. Also supports denoise-based image-to-image refine (NOT instruction-grounded editing; use Qwen-Image-Edit or Flux Kontext for "change X in this photo" edits).
Install
npx vskill@latest install artokun/comfyui-mcp/ernie-imageSKILL.md
The same SKILL.md was published earlier as artokun/comfyui-mcp/ernie-image.
ERNIE-Image / ERNIE-Image-Turbo Workflows
What this is (read first)
ERNIE-Image is Baidu's open-weight TEXT-TO-IMAGE model, an ~8B single-stream Diffusion Transformer (DiT), Apache-2.0, released April 2026 and repackaged for ComfyUI by Comfy-Org. It is not an instruction-based image editor.
- ERNIE-Image (base): ~50 steps for peak quality.
- ERNIE-Image-Turbo: distilled (Distribution Matching Distillation + RL), high-fidelity in ~8 steps at cfg 1. The downloaded pack uses Turbo (
ernie-image-turbo-*.gguf).
Pick ERNIE when the job is precise text/typography rendering (multilingual, including Chinese), posters/signage/UI mockups, manga/anime storyboards and multi-panel layouts, or structured multi-object scenes from a complex prompt. Do not pick ERNIE for "edit this photo / change the shirt / swap the background". That is instruction-grounded editing, which ERNIE does not do. Use qwen-image-edit or Flux Kontext for those. ERNIE's "image-to-image" here is plain denoise-based refinement (style pass / detail pass), not reference-grounded editing.
Niche vs siblings. ERNIE is the best open-weight text rendering + layout T2I. Qwen-Image-Edit does instruction editing. Flux Kontext does reference editing. Z-Image Turbo does fast general T2I, and this same pack pairs the two; see Combo pipelines.
Separated packs (render-verified)
The original ernie monolith was a single toggle-template graph (every pipeline shipped bypassed; you activated one via the rgthree group toggles). It's now split into standalone, single-purpose packs, each a clean activated graph that renders headlessly with no group-toggling:
| Pack | Use | Models | VRAM | |
|---|---|---|---|---|
ernie-txt2img | text-to-image (flagship) | ERNIE only (4) | <8GB | |
ernie-img2img | denoise refine of a source image | ERNIE only (4) | <8GB | |
ernie-combo | ERNIE × Z-Image-Turbo combo pipelines | ERNIE + Z-Image (7, ~32GB) | 12GB+ |
Working details verified live: the prompt-enhancer LLM is OFF by default (the ENHANCE PROMPT boolean is false; leave it off unless you want the 3B enhancer to rewrite the prompt). The grain/sharpen post-proc (FastFilmGrain/FastLaplacianSharpen, comfyui-vrgamedevgirl) needs librosa installed. In ernie-combo the Z-Image half's VAE is saved as z-image-ae.safetensors; its weights differ from Flux/ERNIE's ae.safetensors despite the same size, and the rename avoids a filename clash.
Source of truth & a provenance warning
This skill is derived from the actual pack files in C:\Users\Artokun\Downloads\:
ERNIE-IMAGE-ULTRA-WORKFLOW.json(authoritative; the ComfyUI graph)ERNIE-IMAGE_ULTRA-MODELS-NODES_INSTALL.bat,...-COMFYUI-MANAGER_AUTO_INSTALL.bat,...-AUTO_INSTALL-RUNPOD.sh
Installer warning (verified). The three install scripts are copy-pasted from a Z-Image pack. Their headers literally say "Z-IMAGE-BASE"/"Z-IMAGE Base", and they download both ERNIE and Z-Image files. The model URLs/folders below are taken from those scripts but mirror this confusion. They pullz_image_turbo-*.gguf,Qwen3-4B-*.gguf, andae.safetensors, which belong to the Z-Image half of the combo, not ERNIE. The ERNIE-only files are flagged below. All weights come from a third-party mirrorhuggingface.co/Aitrepreneur/FLX, not the officialhuggingface.co/Comfy-Org/ERNIE-Image(which hosts the same filenames; see Official sources).
Models
ERNIE-Image (the files ERNIE actually uses)
Confirmed from the workflow's virtual wires (Set_*/GetNode): the nodes tagged "ERNIE" resolve to these exact files.
| Component | Node (type) | File (in workflow) | Folder | Notes | |
|---|---|---|---|---|---|
| UNet (GGUF) | UnetLoaderGGUF | ernie-image-turbo-Q8_0.gguf | models/unet/ | Turbo DiT. Q5_K_S / Q6_K / Q8_0 quants offered by installer | |
| Text encoder | CLIPLoader (type=flux2) | ministral-3-3b.safetensors | models/text_encoders/ | Ministral-3-3B is ERNIE's text encoder. Loaded with CLIP type flux2 | |
| VAE | VAELoader | flux2-vae.safetensors | models/vae/ | ERNIE reuses the Flux 2 VAE | |
| Prompt enhancer | CLIPLoader (type=flux2) → TextGenerate | ernie-image-prompt-enhancer.safetensors | models/text_encoders/ | 3B LLM that auto-expands a short prompt into a rich description (see Prompt enhancer). Optional, toggled per-pipeline |
Quant guidance from the installer: Q5_K_S for GPUs <8 GB · Q6_K for 8 to 12 GB · Q8_0 for 12 to 16 GB+.
Z-Image Turbo (bundled in the same pack — the "ZIT" half)
The workflow also wires a parallel Z-Image Turbo pipeline for ERNIE→ZIT / ZIT→ERNIE combos. These files are Z-Image's, not ERNIE's. Do not confuse them:
| Component | Node | File | Folder | |
|---|---|---|---|---|
| UNet (GGUF) | UnetLoaderGGUF | z_image_turbo-Q8_0.gguf | models/unet/ | |
| Text encoder | CLIPLoaderGGUF (type=lumina2) | Qwen3-4B-UD-Q6_K_XL.gguf | models/text_encoders/ | |
| VAE | VAELoader | ae.safetensors | models/vae/ |
LoRAs (referenced in the Power Lora Loader, off by default)
hirohiko-araki-style-ERNIE_000001250.safetensors and ernie-anime-v1.safetensors are community ERNIE style LoRAs, loaded via Power Lora Loader (rgthree) (both toggled off in the shipped graph). Not in the installer; user-supplied.
Upscalers / post (shared)
4x-ClearRealityV1.pth, RealESRGAN_x4plus_anime_6B.pth → models/upscale_models/.
Installation
Custom nodes (git clone into ComfyUI/custom_nodes/)
All three installers clone the same set:
| Node pack | Repo | Why it's needed | |
|---|---|---|---|
| ComfyUI-Manager | https://github.com/ltdrdata/ComfyUI-Manager.git | management | |
| ComfyUI-GGUF | https://github.com/city96/ComfyUI-GGUF | UnetLoaderGGUF, CLIPLoaderGGUF | |
| rgthree-comfy | https://github.com/rgthree/rgthree-comfy | Power Lora Loader, Label, Fast Groups Bypasser, Image Comparer | |
| ComfyUI-Easy-Use | https://github.com/yolain/ComfyUI-Easy-Use | easy cleanGpuUsed, easy clearCacheAll | |
| ComfyUI-KJNodes | https://github.com/kijai/ComfyUI-KJNodes | utility nodes | |
| ComfyUI_essentials | https://github.com/cubiq/ComfyUI_essentials | ImageResize+ | |
| wlsh_nodes | https://github.com/wallish77/wlsh_nodes | Upscale by Factor with Model (WLSH) | |
| comfyui-vrgamedevgirl | https://github.com/vrgamegirl19/comfyui-vrgamedevgirl | FastFilmGrain, FastLaplacianSharpen | |
| RES4LYF | https://github.com/ClownsharkBatwing/RES4LYF | advanced samplers |
The graph also uses TextGenerate, TextBox1, StringReplace, ComfySwitchNode, PreviewAny, SetNode/GetNode, PrimitiveBoolean, ModelSamplingAuraFlow, ConditioningZeroOut, EmptySD3LatentImage, EmptyFlux2LatentImage. Most are builtin or come from the packs above. SetNode/GetNode are from KJNodes. TextGenerate (runs the prompt-enhancer LLM) has an unverified pack origin; verify which pack provides it via ComfyUI-Manager if it shows as missing.
Model downloads (exact URLs from the installer)
Base URL HF = https://huggingface.co/Aitrepreneur/FLX/resolve/main (third-party mirror). !MODEL_VERSION! ∈ {Q5_K_S, Q6_K, Q8_0}.
Official sources (prefer these over the mirror)
The same filenames are hosted officially at huggingface.co/Comfy-Org/ERNIE-Image (unet|diffusion_models/, text_encoders/, vae/). Apache-2.0. Original model: github.com/baidu/ERNIE-Image. Comfy day-0 docs: docs.comfy.org/tutorials/image/ernie-image/ernie-image. The official repo also ships non-GGUF ernie-image.safetensors / ernie-image-turbo.safetensors (load with UNETLoader instead of UnetLoaderGGUF).
How the pipeline works (at a glance)
The big graph is a menu of group-boxed pipelines built from the same blocks. Core ERNIE-Image text-to-image flow:
In the optional prompt enhancer path, the short user prompt + {width}/{height} are templated into a Chinese system prompt, fed to TextGenerate (which runs ernie-image-prompt-enhancer), and a ComfySwitchNode chooses raw prompt (switch=false) vs. enhanced prompt (switch=true) before CLIPTextEncode.
The image-to-image (refine) path is not editing. The graph's "ERNIE IMAGE TO IMAGE" groups take a LoadImage → ImageResize+ (1024, keep proportion, lanczos) and VAEEncode it, then run KSampler at low denoise (0.35 to 0.4) to refine or restyle. This is a denoise pass over a single source image; it does not follow edit instructions.
About the ~5 LoadImage + ~5 VAEEncode nodes: they are not multi-reference compositing. Each LoadImage feeds a separate pipeline variant (single-image img2img, or the combo refine stages). One source image per pipeline. The extra VAEEncodes are the encode steps for those independent img2img / two-pass refine chains.
The combo pipelines (ERNIE↔ZIT), with group titles ERNIE ---> ZIT COMBO, ZIT ---> ERNIE COMBO, TWO TIMES COMBO ..., chain ERNIE and Z-Image Turbo as a two-pass generate→refine, with optional film-grain (FastFilmGrain) or sharpening (FastLaplacianSharpen) finishing and SIMPLE UPSCALE.
Settings (extracted from the shipped KSamplers)
| Pipeline | Steps | CFG | Sampler | Scheduler | Denoise | Shift | |
|---|---|---|---|---|---|---|---|
| ERNIE text-to-image (Turbo) | 8–9 | 1 | euler | simple | 1.0 | 3.1 | |
| ERNIE image-to-image refine | 8 | 1 | euler | simple | 0.4 | 3.1 | |
| Combo refine pass (2nd stage) | 9 | 1 | euler | simple | 0.25–0.35 | 3.1 |
ModelSamplingAuraFlowshift = 3.1 is applied to the ERNIE model before sampling (flow-matching shift). Keep it.- CFG = 1 for Turbo, so negative conditioning is effectively inert; the graph still wires a
ConditioningZeroOutas the negative. - The shipped latent is 1920×1088 (
EmptySD3LatentImage). ERNIE is a high-res-capable DiT; 1024 to 2048 on the long edge is reasonable. UseEmptySD3LatentImagefor ERNIE latents. - For base (non-Turbo)
ernie-image, bump steps to ~50 and raise cfg (e.g. 3.5 to 5) since it is not distilled.
Prompt / instruction style
ERNIE rewards descriptive, structured natural-language prompts, and is unusually strong at literal text rendering. Write the exact text you want to appear in quotes.
This is the start of the file. Read the full SKILL.md on GitHub.
Security
- Security scanPassed, 93 of 100Pattern checks on the skill's files.
- Model reviewPassed
Quality evaluation
- Task evaluationNot runNo evaluation yet. Run one in Skill Studio.
Source
- SKILL.md in the repositoryCheckingplugin/skills/ernie-image/SKILL.md
Popularity
- Repository stars
- 651
- Repository forks
- 101
- 7-day trend score
- 32
Stars and forks are for the whole GitHub repository, not this skill alone. Not refreshed yet.
Works with
Any agent vskill installs to: 56 targets in all. These 39 have a page on this site.
- Claude Code
- Cursor
- GitHub Copilot
- Windsurf
- Codex
- Gemini CLI
- Cline
- Amp
- Roo Code
- Goose
- Continue
- Kilo Code
- Junie
- Trae
- OpenHands
- Qwen Code
- AI Agent
- Tabnine Chat
- Sourcegraph Cody
- Amazon Q
- Firebase Genkit
- Sweep
- Devin
- Phind
- Mentat
- Claude Desktop
- Aider
- GPT Pilot
- Plandex
- bolt.new
- v0
- Replit Agent
- Anse
- TypingMind
- BetterChatGPT
- LibreChat
- Warp AI
- Pieces
- Fig AI
Embed badge
[](https://verified-skill.com/skills/artokun/comfyui-mcp/ernie-image)