इसे छोड़कर कंटेंट पर जाएं
Invoke

Canvas guide

यह कंटेंट अभी तक आपकी भाषा में उपलब्ध नहीं है।

This page describes the Canvas itself: its tools, controls and menus. For an introduction to working with the Canvas, see Crafting images with the Canvas. The Layers panel, where layers and their settings are managed, has its own guide.

Each project has one canvas. It opens in the center of the Edit layout (Alt+2), or press 2 to bring it to the front.

The Canvas with its tool strip on the left and the header buttons along the top: the zoom menu, the Frame menu, undo and redo, save, clear canvas, settings and more.

The tool strip on the left edge of the canvas holds the drawing and editing tools; hover a tool to see its key. A tool’s options appear in the Tool section of the Properties tab in the Layers panel, not on the canvas. A new canvas opens on the Brush (an older project whose empty inpaint mask is selected opens on View, so a first stroke never paints the mask by surprise); after that, each project remembers the tool you were using.

A tool that cannot change the selected layer says so instead of doing nothing: the pointer shows a no-entry sign over the canvas, and a press explains that the layer is hidden or locked, or still loading. With a locked or hidden image layer selected, the Brush offers Paint on a new layer rather than adding one unasked. The new layer goes above that layer, or above the group that locks or hides it, and is selected; pressing again replaces the offer instead of adding another.

ToolKeyWhat it does
ViewHPan by dragging. Hold Space to pan from any tool.
MoveVMove the selected layers. Shift locks the direction. Dragging inside a selection lifts the selected pixels so you can move them; Enter places them.
TransformShift+TScale and rotate the selected layer with handles. See Transforming layers.
Generation frameCMove and resize the generation frame. Tap C to switch to it, or hold C to use it briefly.
BrushBPaint on the selected raster layer, or paint a mask or region on the selected inpaint mask or regional guidance layer. Shift-click draws a straight line from the end of the last stroke on that layer.
EraserEErase paint or mask. Shift-click erases a straight line, as with the Brush.
ShapeUDraw a rectangle, ellipse, triangle, star, polygon or freehand shape on a raster layer, or add a shaped area to the selected inpaint mask or regional guidance layer. Press U again to cycle through the shapes.
GradientGCreate a linear or radial gradient.
TextTAdd editable text.
Marquee select / Lasso selectM / LSelect an area of pixels. Press M again to switch between rectangle and ellipse, or L again for freehand and polygon.
Color pickerIPick a color from the canvas (see below).

The Shape and Select buttons hold several tools. Click to use the current one, or press and hold (or right-click, or press → on) the button to choose another from a menu that lists each tool with its shortcut. To pick a color from the canvas, hold Alt with the Brush, Eraser, Gradient, Text or View tool and click, or press I for the Color picker tool. Move, Transform, the Generation frame, Shape and the selection tools use Alt themselves, so holding it there changes their drag instead. While you pick, a round loupe follows the pointer: it magnifies the pixels around it, boxes the pixel that will be picked in the center, and shows that pixel’s RGB values. The pointer itself is hidden, so aim with the boxed pixel. You can drag to sample as you go; the color is set when you release, and Escape cancels the pick and restores the previous color. The picked color goes to what you are editing:

  • the selected mask’s tint, while Mask tint is chosen in the Color tab;
  • the selected shape layer’s fill when the foreground chip is active, or its stroke when the background chip is active. A pick never turns on a fill or stroke the shape doesn’t have; it sets the active color instead;
  • the selected text layer’s color;
  • otherwise the active foreground or background color.

A pick that changes a layer is one undoable step. Gradient stops are not picked into; with the Gradient tool, the pick sets the foreground or background color.

  • Brush — Size, Opacity and Hardness; the Foreground color; and, under Dynamics, whether pen pressure affects the width or the opacity. [ and ] make the brush smaller or larger, and so does Ctrl+scroll. Painting on an image layer, such as an accepted result or an added picture, paints on that layer itself instead of adding a new one; one undo restores the original image. Shift-click joins the click to the end of the last Brush or Eraser stroke on the same layer with a straight line. The line follows the selection and the frame clipping like any stroke, and one undo removes it. Undo, redo or deleting the layer clears the remembered point, so the next Shift-click paints a dot.
  • Eraser — Size, Opacity and Hardness; and, under Dynamics, whether pen pressure affects the width. Pressure never changes how strongly the eraser erases.

