Skip to main content

Layer Extraction

Layer extraction automatically creates transparent PNGs from your variations. These layers are the building blocks for combinations.

How It Works

When you generate a variation:

  1. AI generates a modified version of the full image
  2. Mask is applied using the trait's favorite mask
  3. Pixels are extracted only where mask is white
  4. Bounding box is calculated for efficient compositing
  5. Transparent PNG is saved as a layer

The result is a layer that can be placed over the base image to replace that trait.

Automatic Extraction

Layers are extracted automatically when:

  • You generate a new variation
  • You regenerate an existing variation
  • You change the favorite mask (original layers re-extract)

No manual action is required.

Original Layers

The "original" layer for each trait is extracted from your base image:

  • Uses the trait's favorite mask
  • Created when you first set a favorite mask
  • Labeled as orig in the layer strip
  • Always included in layer options

Original layers let you keep the base image's version of a trait in combinations.

Layer Properties

Each layer includes:

PropertyDescription
Image dataTransparent PNG pixels
Bounding boxCropped area coordinates
Trait nameWhich trait this layer belongs to
Prompt indexWhich variation prompt (or "orig")
VersionVariant number (v1-v5)
Display nameHuman-readable identifier

Bounding Box

The bounding box is the smallest rectangle containing all visible pixels:

Original image: 1024 x 1024
Layer bbox: x=200, y=150, width=300, height=400

Bounding boxes enable:

  • Efficient storage (only save needed pixels)
  • Fast compositing (place at correct position)
  • Accurate cropping during export

Viewing Layers

In Variations Page

  • Layer strip - Shows all layers for selected trait
  • Click a layer - Preview in canvas over base image
  • Thumbnail stack - Switch between variants

Layer Information

Hover over a layer to see:

  • Display name
  • Dimensions
  • Prompt used (if variation)

Layer Quality

Layer quality depends on:

  1. Mask accuracy - Clean masks = clean edges
  2. Variation quality - Good AI generation
  3. Style consistency - Variation matches base image

Checking Quality

  1. Select the layer in the layer strip
  2. View it overlaid on the base image
  3. Zoom in on edges
  4. Look for:
    • Clean edges (no jagged pixels)
    • Proper transparency
    • Style consistency

Improving Quality

If layers look wrong:

ProblemSolution
Jagged edgesRefine mask in Detection
ArtifactsRegenerate variation
Style mismatchAdjust variation prompt
Missing areasExpand mask coverage

Storage

Layers are stored as:

  • Transparent PNG files
  • In layers/ directory of your project
  • With UUID filenames internally
  • Referenced by display names on export

Re-extraction

Layers automatically re-extract when:

  • You change the favorite mask for a trait
  • The variation image is regenerated
  • The base image changes (for original layers)

You don't need to manually trigger re-extraction.

Tips

  1. Check masks first - Good masks = good layers
  2. Generate multiple variants - Pick the best extraction
  3. Verify edges - Zoom in on layer edges
  4. Test in combinations - See how layers composite together
  5. Keep originals - Original layers provide fallback option