# Crafting images with the Canvas

import { Image } from 'astro:assets';
import { Steps } from '@astrojs/starlight/components';
import editLayout from '../assets/canvas-edit-layout.webp';
import addLayerMenu from '../assets/canvas-add-layer-menu.webp';
import inpaint from '../assets/canvas-inpaint.webp';
import outpaint from '../assets/canvas-outpaint.webp';
import regional from '../assets/canvas-regional-guidance.webp';
import controlLayer from '../assets/canvas-control-layer.webp';
import inpaintResult from '../assets/canvas-inpaint-result.webp';

The **Canvas** is where you build and refine an image in layers. You can paint, repaint part of an image (inpainting), extend it beyond its edges (outpainting), guide different regions with their own prompts, and steer the composition with control images, generating as many times as you like and keeping only the results you want.

The Canvas lives in the **Edit** layout (**Alt+2**): the Canvas is in the center, the **Generate** panel on the left supplies the model, prompt and settings, and the **Layers** panel on the right lists the canvas's layers and their settings.

<Image src={editLayout} alt="The Edit layout: the Generate panel on the left, the Canvas with a glowing jellyfish over a city at dusk in the center, its inpaint masks and regional guidance areas visible, and the Layers panel with its color picker, layer list and Properties on the right." />

This page introduces the main ideas and tasks. The [Canvas guide](/users-guide/canvas/canvas-guide/) and the [Layers panel guide](/users-guide/canvas/layers-panel/) describe every tool, menu and setting.

## Canvas concepts

### Layers

A canvas is a stack of layers. Each layer has a type, which decides what it contributes to a generation:

| Layer type | What it is for |
|---|---|
| **Raster layer** | Ordinary image content: pictures, painting, shapes, gradients and text. The visible raster content inside the generation frame is the starting image for a generation. |
| **Inpaint mask** | Marks the area to regenerate. Everything outside the mask is kept. |
| **Regional guidance** | Marks an area that gets its own prompt, and optionally its own reference image, so different parts of the image can be described differently. |
| **Control layer** | Holds a guide image, such as edges, a depth map or a pose, that a control model uses to shape the composition. |

The Layers panel groups layers by type, in the stacks **Inpaint Masks**, **Regional Guidance**, **Control Layers** and **Raster Layers**. Within a stack, higher layers are drawn over lower ones. Add a layer with the **+** button above the layer list:

<Image src={addLayerMenu} alt="The Add layer menu with Inpaint mask, Regional guidance, Regional reference image, Control layer, Raster layer and New group." width={500} />

Each layer row has an eye button on the right. A hidden layer is off the canvas and takes no part in generation. To only get a mask, regional guidance or control layer out of view while it still affects generation, choose **Hide on canvas only** in its right-click menu. **Shift+H** does that for all of them at once so you can see the image underneath.

### Settings live in the Properties pane

Each layer's settings, such as a regional prompt or a control layer's model, are in the **Properties** tab at the bottom of the Layers panel. Select the layer and click **Properties**: the heading at the top of the tab confirms which layer you are editing, for example *Layer: Regional Guidance 1*. The settings are in its **Layer** section. The Layer section comes after the settings of the active tool, so **you may need to scroll the Properties pane down to see it**. Dragging the divider above the Properties pane upward, or collapsing the color picker, gives it more room.

### The generation frame