The Brush, Eraser, Shape and Text options are remembered for your account, so they are the same in every project and after a reload. Colors are the project’s own.

  • Shape — settings for the next shape: its Kind, a row of buttons showing each shape (point at one for its name), and Place on, which draws on the Selected layer or on a New layer of its own. Only a paint layer, an inpaint mask or a regional guidance layer takes shape pixels. With anything else selected, or nothing selected, Selected layer is unavailable and New layer shows where the shape will go; a note below explains why. Your placement preference returns when you select a paint layer or mask. Under the tool’s Appearance group, Fill, Stroke and stroke Width set the next shape’s defaults. To edit an existing shape’s appearance, use the Layer section below the tool options; those controls stay available with any tool active and each gesture is one undoable step. Shift constrains the proportions, Alt draws from the center, and Shift+Alt does both. Ctrl (Cmd on macOS) cuts the shape out of the selected paint layer or mask instead of drawing it, whatever Place on says: it erases like the Eraser and never adds a layer. With no paint layer or mask selected, a notice says so and nothing is drawn. For polygons, click to place points and double-click, press Enter or click the first point to close the shape; Escape drops the points without drawing anything. With an inpaint mask or regional guidance layer selected, the shape is added to the mask or region, which makes shapes a quick way to mark rectangular or geometric areas; the colors are ignored.
  • Gradient — Kind (Linear or Radial), Angle, and the color Stops, which can be added and removed or follow the foreground and background colors. Dragging creates a gradient layer the size of the generation frame, or repositions the selected gradient layer.
  • Text — the font Family, Style or Weight, Size, Line height, Align and Fill color. Click the canvas to start typing; Ctrl+Enter or clicking elsewhere finishes the text, and Escape cancels it. The text stays editable as a text layer.
  • Marquee select and Lasso select — the Shape and the selection Mode (Replace, Add, Subtract or Intersect). Shift adds to the selection and Alt subtracts from it. A polygon lasso closes like a polygon shape, and Escape drops its points while keeping the current selection. The Actions fill or erase the selection, lift it to a New layer, Invert it, select everything, or Deselect.

The Text tool offers built-in font families, plus any fonts you add. To add fonts, open Fonts in the Launchpad and use Add Fonts to upload .ttf, .otf, .woff or .woff2 files. Uploaded fonts are private to your account (My fonts); administrators can also upload shared fonts for everyone on the server. Select a font in the library to preview it and see its variation axes and named instances. Variable fonts expose those axes in the Text tool’s options.

Fonts placed in the server’s fonts directory are also available to everyone. It is fonts in the InvokeAI root folder by default and can be changed with fonts_dir in invokeai.yaml. It may contain subfolders. Refresh the app after adding or removing files there.

If a project uses a font that is not installed, a dialog lets you retry, upload the font, or choose a replacement. You can keep editing with a marked fallback, but generating or saving the affected text needs the font. When you export a project, Include font files bundles the fonts it uses, if you have the right to redistribute them.

Selections restrict painting: while an area is selected, brush strokes stay inside it. Ctrl+A selects all, Ctrl+D deselects and Ctrl+Shift+I inverts the selection.

  • Zoom with the mouse wheel, which zooms around the pointer, or choose a level from the zoom menu in the header (25% to 500%). Ctrl+1, Ctrl+2, Ctrl+3 and Ctrl+4 zoom to 100%, 200%, 400% and 800% around the center of the view. Many browsers use these keys to switch tabs and do not pass them to the page; there, choose Zoom to 100%, Zoom to 200%, Zoom to 400% or Zoom to 800% from the command palette (Ctrl+K), or assign other keys in Settings → Hotkeys.
  • Pan with the View tool, by holding Space, or by dragging with the middle mouse button.
  • Fit to view, at the top of the header’s zoom menu, fits the generation frame and all layers into the window.

