baidu/ERNIE-Image — image generation record

Summary

  • Size: the drawing components have 15.40B parameters in total. The weight files actually loaded total about 31.6GB.
  • Structure: ErnieImagePipeline. Components: transformer (ErnieImageTransformer2DModel), vae (AutoencoderKLFlux2), text_encoder (Mistral3Model), pe (Ministral3ForCausalLM).
  • Settings: 848×1264 pixels, 50 steps, guidance 4.0. These values were read from the diffusers usage example in the model card (README); anything it does not specify uses the pipeline default.
  • Speed: on one RTX 3090 in bf16, median 187.5 s per image (first image 191.6 s). Peak VRAM 16.7GB. It did not fit in VRAM, so parts were offloaded to system memory.
  • License: apache-2.0. Only models whose licenses allow publishing generated images are recorded.
  • Prompt rewriting: Before drawing, this pipeline has a component, pe (Ministral3ForCausalLM, 3.43B parameters), rewrite the input prompt. Rewriting was used here (use_pe=True; the pipeline default, and the README usage example also sets use_pe=True). The images below were drawn not from the six fixed prompts themselves but from the text pe rewrote. The rewritten text is sampled with temperature 0.6 and top_p 0.95; the image generator is not passed to this sampling, so it uses torch's global random state, which depends on everything run before it. The left and right images were drawn from separate rewrites of the same prompt (from the pipeline code in diffusers 0.39.0). The rewritten text was not recorded by imgscope 0.1.6. The drawing times include the time pe takes to rewrite the prompt.

One-line summary: ErnieImagePipeline · 15.40B params · 848×1264 · 50 steps · 187.5 s/image (RTX 3090)

Images

Six fixed prompts, drawn with random seeds 1 and 2 (left: seed 1, right: seed 2). Drawn from the text rewritten by pe (see the summary). No retouching or cherry-picking.

1. Portrait

A photograph of an elderly fisherman mending a net on a wooden pier at dawn, soft natural light, 50mm lens

portrait

Time: 191.6 s / 193.9 s

2. Landscape

A moss-covered wooden bench in a quiet forest clearing, sunlight filtering through the trees

landscape

Time: 188.5 s / 189.4 s

3. Text

A small wooden shop sign that reads "MOSSBENCH" in painted letters, hanging above a door

text

Time: 178.2 s / 186.9 s

4. Hands

Close-up of two hands holding a cup of green tea

hands

Time: 177.8 s / 178.2 s

5. Counting and layout

Three red apples and two blue cups on a white table, top view

count

Time: 176.8 s / 180.6 s

6. Illustration

A flat vector illustration of a cat reading a book under a desk lamp

illust

Time: 188.1 s / 190.0 s

Components

Component Class Parameters dtype
transformer ErnieImageTransformer2DModel 8,033,490,048 bfloat16
vae AutoencoderKLFlux2 84,046,115 bfloat16
text_encoder Mistral3Model 3,849,090,048 bfloat16
tokenizer TokenizersBackend — —
scheduler FlowMatchEulerDiscreteScheduler — —
pe Ministral3ForCausalLM 3,429,006,336 bfloat16
pe_tokenizer TokenizersBackend — —

Measurement conditions

  • imgscope 0.1.6, Python 3.14.4, torch 2.13.0+cu130, diffusers 0.39.0, transformers 5.14.1, huggingface_hub 1.33.0, accelerate 1.15.0, safetensors 0.8.0
  • GPU: NVIDIA GeForce RTX 3090, bf16, TF32 off. Random numbers from torch.Generator('cpu').manual_seed(seed)
  • Placement: enable_model_cpu_offload (parts offloaded to system memory). Loading took 360 s
  • Settings used: num_inference_steps=50 (README), guidance_scale=4.0 (README), height=1264 (README), width=848 (README)
  • Pipeline defaults (for reference): {'num_inference_steps': 50, 'guidance_scale': 4.0, 'height': 1024, 'width': 1024}
  • Time is measured per image until the GPU finishes. VRAM is the peak memory allocated by torch
  • Model: baidu/ERNIE-Image (revision 5346b31d68c9)

Comments

…

Comments are public. Please don't include personal information. Inappropriate comments may be removed.

← All notes