The dashed rectangle on the canvas is the **generation frame**, also called the bounding box. Only the area inside it is generated: what lies inside is the model's starting point, and the result is placed back in the same spot. The frame's size is the generation size, and it stays in step with the **Size** section of the Generate panel. Move and resize it with the **Generation frame** tool (press **C**). See [The generation frame](/users-guide/canvas/canvas-guide/#the-generation-frame) for details.

### What Invoke does

When the Canvas is the source of a generation, InvokeAI looks at what is inside the generation frame and chooses the kind of generation for you:

| Inside the frame | Generation |
|---|---|
| No visible raster content | **Text to image**: a new image from the prompt alone. |
| Raster content covering the whole frame, no inpaint mask | **Image to image**: the content is repainted. **Denoising strength** in the Generate panel sets how much it changes. |
| Raster content covering the frame, and an inpaint mask | **Inpainting**: only the masked area is regenerated. |
| Raster content that covers only part of the frame | **Outpainting**: the empty part is filled in, blending into the existing content. |

## Sending generations to the Canvas

In the Edit layout, **Invoke** uses the Canvas as its source and sends the results back to the Canvas. Hover over **Invoke** to see the route in its card. Editing the canvas switches the route back to the Canvas automatically, unless the routing is locked. See [Routing images to the Gallery or the Canvas](/users-guide/image-generation/introduction/#routing-images-to-the-gallery-or-the-canvas).

When the source is the Canvas, the **Size** section's width and height are the frame's, and **Render at** at the bottom of the section chooses the size the model generates at before the result is scaled back to the frame (legacy versions called this *Scale before processing*): the frame's own size, the model's optimal size, or a custom size. The **Render** section adds **Denoising strength** below the guidance scale: how much image-to-image, inpainting and outpainting may change the existing content. The default is 75%, and the section header shows the current value. The Generate panel also adds a **Compositing** section at the bottom, which sets how inpainted and outpainted areas are filled and blended: **Infill method**, **Coherence pass mode**, **Coherence edge size**, **Coherence min denoise** and **Mask blur**.

Results do not go straight onto the canvas. They appear in the **staging area**, a bar at the bottom of the canvas where you can step through the candidates, then **Accept to layer** the one you want (it becomes a new raster layer), **Save to gallery**, or **Discard** (with **Undo**). You can keep editing while results generate or wait for review: every tool works, and each result keeps the place it was generated for, even if you move the generation frame.

## Inpainting

Inpainting regenerates part of an image and leaves the rest untouched: remove an object, fix a face, or change what is in a corner.

<Image src={inpaint} alt="An inpaint mask, shown as a red overlay, painted over a rock in a mountain landscape." width={420} />

<Steps>

1. **Add an inpaint mask**, or select the empty one a new canvas starts with, in the **Inpaint Masks** stack. (A new canvas opens with nothing selected and the Brush active, so a stroke there paints a new raster layer.)

2. **Paint the mask.** Choose the **Brush** (**B**) and paint over the area to regenerate, or draw it with the **Shape** tool (**U**). The mask shows as a tinted overlay. The **Eraser** (**E**) removes mask, and **[** and **]** change the brush size.

3. **Describe the result** in the Generate panel's prompt: describe the whole picture as it should look, or just what should appear in the masked area.

4. **Press Invoke**, then pick a result in the staging area and click **Accept to layer**.

</Steps>

<Image src={inpaintResult} alt="Inpainting a plate of sushi: on the left, an inpaint mask over one piece; on the right, the result in the staging area, where that piece has become salmon-roe sushi, ready for Accept to Layer." />

**Denoising strength** controls how much the masked area may change: lower values keep its colors and shapes, higher values replace it. Two optional modifiers, added from the mask's right-click menu, give finer control: **Add noise** adds noise inside the mask before generating, and **Add denoise limit** caps how strongly it can be repainted. The mask's **Invert mask** button, in its Properties, swaps the masked and unmasked areas.

## Outpainting

Outpainting extends an image beyond its edges.

<Image src={outpaint} alt="The generation frame extended to the right of the landscape image, leaving an empty area to be filled." width={420} />

<Steps>

1. **Choose the Generation frame tool** (press **C**).

2. **Extend the frame** past the edge of the image by dragging its handles, or type a new width and height in the **Frame** section of the Properties pane. Part of the frame now covers empty canvas.

3. **Press Invoke.** The empty area is filled first, using the **Infill method** in the Generate panel's **Compositing** section, and then generated so that it blends into the existing image.

</Steps>

Include some of the existing image in the frame, since the model uses it to continue the scene. You can combine outpainting with an inpaint mask to regenerate part of the existing image at the same time.

## Regional prompts and reference images

Regional guidance gives one area of the image its own prompt. For example, keep the main prompt for the landscape and add birds only in the sky.

<Image src={regional} alt="A regional guidance layer, shown in green over the sky, with the prompt &quot;a flock of birds soaring over the peaks&quot; in the Layer section of the Properties pane." />

<Steps>

1. **Add a Regional guidance layer** with **+ → Regional guidance**.

2. **Paint the region** with the **Brush**, or draw it with the **Shape** tool. It shows as a tinted overlay.

3. **Enter the region's prompt.** With the layer selected, open **Properties** and scroll down to its **Layer** section. Type in **Positive prompt**, and optionally **Negative prompt**. The prompt is saved when you click away from the field.

4. **Press Invoke.** The main prompt still describes the whole image; the regional prompt applies inside the region.

</Steps>

To guide a region with an image instead of, or as well as, words, choose **Add reference image** from the regional guidance layer's right-click menu, or add a **Regional reference image** layer from the **+** menu. The reference appears as a row under the layer; select that row to choose its image, model and weight in Properties.

Regional guidance works with SD 1.5, SDXL, FLUX.1, FLUX.2, FLUX.3, Krea-2, Z-Image, Anima, MOSS-Image and Ideogram 4. [FLUX.3](/users-guide/models/local-models/flux-3/#layout-boxes-from-regional-guidance), MOSS-Image and Ideogram 4 place each region as a box in a JSON prompt instead of masking its prompt. MOSS-Image offers a **Region type** (Object by default, Character or Text); see [MOSS-Image](/users-guide/models/local-models/moss-image/#layout-with-canvas-regions) and [Ideogram 4](/users-guide/models/local-models/ideogram4/#prompting-ideogram-4). Regional negative prompts and auto-negative are available for SD 1.5, SDXL, Krea-2, Z-Image and Anima. For Krea-2, Z-Image and Anima, they take effect only at CFG Scale above 1. Regional reference images are available for SD 1.5, SDXL (IP-Adapter) and FLUX.1 (FLUX Redux). With other models, regional layers are skipped, and the layer's Properties say so. For a reference image that applies to the whole picture, use **Add reference image** in the Generate panel instead.

## Control layers

A control layer shapes the composition with a guide image: the edges of a sketch, the depth of a scene, or a person's pose. A control model makes the generated image follow it. You choose what the layer controls, and InvokeAI detects the matching map from your image and picks the model.

<Image src={controlLayer} alt="A control layer's settings in the Layer section of Properties." width={420} />

<Steps>

1. **Add a control layer with an image.** Do one of these:
   * Choose **+ → Control layer**, then **Upload** an image, use the **Frame** (what is visible inside the generation frame), or **Draw** the guide yourself. These buttons are in the layer's Properties, in its **Image** row.
   * Right-click an image in the Gallery and choose **Use as Control**. It fills the selected control layer if that layer has no image yet, and otherwise adds a new control layer.
   * Right-click a raster layer and choose **Use as control layer**, which copies its pixels to a new control layer.
   * Drag an image from the Gallery onto the canvas and drop it on **Add as control layer**. As with **Use as Control**, it fills the selected control layer if that layer is still empty.
   * Select an empty control layer and drop an image file from your computer onto the canvas, where the layer shows *Drop an image here*. The file is uploaded into that layer.

2. **Choose the Type**: **Pose**, **Depth**, **Edges**, **Soft edges**, **Line art**, **Sketch**, **Color** or **Tile**. Next to each type, the menu says how many installed models are made for it, *via Union* when only a Union model covers it, or *Not installed*.

3. **Check the Detection.** The type's detector turns your image into the map the model expects, such as a depth map or an edge map, in the background. If your image is already such a map, choose the **None** option, for example *None: image is already a depth map*. See [Control layer](/users-guide/canvas/layers-panel/#control-layer) for the details.

4. **Check the Model.** InvokeAI picks it for you, and the line under the **Model** row says why. Choose another model from the list if you prefer. A model made for the type, or a Union model that covers it, is then remembered for that type; any other model is used for this layer only.

5. **Adjust the influence** with **Weight** (how strongly the guide is followed), **Steps** (which part of the generation it applies to) and, for ControlNet, **Priority**. Then press Invoke.

</Steps>

Once a map has been detected, a switch above the canvas shows the layer as its **Original** image, the detected **Map**, or an **Overlay** of the two. The switch changes only what you see; generation always uses the map.

An empty control layer, or one with neither a type nor a model, only shows a warning and contributes nothing; Invoke stays available. A control layer with an image blocks Invoke if no model can be chosen for it, or if its map is out of date. **Invoke** then shows the number of issues, for example *Invoke · 1 issue*; click it to list them, and choose **Show layer** to select the layer that needs attention.

Control layers work with SD 1.5, SDXL, FLUX.1, FLUX.2 [dev], Qwen Image, Z-Image and Anima, and need a control model for the same family, installed from the Model Manager's starter models. If no model fits, the **Model** row says so, with a link to the Model Manager when you can manage models.

## Drawing on a raster layer

You can paint directly on the canvas, for example to sketch a composition for image-to-image, or to touch up a result.

1. **Select a raster layer** in the Layers panel, or add one with **+ → Raster layer**. If you start painting with no suitable layer selected, a new raster layer is created for you.
2. **Pick a color** in the color picker at the top of the Layers panel. Its two chips are the foreground color, used by the brush, and the background color. **X** swaps them and **D** resets them to black and white. Hold **Alt** to pick a color from the canvas.
3. **Choose the Brush** (**B**) and paint. Its **Size**, **Opacity** and **Hardness** are in the Properties pane; **[** and **]** change the size. The **Eraser** (**E**) erases.

The tool strip also has shape, gradient and text tools, which are described in the [Canvas guide](/users-guide/canvas/canvas-guide/).

## Adding a gallery image to a layer

There are three ways to bring an existing image onto the canvas:

* **Drag it from the Gallery.** With the Gallery and the Canvas both on screen (for example, the Compose layout with its center view switched to Canvas), drag an image onto the canvas. Drop zones appear: **Add as raster layer**, **Add as control layer**, **Add as regional reference image**, **Add as inpaint mask** and **Add as resized control layer**, which scales the image to the model's optimal size.
* **Use the image's menu.** Right-click an image in the Gallery or Preview, or open **Edit** in the Preview's header. **Edit on Canvas** adds it as an image layer and opens Canvas; **Add to Canvas as…** lets you choose the kind of layer. **New project from image** instead starts a new project whose canvas holds the image, sized to fit it; the current project is left as it is.
* **Paste it.** Copy an image, click the canvas and press **Ctrl+V** (**Cmd+V** on macOS). It is added as a new raster layer at the generation frame.

A new raster layer from an image is placed at its full size at the top-left of the generation frame. Use the **Move** (**V**) or **Transform** (**Shift+T**) tool to position and scale it.