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.
What this skill does
# 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:
```bash
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:
```bash
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 |
| `--steps, -s` | Denoising steps |
| `--cfg, -c` | CFG scale |
| `--guidance, -g` | Guidance strength (FLUX.1 only) |
| `--scheduler` | Sampling scheduler |
| `--seed` | Random seed |
| `--output, -o` | Output path (default: invokeai-{seed}.png) |
| `--list-models` | List installed models |
| `--json` | JSON output |
## Model Defaults
Note: FLUX.2 Klein is the latest model which is used by default.
| Model | Steps | Guidance | CFG | Scheduler |
|-------|-------|----------|-----|-----------|
| FLUX.2 Klein | 4 | 3.5 | 1.0 | euler |
| Z-Image Turbo | 9 | - | 1.0 | euler |
| **FLUX.1 dev** | 28 | 3.5 | 1.0 | euler |
| **FLUX.1 Krea dev** | 28 | 4.5 | 1.0 | euler |
| **FLUX.1 Kontext dev** | 28 | 2.5 | 1.0 | euler |
| **FLUX.1 schnell** | 4 | 0.0 | 1.0 | euler |
| SDXL | 25 | - | 6.0 | dpmpp_2m_k |
| SDXL Turbo | 8 | - | 1.0 | dpmpp_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
| Issue | Solution |
|-------|----------|
| Connection refused | Check InvokeAI is running |
| Model not found | Use `--list-models` for valid keys |
| Dimensions error | FLUX: 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:
```bash
export INVOKEAI_API_URL='http://localhost:9090'
export INVOKEAI_AUTH_TOKEN='your-token' # Optional
```
## Resources
- `scripts/generate.py` - Main generation script
Related in Image & Video
watch
IncludedWatch a video (URL or local path). Downloads with yt-dlp, extracts auto-scaled frames with ffmpeg, pulls the transcript from captions (or Whisper API fallback), and hands the result to Claude so it can answer questions about what's in the video.
physical-ai-defect-image-generation
IncludedUse when the user wants to orchestrate defect image generation, run associated setup, or handle outputs on OSMO. The Day 0 path handles cold-start with USD-to-ROI, image-edit augmentation, and AnomalyGen to create initial PCBA datasets. The Day 1 path performs inference and labeling on real images. This skill helps with first-time asset setup, creation of finetuning checkpoints, and configuring deployment. Trigger keywords: defect image generation, dig workflow, dig pipeline, defect image detection workflow, aoi pipeline, aoi anomalygen, usd2roi anomalygen, day 0 pcba, day 1 pcba, day 1 real-photo alignment, day 1 manual roi, metal surface anomaly, glass defect, anomalygen finetune, setup_pcb, setup_metal, setup_glass, setup_pretrained, dig setup, dig datasets, dig pretrained checkpoint, dig image-edit endpoint.
accelint-react-best-practices
IncludedReact performance optimization and best practices. ALWAYS use this skill when working with any React code - writing components, hooks, JSX; refactoring; optimizing re-renders, memoization, state management; reviewing for performance; fixing hydration mismatches; debugging infinite re-renders, stale closures, input focus loss, animations restarting; preventing remounting; implementing transitions, lazy initialization, effect dependencies. Even simple React tasks benefit from these patterns. Covers React 19+ (useEffectEvent, Activity, ref props). Triggers - useEffect, useState, useMemo, useCallback, memo, inline components, nested components, components inside components, re-render, performance, hydration, SSR, Next.js, useDeferredValue, combined hooks.
elevenlabs-agents
IncludedBuild conversational AI voice agents with ElevenLabs Platform using React, JavaScript, React Native, or Swift SDKs. Configure agents, tools (client/server/MCP), RAG knowledge bases, multi-voice, and Scribe real-time STT. Use when: building voice chat interfaces, implementing AI phone agents with Twilio, configuring agent workflows or tools, adding RAG knowledge bases, testing with CLI "agents as code", or troubleshooting deprecated @11labs packages, Android audio cutoff, CSP violations, dynamic variables, or WebRTC config. Keywords: ElevenLabs Agents, ElevenLabs voice agents, AI voice agents, conversational AI, @elevenlabs/react, @elevenlabs/client, @elevenlabs/react-native, @elevenlabs/elevenlabs-js, @elevenlabs/agents-cli, elevenlabs SDK, voice AI, TTS, text-to-speech, ASR, speech recognition, turn-taking model, WebRTC voice, WebSocket voice, ElevenLabs conversation, agent system prompt, agent tools, agent knowledge base, RAG voice agents, multi-voice agents, pronunciation dictionary, voice speed control, elevenlabs scribe, @11labs deprecated, Android audio cutoff, CSP violation elevenlabs, dynamic variables elevenlabs, case-sensitive tool names, webhook authentication
humanizer
IncludedHumanize AI-generated text by detecting and removing patterns typical of LLM output. Rewrites text to sound natural, specific, and human. Uses 28 pattern detectors, 560+ AI vocabulary terms across 3 tiers, and statistical analysis (burstiness, type-token ratio, readability) for comprehensive detection. Use when asked to humanize text, de-AI writing, make content sound more natural/human, review writing for AI patterns, score text for AI detection, or improve AI-generated drafts. Covers content, language, style, communication, and filler categories.
generating-mermaid-diagrams
IncludedSalesforce architecture diagrams using Mermaid with ASCII fallback. Use this skill when generating text-based diagrams for Salesforce architecture, OAuth flows, ERDs, integration sequences, or Agentforce structure. TRIGGER when: user says "diagram", "visualize", "ERD", or asks for sequence diagrams, flowcharts, class diagrams, or architecture visualizations in Mermaid. DO NOT TRIGGER when: user wants PNG/SVG image output (use generating-visual-diagrams), or asks about non-Salesforce systems.