Skip to content

ERNIE image generation ​

Baidu's ERNIE Image is a distillation-friendly text-to-image family hosted on Civitai's Comfy workers. Single engine path, one operation (createImage — no img2img, variant, or edit support), two model variants that differ only in speed vs. quality:

  • engine: "comfy", ecosystem: "ernie"
  • Only createImage — ERNIE doesn't expose createVariant or editImage. Use Flux 2 Klein or Qwen if you need img2img or prompt-driven editing.
  • Built-in diffuser, VAE, and text encoder — no model URN to pick. The only model field is the variant selector (ernie or turbo).
  • LoRA support (ERNIE-tagged LoRAs only).

Variants ​

modelSteps (default)cfgScale (default)Best for
ernie204Default — full-quality output, standard sampling
turbo81Distilled for speed — 3–4× faster and ~40% of the Buzz per image (8 vs 20 at defaults); use for drafts, batches, and iteration

Leave cfgScale: 1 on turbo — it's a distilled model and doesn't respond to classifier-free guidance the way the standard variant does.

Prerequisites ​

  • No checkpoint URN required — both variants ship with built-in diffuser / VAE / text encoder

Standard (model: "ernie") ​

http
POST https://orchestration.civitai.com/v2/consumer/workflows?wait=60
Authorization: Bearer <your-token>
Content-Type: application/json

{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "comfy",
      "ecosystem": "ernie",
      "model": "ernie",
      "operation": "createImage",
      "prompt": "A red panda wearing a yellow rain jacket, cinematic soft light, highly detailed",
      "width": 1024,
      "height": 1024,
      "steps": 20,
      "cfgScale": 4,
      "sampler": "euler",
      "scheduler": "simple",
      "quantity": 1
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Parameters ​

FieldDefaultRangeNotes
prompt— ✅≤ 10 000 charsNatural-language descriptions work well; ERNIE handles complex scenes better than tag-soup.
negativePrompt(none)≤ 10 000 charsOptional. Shorter is usually better — ERNIE's defaults are already clean.
width / height102464–2048, divisible by 16Trained around 1024². Well-behaved near ~1 megapixel total.
steps201–150Diminishing returns past ~25.
cfgScale40–303–5 is the sweet spot.
samplereulerenumComfySampler. euler is what the model was tuned against.
schedulersimpleenumComfyScheduler.
loras{}{ airUrn: strength }Stack multiple. Only urn:air:ernie:lora:... LoRAs work here.
quantity11–12Number of images per call.
seedrandomint64Pin for reproducibility.

Portrait aspect ratio ​

json
{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "comfy",
      "ecosystem": "ernie",
      "model": "ernie",
      "operation": "createImage",
      "prompt": "Portrait of a woman with flowing hair standing in a blooming cherry blossom field, golden hour lighting",
      "negativePrompt": "worst quality, blurry, low resolution",
      "width": 832,
      "height": 1216,
      "steps": 20,
      "cfgScale": 4,
      "sampler": "euler",
      "scheduler": "simple",
      "seed": 42
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Turbo (model: "turbo") ​

Distilled variant — same input surface as standard, just lower defaults for steps and cfgScale. Use this as the default when you're iterating on prompts or generating batches; fall back to ernie for hero shots.

http
POST https://orchestration.civitai.com/v2/consumer/workflows?wait=60
Authorization: Bearer <your-token>
Content-Type: application/json

{
  "steps": [{
    "$type": "imageGen",
    "input": {
      "engine": "comfy",
      "ecosystem": "ernie",
      "model": "turbo",
      "operation": "createImage",
      "prompt": "A red panda wearing a yellow rain jacket, cinematic soft light, highly detailed",
      "width": 1024,
      "height": 1024,
      "steps": 8,
      "cfgScale": 1,
      "sampler": "euler",
      "scheduler": "simple",
      "quantity": 1
    }
  }]
}
POST/v2/consumer/workflows
Set your Civitai API token via the Token button in the navbar to enable Try It.
Request body — edit to customize (e.g. swap the image URL or prompt)
Valid JSON

Turbo-specific tuning:

FieldDefaultNotes
steps8Stay in 6–12. Pushing past ~16 wastes Buzz without improving output on the distilled model.
cfgScale1Distilled — leave at 1. Raising it usually over-saturates / burns the output.

Everything else (prompt, negativePrompt, dimensions, sampler, scheduler, seed, quantity, loras) matches the standard variant.

Reading the result ​

Standard imageGen output: an images[] array, one entry per quantity (shape and URL expiry).

Cost ​

Preview the exact charge with whatif=true (Payments (Buzz)).

Per-pixel + per-step scaling against 1024² and the variant's default step count:

Standard:

total = 20 × (width × height / 1024²) × (steps / 20) × quantity

Turbo:

total = 8 × (width × height / 1024²) × (steps / 8) × quantity
ShapeStandard (Buzz)Turbo (Buzz)
1024² / default steps / quantity: 1 (defaults)208
832×1216 / default steps / quantity: 1~20~8
1024² / default steps / quantity: 4~80~32
1024² / steps: 40 (standard) / steps: 16 (turbo)~40~16

Standard pricing is ~2.5× turbo at defaults — reach for turbo when iterating on prompts.

Runtime ​

Typical claim duration (job.startedAt → job.completedAt) with quantity: 1:

VariantShapeClaim duration
ernie (standard)1024² / 20 steps~29 s
ernie (standard)832×1216 / 20 steps~27 s
turbo1024² / 8 steps~13 s

wait=60 covers single-image calls comfortably. For quantity > 1, larger dimensions, or high steps counts, compute + queue wait can outlast your HTTP client's timeout — submit with wait=60 and re-issue GET /v2/consumer/workflows/{id}?wait=60 on a loop until the response is terminal (see Submitting work → Query parameters), or register a webhook.

Troubleshooting ​

Timeouts, moderation blocks and expired blob URLs: see Common troubleshooting.

SymptomLikely causeFix
400 with "operation must be createImage"Passed editImage or createVariantERNIE only supports createImage. Use Qwen or Flux 2 Klein for img2img / edit.
400 on modelSent a full AIR URN or a value other than ernie / turboThe model field is a variant selector, not a checkpoint URN. Only "ernie" and "turbo" are valid.
400 on width / heightValue not divisible by 16, or outside 64–2048Round to a valid multiple of 16 inside that range.
Turbo output looks over-saturated / blown outcfgScale > 1 on the distilled modelSet cfgScale: 1 for turbo. Raise steps instead if you want more fidelity.
Standard output ignores the promptcfgScale too lowBump toward 4–6. cfgScale: 1 on standard barely steers the model.
LoRA silently has no effectWrong AIR URN, or ecosystem mismatchOnly urn:air:ernie:lora:… LoRAs work here. Verify the URN on the LoRA's Civitai page.
Request timed out (wait expired)Large quantity, atypical dimensions, or high stepsResubmit and resume with a GET …?wait=60 loop, or register a webhook.

Civitai Developer Documentation