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:
- AI generates a modified version of the full image
- Mask is applied using the trait's favorite mask
- Pixels are extracted only where mask is white
- Bounding box is calculated for efficient compositing
- 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
origin 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:
| Property | Description |
|---|---|
| Image data | Transparent PNG pixels |
| Bounding box | Cropped area coordinates |
| Trait name | Which trait this layer belongs to |
| Prompt index | Which variation prompt (or "orig") |
| Version | Variant number (v1-v5) |
| Display name | Human-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:
- Mask accuracy - Clean masks = clean edges
- Variation quality - Good AI generation
- Style consistency - Variation matches base image
Checking Quality
- Select the layer in the layer strip
- View it overlaid on the base image
- Zoom in on edges
- Look for:
- Clean edges (no jagged pixels)
- Proper transparency
- Style consistency
Improving Quality
If layers look wrong:
| Problem | Solution |
|---|---|
| Jagged edges | Refine mask in Detection |
| Artifacts | Regenerate variation |
| Style mismatch | Adjust variation prompt |
| Missing areas | Expand 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
- Check masks first - Good masks = good layers
- Generate multiple variants - Pick the best extraction
- Verify edges - Zoom in on layer edges
- Test in combinations - See how layers composite together
- Keep originals - Original layers provide fallback option