The buttons along the top of the canvas, from left to right:

  • Zoom — shows the current zoom level. Its menu offers Fit to view, then the zoom levels from 25% to 500%.
  • Frame — a menu for the generation frame:
    • Edit frame selects the Frame tool, so you can drag its handles or type a size in the tool options.
    • Fit frame to layers (Shift+N) resizes the generation frame to the area all layers cover. With Snap to grid on, the frame then shrinks inward to the model’s grid, so it can trim up to one grid step less one pixel from each edge of the layers.
    • Fit frame to masks (Shift+B) resizes the generation frame to enclose the inpaint masks, with a margin of the Mask blur (in the Generate panel’s Compositing section) plus 8 pixels, so the blurred edge of the mask stays inside the frame. With the default blur of 16, the margin is 24 pixels. With Snap to grid on, the frame then grows outward to the model’s grid, so the margin can be wider but never narrower.
    • Use frame as takes a snapshot of what is inside the frame as a New global reference image, New regional reference image, New control layer or New raster layer, the same as Create from frame in the right-click menu. Later edits to the canvas do not change the snapshot.
  • Undo (Ctrl+Z) and Redo (Ctrl+Shift+Z or Ctrl+Y). Their tooltips name the step they would undo or redo.
  • Save to Gallery — a menu with Save Frame to Gallery, which saves only what is inside the generation frame, and Save Canvas to Gallery, which saves the area the visible raster layers cover. Each item shows the size it would save and the board it goes to: the board new results go to, named under Saving to in the Gallery header (see Choosing where new media goes). A message names the board the image went to; its Show in Gallery button selects the image in the Gallery and keeps the Canvas in the center.
  • Clear canvas (Ctrl+Alt+N, Cmd+Option+N on macOS) — clears all layers and staged results and starts a fresh canvas with an empty inpaint mask. The confirmation says how many layers and staged results go, and when generations are still running for this canvas it offers to stop them (otherwise their results are thrown away when they finish). Strokes still being saved are saved first; if they cannot be, nothing is cleared. A restore point in the History tab keeps the cleared canvas, and the notice that follows has Undo (a blank canvas keeps no restore point). The canvas’s undo history is cleared.
  • Canvas settings — see below.

The generation frame is the area that is generated. With the Generation frame tool selected, drag inside the frame to move it and drag its handles to resize it. Shift keeps the proportions, Ctrl resizes from the center, and Alt, held before or during the drag, turns off snapping to the model’s grid.

The Generation frame tool's options: Position X and Y, and the Frame's Size and Aspect with a lock button.

The tool’s options show the frame’s Position and Size, and an Aspect picker with the common aspect ratios and your saved ratios, with a lock. Picking a ratio keeps the frame’s pixel count and resizes it around its center, as picking it in the Generate panel does; the lock alone keeps the frame’s size. While the Canvas is where you generate, the frame and the Generate panel’s Size section are one size: the section says Linked to the canvas frame, the aspect lock is shared, and a width or height typed in either place resizes the frame around its center. A frame resize made from the Generate panel is a canvas step, so Ctrl+Z on the canvas puts the frame and the size back together. The size snaps to the sizes the selected model supports.

When you press Invoke, the enabled raster content inside the frame is combined into the image the model starts from. Content outside the frame is not included, even though it remains visible on the canvas. Control layers and regional guidance are likewise read only inside the frame.

This makes placement important. If the model needs to continue a shape, match a texture or keep part of a subject, include enough of it inside the frame to give the model context. Moving the frame changes which part of the image the next generation can use.

The frame is not a mask: everything inside it can change in image-to-image. To regenerate only part of the area, add an inpaint mask.

The frame is the final footprint of the generation on the canvas. With Render at (at the bottom of the Generate panel’s Size section; legacy versions called it Scale before processing) set to Optimal for model or Custom, InvokeAI generates at a different resolution, such as the model’s optimal size, and then resizes the result to fit the frame. When the two differ, the Size section’s badge shows both, frame first, and its preview outlines the render size with a dashed line. Optimal for model only enlarges a frame smaller than the model’s optimal size; it never shrinks a larger one. Choose a frame large enough to include the context the model needs, while keeping it within a size the model and your GPU memory handle well.

Optimal for model is the default, including for older projects that never saved a choice. Those projects previously generated at the frame’s size. Processing at a different resolution can change the result for the same seed, generation time, and GPU memory use. To generate at the frame’s exact size, choose Frame size; saved choices are preserved.

Choose Transform from a layer’s menu, or press Shift+T, to scale and rotate the selected layer. The handles appear at once, even when the Transform tool is already active; if a brush stroke is still being saved, the tool switches straight away and the handles appear when the stroke is saved. Transform works on enabled raster and control layers with content.

  • Drag a corner or edge handle to scale. Shift scales proportionally and Alt, held before or during the drag, scales from the center.
  • Drag just outside a corner to rotate. Shift rotates in 15° steps.
  • Drag inside to move.

Press Enter or click Apply to finish, or Escape or Cancel to undo the transform. The Transform tab of the Layers panel sets the position, scale and rotation numerically. A negative scale flips the layer.

To crop a layer to the generation frame, choose Crop layer to frame from its menu; a layer entirely outside the frame is left alone. Fit to frame scales a layer to fit inside the frame. To crop every layer at once, use Crop all layers to frame in the canvas menu.

