flux2_klein (4B) or flux2_klein_9b. Z-Image-Turbo serves text-to-image only.
Install and start
Every default fits its stages on one GPU. Access to the 9B weights is gated. Check the 9B checkpoint terms and obtain download access before starting it.flux2_klein
Text, image → image. The default flux2_klein.yaml uses 1 GPU. The weights use Apache-2.0.
flux2_klein_9b
Text, image → image. The default flux2_klein_9b.yaml uses 1 GPU. The weights use FLUX Non-Commercial.
z_image_turbo
Text → image. The default z_image_turbo.yaml uses 1 GPU. The weights use Apache-2.0.
Send a request
Run either client example in a second terminal after/health returns 200.
Generate an image
Save the returned PNG. Python SDKDeployment configs
Each captures the denoise step at 1024x1024 and sets
resources: dit_attn: backend: sdpa.
To use an alternative, pass --config configs/<file> after the launcher name. From a wheel installation, copy the shipped YAML and pass its local path.
Settings and defaults
Set these undermodel_kwargs in the config.
With the earlier compiled VAE, plain compilation with eager rounding gave median image PSNR against eager of 37.6 dB for klein-4B and 35.6 dB for klein-9B over 100 prompts. Keeping the norms made both transformers bit-exact with eager in tests before q/k norm fusion. Z-Image measured 34 dB median before fusion. Keeping its 180 norms per step raised every tested prompt to at least 55.9 dB and cost 45% of batch-one latency. Measurement details
backend on the dit_attn resource picks the attention kernel: sdpa runs torch’s SDPA, as the configs ship, and a ragged-attention backend such as flashinfer runs the engine’s ragged attention resource. Remove the block to let the GPU’s kernel table choose.
Limits
- Z-Image refuses reference images and sides over 8192 px.
/v1/images/editstakes one image and no mask. Send several reference images through the SDK or/generate.- klein’s
lorais a merge at load, not a per-request adapter, and a DoRA adapter is refused. Neither model serves per-request LoRA.