Skip to content
invokeai-image-gen logo

InvokeAI Image Generation

invokeai-image-gen

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.

SKILL.md

Full skill instructions

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

OptionDescription
--prompt, -pGeneration prompt (required)
--negative, -nNegative prompt (SDXL only)
--model, -mModel key (UUID) or partial name match
--width, -W / --height, -HDimensions
--steps, -sDenoising steps
--cfg, -cCFG scale
--guidance, -gGuidance strength (FLUX.1 only)
--schedulerSampling scheduler
--seedRandom seed
--output, -oOutput path (default: invokeai-{seed}.png)
--list-modelsList installed models
--jsonJSON output

Model Defaults

Note: FLUX.2 Klein is the latest model which is used by default.

ModelStepsGuidanceCFGScheduler
FLUX.2 Klein43.51.0euler
Z-Image Turbo9-1.0euler
FLUX.1 dev283.51.0euler
FLUX.1 Krea dev284.51.0euler
FLUX.1 Kontext dev282.51.0euler
FLUX.1 schnell40.01.0euler
SDXL25-6.0dpmpp_2m_k
SDXL Turbo8-1.0dpmpp_sde

All models default to 1024x1024. FLUX requires dimensions divisible by 16, SDXL by 8.

FLUX.1 Variant Notes

  • FLUX.1 dev: Standard text-to-image model, balanced quality/​speed
  • FLUX.1 Krea dev: Fine-tuned for aesthetic photography, use higher guidance (4.5)
  • FLUX.1 Kontext dev: Image editing model, use lower guidance (2.5)
  • FLUX.1 schnell: Distilled fast model, 4 steps, no guidance needed

Model Selection

Auto-priority: Klein > Z-Image > FLUX > SDXL

Detection by name/​base:

  • flux2_klein: "klein" in name or "flux2" in base
  • flux_krea: "krea" in name (FLUX.1 base)
  • flux_kontext: "kontext" in name (FLUX.1 base)
  • flux_schnell: "schnell" in name (FLUX.1 base)
  • flux: "flux" in base (standard dev)
  • zimage: "z-image" in base or "z-image/​zimage" in name
  • sdxl: "sdxl" in base (turbo/​lightning variants auto-detect)

Prompting (general information, but especially useful for FLUX.2 Klein)

Write prose, not keywords. Structure: Subject -> Setting -> Details -> Lighting -> Atmosphere

A weathered fisherman in his late sixties stands at the bow of a wooden boat,
wearing a salt-stained wool sweater. Golden hour sunlight filters through
morning mist, creating quiet determination and solitude.

Key techniques:

  1. Front-load critical elements (word order matters)
  2. Specify lighting: source, quality, direction, temperature
  3. Include sensory texture: materials, reflections, atmosphere

Good: "A woman with short blonde hair poses against a light neutral background wearing colourful earrings, resting her chin on her hand."

Bad: "woman, blonde, short hair, neutral background, earrings"

Append style tags: Style: Country chic. Mood: Serene, romantic.

Troubleshooting

IssueSolution
Connection refusedCheck InvokeAI is running
Model not foundUse --list-models for valid keys
Dimensions errorFLUX: multiples of 16, SDXL: 8
Black images (macOS)Set precision: bfloat16 in invokeai.yaml

If the script fails to find the URL or authentication token, you can set or ask the user to set environment variables:

export INVOKEAI_API_URL='http://localhost:9090'
export INVOKEAI_AUTH_TOKEN='your-token'  # Optional

Resources

  • scripts/​generate.py - Main generation script

More skills from majiayu000

xiaohongshu logo
majiayu000/claude-arsenal

xiaohongshu

xiaohongshu

286 148
View
agent-task-conductor logo
majiayu000/claude-skill-registry

agent-task-conductor

Conduct multi-agent task orchestration and workflow coordination.

663 1
View
conductor-setup logo
majiayu000/claude-skill-registry

conductor-setup

Initialize project with Conductor artifacts (product definition,

663 1
View
animation-designer logo
majiayu000/claude-skill-registry

animation-designer

Expert in web animations, transitions, and motion design using Framer Motion and CSS

663 1
View
diagramming logo
majiayu000/claude-skill-registry

diagramming

Creates Mermaid and ASCII diagrams for flowcharts, architecture, ERDs, state machines, mindmaps, and more. Use when user mentions diagram, flowchart, mermaid, ASCII diagram, text diagram, terminal diagram, visualize, C4, mindmap, architecture diagram, sequence diagram, ERD, or needs visual docume...

663 1
View
h3-pg logo
majiayu000/claude-skill-registry-data

h3-pg

PostgreSQL bindings for H3 hexagonal grid system. Use when working with H3 cells in Postgres, including spatial indexing, geometry/geography integration, and raster analysis.

23 1
View
conductor-development logo
majiayu000/claude-skill-registry

conductor-development

Context-Driven Development skill for projects using Conductor. Use this skill when you detect a `conductor/` directory in the project, when working on tasks defined in a `plan.md` file, or when the user asks about tracks, specs, or plans. Automatically applies TDD workflow, tracks task completion...

663 1
View
conductor-status logo
majiayu000/claude-skill-registry

conductor-status

Display project status, active tracks, and next actions

663 1
View
dockerization logo
majiayu000/claude-skill-registry

dockerization

Official Stakpak application containerization standard operating procedure, a step-by-step guidline to properly dockerize applications. This is a rule book curated by the Stakpak Team.

663 1
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View