Wuerstchen V2

WUERSTCHEN_V2

Würstchen v2: fast 1024-pixel text-to-image generation from a two-stage model that works in a highly compressed latent space.

Image Generationtext-to-imagewuerstchenfastmit
Wuerstchen V2: Image Generation model on Kainguru

About Wuerstchen V2

Würstchen v2 generates an image from a text prompt. It is a two-stage latent diffusion model: a prior (Stage C) works in a highly compressed latent space, and a decoder (Stage A and Stage B) turns those latents into pixels. The authors report a 42× spatial compression, which is why a 1024 pixel image is cheap to sample compared with diffusion that stays closer to pixel space.

The weights are warp-ai/wuerstchen (decoder) at revision c3da41406ddd4d9c48c49aa93981a82354351b83 and warp-ai/wuerstchen-prior (prior) at revision c41be6339e1b93f95ece99825327cdf9f4abc436, both MIT.

Generation settings

Taken from the model card's "How to run" example at the pinned revision:

  • Pipeline class: AutoPipelineForText2Image
  • Weight dtype: torch.float16
  • Resolution: 1024 × 1024
  • prior_guidance_scale: 4.0
  • decoder_guidance_scale: 0.0

The card's call does not set a step count. This project therefore keeps the diffusers decoder default of 12 num_inference_steps, and runs the prior on DEFAULT_STAGE_C_TIMESTEPS (30 timesteps: 20 from 1.0 down to 2/3, then 10 more down to 0). The guidance_scale input is sent as prior_guidance_scale. The decoder guidance stays at 0.0, as in the card.

The card's example was trained and shown at resolutions from 1024 × 1024 through 1536 × 1536. This deployment accepts 1024 × 1024, 1280 × 1024 and 1024 × 1280.

Inputs and output

InputRoleDefaultLimit
promptText description of the imagerequired1–1000 characters
negative_promptWhat to avoidemptyat most 500 characters
num_inference_stepsDecoder steps121–50
guidance_scalePrior guidance4.00–15
widthImage width10241024 or 1280, with the other side 1024
heightImage height10241024 or 1280, with the other side 1024
seedRepeat a result-1-1 draws a new seed and prints it; otherwise 0–2147483647

The result is one PNG image. The same prompt, settings and seed produce the same image. A seed of -1 picks a seed at random and prints it.

Licence and credit

The weights are MIT, developed by Pablo Pernias and Dominic Rampas (with Mats Leon Richter, Christopher Pal and Marc Aubreville on the paper).

Model card: https://huggingface.co/warp-ai/wuerstchen

Pinned revisions: decoder c3da41406ddd4d9c48c49aa93981a82354351b83, prior (warp-ai/wuerstchen-prior) c41be6339e1b93f95ece99825327cdf9f4abc436.

Hardware, limits and runtime

This build runs on an NVIDIA A100 slice with 20 GB of GPU memory and 24 GiB of RAM. The pipeline is loaded once in float16 and kept on the GPU. The safetensors weights are about 5.3 GB for the decoder repo (decoder, text encoder and VQGAN) and 6.7 GB for the prior repo (prior and its own text encoder, in float32); loaded in float16 the two stages take well under 10 GB of GPU memory, and inference of a single 1024 image fits that 20 GB budget.

Limits are the input caps above. One image is returned per request. Reconstruction is lossy: the model card notes that faces, hands and other fine detail can look soft.

The model card's "Image Sampling Times" figure compares Würstchen with Stable Diffusion XL on an A100 and does not publish a single second count. With the defaults above (30 prior timesteps and 12 decoder steps at 1024 × 1024), a request on this slice finishes in a few seconds.

Wuerstchen V2 inputs and output

NameTypeRequiredDefaultDetails
prompttextYes—Text description of the image to generate.
Max 1000 characters
negative_prompttextNo—What the image should avoid. Leave empty to use none.
Max 500 characters
num_inference_stepsintegerNo12Decoder steps. The model card leaves this at the library default of 12.
1–50
guidance_scalenumberNo4.0Prior guidance. The model card uses 4.0. The decoder stays at 0.0.
0–15
widthintegerNo1024Image width. 1024, or 1280 when height is 1024.
Allowed: 1024, 1280
heightintegerNo1024Image height. 1024, or 1280 when width is 1024.
Allowed: 1024, 1280
seedintegerNo-1Repeat a previous result. Leave at -1 for a new one each time.
-1–2147483647

Output. Returns binary file.

Run Wuerstchen V2 with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=WUERSTCHEN_V2" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "prompt": "example",
    "guidance_scale": 4.0,
    "height": 1024,
    "negative_prompt": "",
    "num_inference_steps": 12,
    "seed": -1,
    "width": 1024
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "WUERSTCHEN_V2",
        {
          "prompt": "example",
          "guidance_scale": 4.0,
          "height": 1024,
          "negative_prompt": "",
          "num_inference_steps": 12,
          "seed": -1,
          "width": 1024
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Wuerstchen V2 pricing

Price per request: 1.019 credits ($0.01019). The price is shown again before every run; all prices are on the pricing page.

Licence and source

GLM-Image: Image Generation model on Kainguru
Image Generation

GLM-Image

GLM-Image from Z.ai: a 16B model that plans the picture with a language model, then draws it with a diffusion decoder…

Fine-tunable
HiDream-O1-Image: Image Generation model on Kainguru
Image Generation

HiDream-O1-Image

HiDream-O1-Image from HiDream.ai: an 8B text-to-image model that paints directly in pixels, with no separate decoder…

Fine-tunable
Z-Image-Turbo: Image Generation model on Kainguru
Image Generation

Z-Image-Turbo

Fast text-to-image with legible English and Chinese text rendered inside the picture.

Playground v2.5: Image Generation model on Kainguru
Image Generation

Playground v2.5

Aesthetics-tuned SDXL fine-tune for 1024px image generation.

Fine-tunable
SDXL 1.0 Base: Image Generation model on Kainguru
Image Generation

SDXL 1.0 Base

High-resolution text-to-image diffusion at 1024 px from the SDXL 1.0 base model.

Fine-tunable
Stable Diffusion 3.5 Large: Image Generation model on Kainguru
Image Generation

Stable Diffusion 3.5 Large

Text-to-image generation with an MMDiT architecture and strong prompt following.

Fine-tunable