Filter, in a raster layer’s menu or its Properties, processes the layer. A control layer has no Filter: its map comes from the Detection row in its Properties. Starting Filter opens the Layers panel’s Properties tab, headed Operation: Filter, where you choose and preview the filter. The filters are grouped by purpose:

  • Edge detection — Canny, HED, Lineart, Lineart Anime, MLSD, PiDiNet and Scribble.
  • Depth & normal — Depth Anything and Normal map.
  • Pose & face — DW Openpose and Mediapipe Face.
  • Color & tone — Color map, Adjust image and Grayscale.
  • Blur & noise — Content shuffle, Blur and Noise.
  • Upscale — an upscaling model.

Choose a filter and its settings in Properties, click Process (or turn on Process automatically) to preview the result, then Apply it. The arrow next to Apply offers Apply as a new raster or control layer instead. Edge, depth and pose filters produce the guide images that control layers need.

Select object, in a layer’s menu, finds an object automatically with a segmentation model. Its settings open in the Properties tab, headed Operation: Select Object. Click the object to add points (Shift-click marks areas to exclude), or describe it by text, then Process and Apply, or save the result as a selection or a new layer.

Run workflow, in a raster or control layer’s menu, processes the layer with the project’s active workflow, the one open in the workflow editor. In the Run workflow from layer dialog, choose:

  • Workflow image input — the workflow’s image field that receives the layer.
  • Workflow image output — the node whose image is the result.
  • Destination — Canvas staging, Replace layer, Copy as raster layer, or Gallery.

Then click Run. If the workflow has no image input and output it can connect, the dialog says so. The layer must be enabled, unlocked and not empty.

When the Canvas is the destination, results appear in the staging area at the bottom of the canvas, not directly on it. The staging bar lets you:

  • Step through the results with the arrows in the bar, with Alt+[ and Alt+] on the canvas, or with ← and → while the staging bar has focus (moving between thumbnails selects them), and show or hide the result thumbnails.
  • Accept to layer — add the current result as a new raster layer at the top of the raster layers and close the staging area.
    • A selected inpaint mask, regional guidance or control layer that you can still edit stays selected, so you can carry on painting it. Otherwise the new layer is selected.
    • The other staged results are set aside; the notice says how many and its Review the other button brings them back for review. Undoing the accepted layer on the canvas removes the layer but does not return the result to staging.
    • While the rest of the result’s batch is still queued or generating, accepting also cancels those remaining images. The batch then shows as cancelled in the queue, and undoing the accepted layer does not restart it.
    • The arrow next to it offers Keep as hidden layer, which adds the result as a hidden layer (left out of generation) and keeps staging open and the batch running.
  • Save to gallery the current result, Discard it (Delete while the staging bar has focus), or Discard all. Each discard has Undo. Discard all also stops what is still generating for this canvas (Undo brings back the results, not the stopped generation), and keeps a restore point in the History tab.
  • Hide the preview of the current result to compare it with the canvas underneath.
  • Auto-switch — show each new result as it arrives (Newest), follow the one in progress (In progress), or stay on the current one (Off).
  • Cancel the running generation.

Right-click a result’s thumbnail to recall its settings into the Generate panel. The bar also says how many results are pending, counting the ones still generating.

The canvas stays editable while results are staged or a canvas generation runs: every tool, layer action and shortcut works as usual. Each result keeps its place. It lands where the generation frame was when you pressed Invoke, and the canvas outlines that spot with a dashed amber frame for each pending result (thicker for the selected one). Moving or resizing the generation frame afterwards only affects the next Invoke; the results, and the live progress image, stay where they were. Accept to layer adds the result above all raster layers as they are at that moment, whatever you painted, added or deleted meanwhile, and first places any pixels you are still moving and applies a transform you have not applied yet.

While a progress image or a staged result is shown, inpaint masks, regional guidance and regenerate regions are hidden from view so they do not cover the result. They still take part in generation. They reappear when you hide the preview or accept or discard the results. While you paint, erase, drag out a shape on or move an inpaint mask or regional guidance layer, they show over the result so you can see what you change, and hide again when you let go. Panning, zooming and picking colors keep them hidden.

Right-click the canvas to open the menu of the selected layer, the same menu as in the Layers panel (see the Layers panel guide), with an extra Canvas section:

