Image Generation

Generates images using Stable Diffusion with checkpoint switching, LoRA support, and self-portrait mode. Use when the user requests pictures, artwork, selfies, or portraits.

rotoslider 710e94d 3 files · 35.1 KB Updated

File contents

Image Generation

When to Use

  • User requests image of themselves → generate_image with self_portrait: true
  • User requests general image → generate_image with self_portrait: false
  • Save generated image to project → save_generated_image with the imageId from generate_image result

Self-Portrait Detection

Auto-detected from phrases: "selfie", "picture of me/you/yourself", "what do you look like"

Size/Aspect Parameters

  • size: "small" (768px), "medium" (1024px), "large" (1536px), "x-large" (1856px)
  • aspect: "portrait" (3:4), "portrait-tall" (9:16), "square" (1:1), "landscape" (16:9), "wide" (21:9)

Important

  • Checkpoint switching is serialized via image generation lock to prevent race conditions
  • LoRA models injected as <lora:name:weight> in prompt
  • Dimensions must be divisible by 32
  • Auto-detects checkpoint type from name (pony, flux, other) for CFG settings

rotoslider/choom/tree/main/nextjs-app/skills/core/image-generation commit 710e94d657

Frequently asked questions

npx skillmds@latest add rotoslider/image-generation