| name | invokeai-image-gen |
| description | Generate images using InvokeAI's local API. Use when asked to generate, create, or make images with InvokeAI, FLUX.2 Klein, Z-Image Turbo, FLUX, or SDXL models. Supports text-to-image generation, automatic model detection, image download, and parameter selection based on model architecture. |
InvokeAI Image Generation
Generate images via InvokeAI's REST API. Supports FLUX.2 Klein (default), Z-Image Turbo, FLUX.1, and SDXL.
Quick Start
Simply call the script with your prompt and the output file name:
python scripts/generate.py -p "A dramatic sunset over snow-capped mountains, warm orange light reflecting off a still alpine lake in the foreground. Soft clouds catch the fading light." -o sunset.png
Overriding The Default Model
If the user asks you to use a specific model, first find the model key, then use it in the command:
python scripts/generate.py --list-models | grep -i 'flux'
python scripts/generate.py -p "A tabby cat with bright green eyes sits on a weathered wooden windowsill, soft afternoon light streaming through lace curtains. Cosy, intimate mood." --model MODEL_KEY -o cat.png
Options
| Option | Description |
|---|
--prompt, -p | Generation prompt (required) |
--negative, -n | Negative prompt (SDXL only) |
--model, -m | Model key (UUID) or partial name match |
--width, -W / --height, -H | Dimensions |
|