The canvas right-click menu for a raster layer, with the layer actions followed by a Canvas section with Save to Gallery and Create From Frame.
  • Save to Gallery — Save Canvas to Gallery or Save Frame to Gallery.
  • Create from frame — copy what is inside the generation frame into a New global reference image, New regional reference image, New control layer or New raster layer.
  • Crop all layers to frame — crops every raster layer, control layer, inpaint mask and regional guidance layer to the generation frame, including hidden and disabled layers and layers inside groups, as one undoable step. Groups, layer order and visibility are unchanged. A layer entirely outside the frame is emptied rather than deleted. Locked layers, and layers in a locked group, are skipped, and so are layers whose image could not be read, for example because it was deleted from the Gallery; the other layers are still cropped. If an image cannot be fetched for now, for example while the server restarts, nothing is cropped and the notice asks you to try again. A brush stroke still being saved is saved first. A notice says how many layers were cropped, counting only the ones that changed, and how many locked layers were skipped; it names a layer that could not be read and counts any others. When every layer is locked, or there are no layers, the item is unavailable; highlighting it shows why.

With no layer selected, the menu has only the Canvas section.

The gear button in the header opens the canvas settings. They are saved with the project.

The Canvas settings popover with Behavior, Display and Grid options.
  • Behavior
    • Invert scroll for brush size — reverses Ctrl+scroll brush sizing.
    • Clip strokes to frame — keeps painting inside the generation frame.
    • Output only generated regions — when on, an inpainting or outpainting result contains only the regenerated area, with the rest transparent; when off, it includes the whole frame.
  • Display
    • Show progress on canvas — shows the image forming while it generates.
    • Dim outside frame — dims everything outside the generation frame.
    • Show generation frame — shows the frame’s dashed outline.
    • Checkerboard background — shows transparent areas as a checkerboard.
  • Grid
    • Show grid — shows the model’s size grid.
    • Snap to grid — snaps the generation frame, moves and transforms to the grid. Hold Alt to override it.
    • Rule of thirds — shows composition guides inside the frame.

The canvas belongs to its project and is saved with it automatically. To keep a finished image, use Save Canvas to Gallery or Save Frame to Gallery, or accept results and save individual layers to a board with Save layer to board. To share a whole canvas, with its layers, masks and settings, export the project as an .invk file; see Projects.

  • Ctrl+C copies the selected pixels, and Ctrl+X cuts them.
  • Ctrl+V pastes an image from the clipboard as a new raster layer at the generation frame.
  • Ctrl+J duplicates the selected layer, or copies the selected pixels to a new layer.

These shortcuts work while the canvas has focus; then they take the key from a workbench shortcut that shares it, such as T and G for the side panels, as Settings → Hotkeys notes. On macOS, use Cmd in place of Ctrl. The canvas’s shortcut hints show the gestures of the active tool.

The tool keys, Shift+T, [ and ], and X and D also work after you click in the Layers panel or its Color pane, so you can pick a layer or a color and switch tools without clicking back on the canvas. Escape and holding or tapping C work from the Layers panel too, but Enter applies a transform, text or filter only while the canvas has focus. None of these keys act while you type in a text field.

ShortcutAction
H, V, Shift+T, C, B, E, U, G, T, M, L, ISelect a tool (see Tools)
Hold SpacePan temporarily
Hold AltPick a color (with tools that do not use Alt themselves)
Hold / tap CUse the generation frame tool until you let go / switch to it
[ / ]Smaller / larger brush or eraser
X / DSwap colors / reset colors to black and white
Ctrl+Z / Ctrl+Shift+Z, Ctrl+YUndo / redo
Ctrl+A / Ctrl+D / Ctrl+Shift+ISelect all / deselect / invert the selection
Ctrl+C / Ctrl+X / Ctrl+VCopy / cut / paste
DeleteErase the selection, or delete the selected layer
Shift+CClear the selected mask
Arrow keys (Shift: 10 px)Nudge the selected layer
Ctrl+J / Ctrl+EDuplicate layer / merge layer down
Ctrl+G / Ctrl+Shift+GGroup / ungroup layers. With layers of one group selected, Ctrl+Shift+G moves them out of the group
Ctrl+] / Ctrl+[ (add Shift for front / back)Move layer forward / backward
Alt+[ / Alt+]Previous / next layer (wrapping, in the order of the Layers panel), or previous / next result while more than one result is staged or generating
QSwitch to the layer bookmarked with Bookmark for quick switch in its menu, or back to the previously selected layer
Shift+HHide control, guidance and mask layers
Shift+N / Shift+BFit the generation frame to the layers / to the masks
Ctrl+1 / Ctrl+2 / Ctrl+3 / Ctrl+4Zoom to 100% / 200% / 400% / 800%, where the browser passes these keys to the page
Enter / EscapeApply / cancel a transform, text, filter or polygon