Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > ComfyUI-InpaintCanvas

ComfyUI Extension: ComfyUI-InpaintCanvas

Repo Name

ComfyUI-InpaintCanvas

Author
DenRakEiw (Account age: 1902 days)
Nodes
View all nodes(1)
Latest Updated
2026-11-12
Github Stars
0.04K

How to Install ComfyUI-InpaintCanvas

Install this extension via the ComfyUI Manager by searching for ComfyUI-InpaintCanvas
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter ComfyUI-InpaintCanvas in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

ComfyUI-InpaintCanvas Description

ComfyUI-InpaintCanvas is a layered editor for inpainting and outpainting in ComfyUI, turning selected areas and prompts into blended image edits on new layers, with masking and retouching tools.

ComfyUI-InpaintCanvas Introduction

ComfyUI-InpaintCanvas is a layered image editor inside ComfyUI. It lets you select part of an image, describe a change, generate a replacement, and receive the result as a new layer—all without moving between ComfyUI and a separate painting program.

Inpainting means regenerating a selected part of an image while keeping the surrounding picture. You might use it to replace clothing, remove an unwanted object, improve a face, or change a small design detail. Outpainting extends an image beyond its existing edges.

The extension brings the image, selections, layers, and prompt together in one Inpaint Canvas node. Your existing generation workflow still creates the pixels; the canvas handles preparing the selected area and placing the result back into the picture.

What you can do

  • Edit one area at a time: work on a face, garment, product, or background detail without sending the entire image through the same edit.
  • Keep alternative results as layers: compare versions, hide unsuccessful attempts, and blend the parts you like.
  • Make precise selections: use familiar drawing tools or optional AI-assisted object and text selection.
  • Retouch directly on the canvas: paint, erase, clone, heal, smudge, add text, and transform layers.
  • Blend generated patches: use feathering, alignment, and colour matching to reduce visible seams.
  • Guide compatible models with reference images: provide a product, material, character, or other visual reference.
  • Finish the picture non-destructively: add adjustable filter layers for colour, contrast, grain, sharpening, and more.
  • Export finished or layered artwork: save PNG, JPEG, WebP, PSD, or ORA files.

You can work with a local model or a compatible ComfyUI API workflow. Optional helper models enable extra selection, cutout, and prompt-writing tools, but they are not required for basic editing.

The Inpaint Canvas editor showing an image, selection outline, crop rectangle, and settings panel

How ComfyUI-InpaintCanvas Works

Think of the canvas as your worktable and your generation workflow as the artist working on a small piece of the picture.

The editing round trip

  1. You select an area.
    The selection identifies what you want to change.

  2. The canvas prepares a crop.
    It cuts out a rectangle containing the selection and some surrounding image. That surrounding area is called context: it helps the model understand lighting, perspective, textures, and nearby objects.

  3. Your workflow generates a result.
    The canvas sends the crop, selection mask, prompt, and any connected settings to your generation chain.

  4. The result is placed back into the picture.
    The extension positions and blends the generated image over the original area. This is the stitch step.

  5. The edit becomes a new layer.
    You can compare it, adjust its opacity or mask, remove it, or continue editing another area.

For example, to change a car wheel, you can select the wheel, provide a reference image, and ask for the replacement. The crop includes nearby bodywork and road surface so the model has visual context. The returned wheel becomes its own layer rather than replacing the entire document.

Selection versus crop

These are different:

On-screen indicatorMeaning
Marching-ants outline or red selection tintThe area you selected
Blue dashed rectangleThe rectangular crop sent to your workflow

The crop is usually larger than the selection. Depending on Paste settings, the extension can bring back only the selected area or the whole generated crop.

Why the return connection works

ComfyUI normally does not allow a workflow to loop back into itself. The extension handles the apparent return connection internally: it prepares the crop first, runs the selected generation chain, and performs a temporary stitch step.

You do not need a separate visible stitch node for the normal workflow. An Inpaint Canvas Stitch node is also available if you prefer an explicit stitching setup.

What the extension does not replace

The canvas is an editor and workflow interface, not a standalone image-generation model. The model and nodes in your connected workflow determine how well an instruction is followed, which visual styles are possible, and how much GPU memory generation requires.

ComfyUI-InpaintCanvas Quick Start

Start with an image

  1. Add an Inpaint Canvas node to your workflow.
  2. Click Open editor.
  3. Load an image with the image button, drag and drop, or Ctrl+V.
  4. Alternatively, choose New to create a white canvas at the dimensions you enter.

New replaces the current editor contents. The editor asks for confirmation before discarding them.

Connect your generation workflow

The important connections are:

Canvas connectionPurpose
crop_imageThe image region your model will edit
crop_maskThe mask identifying the selected region, when your workflow needs one
promptYour editing instruction or description
crop_width / crop_heightCrop dimensions for nodes that require explicit image size
resultReturn input for an API workflow
result_localReturn input for a local workflow

For a local workflow, the basic image path is:

Inpaint Canvas: crop_image + crop_mask
        ↓
VAE Encode (for Inpainting)
        ↓
Sampler
        ↓
VAE Decode
        ↓
Inpaint Canvas: result_local

This is the image path, not a complete generation graph: your sampler still needs its model, conditioning, and other normal inputs.

For a compatible API workflow, connect the crop, prompt, and dimensions to the API node, then connect its image output to result.

An example API workflow connecting Inpaint Canvas to a Flux.2 Image node and returning the result

Make your first edit

  1. Choose a selection tool and mark the area to change.
  2. Enter a prompt describing the change.
  3. Choose API or Local to match your return connection.
  4. Click Generate, or press Ctrl+Enter.
  5. Review the new layer.
  6. Adjust, discard, or keep it, then select the next area.

The stitch step accepts returned images at different sizes, including RGBA images with transparency. A different aspect ratio is centre-cropped rather than simply distorted; the extension also handles the small size-rounding differences described in the crop settings.

Ready-made example workflows

Drop an example JSON file onto ComfyUI, open the editor, and load an image. The examples start with an empty canvas state, so “No image” is normal until you load one.

ExampleWhat it demonstrates
Flux.2 API workflowSends the crop, prompt, dimensions, and references to ComfyUI’s Flux.2 Image API node. Requires ComfyUI API credits; no local generation model is needed.
Flux.2 Klein local workflowUses Flux.2 Klein 9B locally. Separates the crop and first reference with Image From Batch nodes, then returns the decoded result to result_local. Model details are listed in the workflow note.
FLUX 3 boxes workflowUses box_prompt to describe spatial edits for the Flux 3 Image API node. Requires API credits. The author notes that this example had not yet been loaded in a real ComfyUI instance; check its connections after opening it.

ComfyUI-InpaintCanvas Features

Finding your way around the editor

The left toolbar groups related tools. Right-click a grouped button, hold it, or click its small triangle to reveal the other tools in that group.

The bar above the canvas shows settings for the active tool, such as brush size, hardness, opacity, tolerance, or strength.

The right panel has two main tabs:

  • Image: layers, selections, canvas controls, and export.
  • Generate: prompts, generation settings, history, and crop controls.

Selection tools

Selections control both AI editing and many painting operations. You can make a rough selection quickly, then refine its edges.

Tool or featureWhat it doesExample use
Selection brushPaints a selection directlyMark an irregular patch of clothing
Rectangle and ellipseCreates simple geometric selectionsSelect a poster, wheel, or circular object
LassoDraws a freehand outlineSelect an uneven silhouette
PolygonCreates an outline point by pointFollow architectural edges
Magic wandSelects similar coloursPick a flat-colour background
Object selectionHighlights objects under your cursor using SAM2Select a person or an object without tracing
Select by textFinds the object you nameSelect “shirt,” “hair,” or “the red car”
Quick maskShows the selection as a red overlay and lets you paint itRefine a selection around a difficult edge

Selection controls:

  • Rectangle and lasso selections replace the current selection by default.
  • Hold Shift to add or Alt to subtract.
  • The selection brush adds by default; Alt subtracts.
  • Close loops fills the inside of a closed brush stroke and can bridge a small gap.
  • Grow expands the selection; Shrink contracts it.
  • Feather softens its edge rather than leaving a hard boundary.
  • From layer selects the active layer’s opaque area.
  • Save useful selections with the workflow so you can reuse them.

For example, growing a clothing selection slightly can include edge pixels that would otherwise leave a thin strip of the old garment. Feathering can soften the transition, but it does not correct mismatched shapes or lighting by itself.

AI-assisted selection

Object selection builds an object map on first use, which can take a few seconds. Hovering highlights an object in cyan. Click to toggle it, use Shift to add, or Alt to subtract. Smaller objects take priority over larger objects containing them, such as a face within a person.

Object selection showing a selected person and a cyan hover highlight

Select by text supports Replace, Add, and Subtract modes. A lower Threshold finds more candidates. The HQ option is available only for the GroundingDINO + SAM backend.

The Source setting determines what these tools inspect:

  • Image: the flattened visible artwork.
  • Active layer: only that layer, shown against neutral grey, with the resulting selection clipped to its pixels.

If you leave the text-selection field empty but have written a generation prompt, the language helper can identify the object mentioned in the prompt and use that term for segmentation.

Layers and masks

Every generated edit arrives as a separate layer. This lets you preserve the base picture while deciding which changes to keep.

You can:

  • Rename layers by double-clicking their names.
  • Drag to reorder them.
  • Duplicate, merge down, or flatten visible layers.
  • Change opacity and blend mode.
  • Hide layers, or Alt+click an eye icon to view one layer in isolation.
  • Lock a layer to prevent editing, moving, merging, or deletion.
  • Use alpha lock to paint only where pixels already exist.
  • Ctrl+click the canvas to activate the topmost layer under the cursor.

Painting on the base automatically creates a paint layer. The base itself is not erased by the eraser.

Layer masks

A layer mask hides or reveals parts of a layer without deleting the underlying pixels.

  • Mask from selection keeps the selected part visible.
  • Cutout uses a supported background-removal model to create a mask.
  • With mask editing enabled, painting reveals and erasing hides.
  • Applying the mask commits it to the pixels.
  • Removing the mask restores the layer’s unmasked visibility.

Masks are undoable and survive a reload. They are also respected by generation, reference images, and active-layer selection.

Per-layer colour matching

The Match slider adjusts a layer’s colours and contrast toward the picture below it without changing its stored pixels.

Choose the matching source:

  • Surroundings: measures a ring around the layer’s visible area.
  • Underneath: measures the area the layer covers.

For example, Underneath can help a generated replacement fit the region it replaces. Surroundings can help a pasted cutout fit a new scene.

The layer panel showing thumbnails, a text layer, a filter layer, and transform controls

Painting and retouching

ToolWhat it does
Paint and eraserAdds or removes pixels with adjustable size, hardness, and opacity
EyedropperSamples a colour from the visible image or active layer
BucketFills a connected area of similar colour
GradientDraws a linear or radial gradient
SmudgePushes pixels along the stroke, like dragging a finger through wet paint
Clone stampCopies pixels from a source point chosen with Alt+click
Healing brushCopies texture while adapting its colour and brightness to the destination

A soft smudge brush can help reduce a small hard seam after inpainting. The healing brush is useful when you need neighbouring texture without copying its exact brightness.

Additional controls include:

  • Pen pressure changes brush size.
  • Shift+click draws a straight line from the previous stroke endpoint.
  • A selection limits painting, erasing, and filling to that area.
  • Clone and heal support aligned sampling and either visible-image or active-layer sources.
  • Brush and eraser hardness are remembered separately.

Transform and text

The Transform tool supports moving, scaling, rotating, perspective distortion, and grid-based warping.

  • Corners scale proportionally; Shift allows a free aspect ratio.
  • Drag outside a corner to rotate; Shift snaps rotation to 15° steps.
  • Numeric X, Y, width, and height fields allow precise placement.
  • Flip, rotate 90°, and centre controls are available.
  • Moving layers snap to canvas edges, centre, and guides; Alt temporarily disables snapping.
  • Enter or Apply commits a pending transform; Esc cancels it.

The Text tool adds text directly to the canvas. You can adjust font, size, colour, alignment, spacing, outline, and other text controls. The extension includes 17 open-source fonts and accepts your own .ttf, .otf, and .woff files.

Text layers otherwise behave like pixel layers: you can transform, mask, and blend them. Editing the text renders the layer again.

Reference and control layers

These layer roles guide generation without appearing as ordinary visible artwork in the image sent to the model.

Reference layers

Use references with a compatible multi-image editing workflow, such as Flux.2 or Kontext.

  • Add images to the References list, or use Shift+drop on the canvas.
  • References appear with cyan frames and batch numbers.
  • Hidden references are not sent.
  • Visible references are appended to the crop_image batch in list order.
  • Transparent areas are placed on white after cutout masks are applied.

Reference fitting options are:

Fit modeEffect
PadKeeps the image’s proportions and fills unused space with its border colour
CropFills the crop dimensions, trimming excess image
StretchFills the dimensions by changing proportions

Batch compatibility matters. A normal VAE Encode chain would encode the reference images as well as the crop. Use a workflow that separates or explicitly supports those images, as demonstrated in the local Klein example.

Control layers

Assign a role such as scribble, lineart, depth, pose, or canny. These layers are excluded from the normal generation image and combined on black in control_image.

The control output is cropped and scaled exactly like crop_image, making it suitable for a connected ControlNet workflow.

Filter layers

Filter layers adjust everything below them without permanently changing those layers. Opacity, blend modes, and masks let you limit or mix the effect.

For example, a masked grain layer can add texture only to an overly smooth generated patch.

FilterAvailable adjustments or purpose
Film / GrainFilm presets, grain appearance, colour share, look strength, and optional real grain plates
SharpenAmount, radius, and threshold
Gaussian blurRadius from 0–64 image pixels
LevelsInput/output black and white points, plus gamma
CurvesMaster RGB and individual colour-channel curves
Brightness / ContrastOverall tonal adjustment
Hue / SaturationHue rotation, saturation, and lightness
Colour balanceColour shifts for shadows, midtones, and highlights
Black & whiteChannel weighting and optional tint
InvertA negative of the image below
LUTA 3D .cube file with adjustable strength
VignetteAmount, size, and softness

The film/grain feature includes 46 stock presets. Their colour looks are approximations, not measured reproductions of the named film stocks. You can also load a real grain plate, or use a film LUT for a more specific colour treatment.

Filter sliders preview at reduced resolution while you drag and render fully when released. Each slider drag is one undo step.

Filters affect the image sent to generation and the flattened export. Filter layers have no pixels of their own, so painting, transforms, and cutouts are unavailable on them; their masks remain editable.

Prompt upsampling

Upsample uses a vision-language model to turn a short request into a more detailed English prompt. Here, “upsampling” means expanding the prompt, not increasing image resolution.

The helper sees the crop with the selection indicated and writes for the chosen task:

Use casePrompt style
FillDescribes what should occupy the area, including materials and lighting
AddDescribes a new object with suitable scale and contact shadows
RemoveDescribes the replacement background without naming the removed object
EditWrites a direct editing instruction and states what should remain unchanged
OutpaintDescribes a continuation beyond the image boundary
AutoUses outpaint when the selection touches the border; edit otherwise

Edit is the default style for instruction-based models such as Flux.2, Kontext, and Klein. Revert restores the previous prompt.

Always review the rewritten text. The author notes that short English requests are most reliable with the local 2B helper, and that some non-English requests can lose details during rewriting.

Spatial boxes for FLUX 3

The Boxes tool lets you describe where changes should happen. It complements the prompt with rectangular regions.

Box kindPurpose
NewPlaces a described element in the box
TextPlaces words in the box, with a description of their appearance
KeepPreserves an element in place
MoveMoves an element from a source box to a destination
RemoveRemoves an element and fills the background
From referencePlaces a reference image, or part of one, in the box

Press X, drag a box, and double-click it to enter a description. Boxes can be moved, resized, duplicated, and nudged.

For the documented FLUX 3 edit workflow:

  • Connect box_prompt to the model’s prompt input.
  • Connect the whole crop_image batch to its first image input.
  • Keep the API node’s aspect ratio on auto.
  • Return the image to result.

The elements output provides New and Text boxes for compatible bounding-box inputs when creating a new image. Do not send both elements and box_prompt into the same node for the same edit: the box instructions would be duplicated.

With the Boxes switch off, box_prompt is simply the ordinary prompt. Turn it off before sending that output to a model that does not understand box instructions.

ComfyUI-InpaintCanvas Generation and Crop Settings

API and Local modes

The mode switch chooses the return input:

  • API: result
  • Local: result_local

When both are connected, only the selected chain runs. This lets you keep an API workflow available without executing it while working locally.

If only one return input is connected, the extension uses it regardless of the switch and reports “only input wired.”

Local generation settings showing denoise, seed, refine, negative prompt, and connected settings

Denoise, seed, and refine

These controls affect generation only when their outputs are connected to the relevant workflow inputs.

  • Denoise: in local mode, 1.0 is suitable for repainting; lower values preserve more existing structure.
  • Seed: reuse a seed to compare changes under more consistent random conditions, or enable random seeds for alternatives.
  • Refine: sends the original content without fill and uses an unfeathered sampling mask, while retaining soft stitching. Enabling it lowers denoise from 1.0 to 0.5.
  • Negative prompt: available in local mode through negative, for workflows and models that use negative conditioning.

Settings controlled from the editor

Connect setting 1 (free) to a widget input in another node, such as steps, CFG, sampler name, checkpoint, or LoRA name.

The editor then displays an appropriate control. Another free output appears until you have up to eight connected settings.

The initial value comes from the connected widget, so connecting a setting does not immediately change its value. Editor changes are sent to the widget, and the settings are stored with the workflow.

Understanding crop controls

SettingWhat it changesPractical guidance
ContextHow much surrounding image accompanies the selectionAuto adapts to selection size. Manual uses padding. More context can help the model understand nearby forms.
FeatherHow the mask and stitched edge transition into the originalAuto grows and softens the mask based on selection size. Manual sends the raw selection and uses the feather value during stitching.
FillWhat the model sees inside the selected areaTry a fill mode if the model keeps preserving content you want replaced. The canvas image itself is unchanged.
OriginalAdds the untouched crop after a filled crop in the batchHelps a compatible edit model understand what was hidden by the fill. Not intended for an unsplit VAE Encode chain.
PasteWhether to place only the selection or the entire generated cropSelection limits the change; Whole crop can preserve consistency when an edit model re-renders the whole rectangle.
AlignCorrects small shifts or scaling differences before stitchingUseful when contours appear doubled across the selection boundary. Applied only if the measured match improves.
Color matchMatches returned colour and brightness to surrounding pixelsHelps reduce a visible colour boundary around a generated patch.

Fill modes:

  • Neutral: average colour of the surroundings.
  • Blur: surrounding content smeared into the area.
  • Border: an OpenCV-based border fill plus smear, when OpenCV is available.
  • Green: solid green with a hard edge, for edit models instructed to fill the green region.

Auto Context uses the selection size and feathering and avoids crops smaller than 512 pixels per side when the image allows it. Auto Feather also adapts to selection size; in local mode, it becomes narrower for lower-denoise refinement.

Resolution controls on the node

WidgetMeaning
paddingContext pixels when Context is Manual
target_sizeLongest side of the outgoing crop; 0 keeps native size
featherStitch-edge blur when Feather is Manual
multiple_ofRounds crop dimensions to the required multiple; Flux uses 64

A smaller target size reduces the detail sent to the model. For a compatible API model, keeping native crop resolution can avoid having to enlarge a lower-resolution result afterward. Respect the receiving model’s size limits.

ComfyUI-InpaintCanvas Models

The extension does not have its own family of image-generation models. It connects to your chosen generation workflow and optionally uses helper models for particular editor tools.

Generation models shown in the documentation

Model or familyDocumented use
Flux.2API image editing, including additional reference images
Flux.2 Klein 9BLocal editing example with reference conditioning
KontextCompatible multi-reference editing and edit-style prompting
FLUX 3 ImageSpatial box instructions through box_prompt
SDXL-class workflowsLocal workflows that can use the editor’s negative prompt output

The local Klein example uses a Flux.2 Klein model, a Qwen3 8B text encoder, and the Flux.2 VAE. The workflow note identifies the required files. Its text encoder is separate from the optional Qwen3-VL prompt-writing helper.

Optional helper models

Only backends whose nodes are available in your ComfyUI appear in the editor.

ModelEditor featureWhen to use it
SAM3, through ComfyUI-RMBGDefault text-based selectionSelect an object by naming it
GroundingDINO SwinT + SAM, through ComfyUI Segment AnythingFallback text selectionAn alternative backend for finding and outlining named objects
SAM2 Base+, through ComfyUI-segment-anything-2Hover-based object selectionQuickly pick objects visually
Qwen3-VL 2B, through ComfyUI-QwenVLLocal prompt upsamplingExpand short editing requests
Qwen3-VL 4BLocal prompt upsamplingThe author reports better removal descriptions and translation; the first-use download is about 8 GB
Gemini, through ComfyUI’s API nodeAPI prompt upsamplingUse a remote vision-language helper instead of a local one
RMBG-2.0Layer cutoutsRemove backgrounds while preserving object boundaries and fine details
BiRefNetLayer cutoutsGeneral background removal and matting
BEN2Layer cutoutsAnother option for difficult or complex backgrounds
BRIA RMBG 1.4, through ComfyUI-BRIA_AI-RMBGLayer cutoutsAn alternative supported background-removal backend

The GroundingDINO + SAM backend also offers an HQ option using a larger SAM model.

The optional node packs support additional models and tools beyond this table. Their full feature lists are not a guarantee that every model is integrated into Inpaint Canvas. In particular, the separate Canvas (RMBG) editor in ComfyUI-RMBG is not ComfyUI-InpaintCanvas.

Check each model’s licence before commercial use. The extension’s software licence does not override model-specific terms; the supplied BRIA RMBG 1.4 reference describes that model as non-commercial.

ComfyUI-InpaintCanvas Outpainting, History, and Export

Extend or crop the canvas

Press C for the canvas tool:

  • Drag edges outward to extend the image.
  • Drag inward to crop.
  • Use the Canvas panel for numerical adjustments.
  • Use Resize to scale the image, layers, and selection together.

Extending bakes the visible artwork into a new base and selects the new border. Control and reference layers survive the extension.

Choose a border fill before generation: average image colour, neutral grey, green, black, random noise, or stretched edge pixels. Then generate a continuation, optionally using the prompt helper’s Outpaint use case.

Cropping retains layer pixels outside the visible frame rather than deleting them. Canvas changes are undoable.

Compare and manage results

History records each generated result with its preview, prompt, mode, and seed.

  • Click a preview to isolate that result.
  • Discard an attempt to remove its layer.
  • Restore a discarded attempt while its result file is still available.
  • Click a seed entry to reuse it.
  • Use Compare for a side-by-side view with a draggable divider.

Clearing the history list does not delete its layers or files.

A returned result shown as a layer and in history with its mode, seed, and prompt

Export your artwork

Save writes to ComfyUI’s output folder. Download also passes the saved file to your browser.

Format or actionWhat it preserves
PNGVisible image with workflow and canvas prompt metadata
JPEG / WebPFlattened image in a smaller-file format
PSDPixel layers with names, positions, opacity, visibility, and blend modes, plus a merged image
ORALayered OpenRaster export for compatible applications such as Krita and GIMP
LayerActive layer as a transparent PNG
MaskSelection as a black-and-white PNG

Important export limitations:

  • Control and reference layers are excluded from ordinary flattened image exports.
  • In layered exports, control and reference layers are hidden.
  • Filter layers are included in the merged image but cannot be represented as editable filter layers in PSD or ORA.
  • Saving an unchanged image again does not create another file; a changed image receives a counter suffix.

A saved PNG can be dropped onto ComfyUI to restore its workflow metadata. However, the workflow stores references to layer files, not the layer pixels themselves. Keep the associated working files when you need to continue an editable project.

Large images and working files

The backend accepts images up to 20,000 × 20,000 pixels. Large uploads automatically use the extension’s upload route when necessary, including after an HTTP 413 response.

Browser memory remains a practical limit. Each full-size layer uses roughly four bytes per pixel before other overhead. Large images with many layers can require several gigabytes of RAM.

Use Clean up files in the Canvas section to review and remove unused extension working files. It protects files referenced by open or saved workflows and does not delete your named source images or saved exports.

Discarded history results cannot be restored after their files have been removed.

ComfyUI-InpaintCanvas Compatibility Notes

The supplied documentation does not include a complete version-by-version changelog. The following changes and compatibility details are explicitly documented:

  • References now travel through crop_image.
    A short-lived reference_images output existed on 2026-09-05. It is removed when those workflows load. Compatible workflows should handle references as additional images in the crop batch.

  • Existing workflows keep their earlier crop behaviour.
    Workflows saved before the newer crop controls load with manual context, manual feathering, no fill, and no colour match, avoiding an unexpected change to their appearance.

  • Editor setting outputs are appended for compatibility.
    Existing output positions are preserved as additional outputs are introduced.

  • Scumble documents a node-version requirement for newer box workflows.
    Its documentation states that FLUX 3 Image Klein and MOSS-Image boxes through the desktop app require ComfyUI-InpaintCanvas 0.4.1 or newer, available on the registry since 2026-10-23. This is a compatibility note for that integration, not a claim that all Scumble features are available in the ComfyUI editor.

Updates listed in ComfyUI-RMBG or ComfyUI-QwenVL belong to those separate projects and should not be treated as Inpaint Canvas release notes.

Troubleshooting ComfyUI-InpaintCanvas

Generate does not run the expected workflow

  1. Check that the generated image returns to result or result_local.
  2. Check the API / Local switch.
  3. Read the Crop panel’s connection message.
  4. If both inputs are connected, select the intended mode.
  5. If neither is connected, connect a return image before generating.

If only one input is connected, it is used regardless of the switch.

An AI selection, cutout, or prompt helper is missing

  1. Identify the feature in the helper-model table above.
  2. Check whether its corresponding node pack is available in your ComfyUI.
  3. Remember that the editor lists only detected backends.
  4. Check ComfyUI’s console for helper-node or model-loading errors.

Basic selection, painting, masks, filters, and export do not require those optional helpers.

The first object selection or prompt rewrite is slow

  1. Allow time for the first-use model download, where applicable.
  2. Allow the helper model to load.
  3. For object selection, allow SAM2 to build the initial object map.

The object map refreshes when the image changes. Helpers may also need to reload after a local generation frees GPU memory.

A local generation runs out of GPU memory

  1. Use Free VRAM in the Generate section.
  2. Make sure the editor is using Local mode for the local workflow.
  3. If appropriate for your task, reduce the outgoing crop size with target_size.
  4. Check your generation model’s own memory requirements.

The editor normally frees helper models before a local run if a helper has been used since the previous generation. This helps make room for the generation model but does not guarantee that every model fits your GPU.

The model keeps the old content

  1. Confirm that the selection covers everything you want replaced.
  2. Try Neutral, Blur, Border, or Green Fill.
  3. Make the requested change explicit in the prompt.
  4. For a compatible multi-image edit workflow, enable Original if filling hides information the model needs.
  5. For local sampling, check that denoise is high enough for the intended change and that Refine is not preserving too much.

The result has a visible seam or doubled outline

  1. Turn on Align for shifted or slightly rescaled results.
  2. Turn on Color match for a colour or brightness difference.
  3. Review feathering.
  4. If an edit model has re-rendered the entire crop, try Paste → Whole crop.
  5. Use a layer mask, Match adjustment, smudge, or healing brush for remaining local defects.

Whole Crop can preserve the generated image’s internal consistency, but it also replaces more surrounding content than Selection mode.

References are being generated as extra images

  1. Check whether crop_image contains references or an Original image.
  2. Do not feed that entire batch into an ordinary single-image VAE workflow.
  3. Use batch-aware nodes or split the images explicitly.
  4. Refer to the local Klein example, where index 0 is the editable crop and index 1 is the first reference.

A selection misses part of an object

  1. Check Source: Image and Active layer can produce different results.
  2. Try a clearer object name.
  3. Lower Threshold to find more candidates.
  4. Use HQ if you are on the GroundingDINO + SAM backend and want to try it.
  5. Refine manually with add/subtract brushes, Grow/Shrink, or Quick mask.

Painting or erasing seems ineffective

  1. Check that the correct layer is active.
  2. Check whether the layer is locked or alpha-locked.
  3. Clear an unintended selection with Ctrl+D.
  4. Check whether you are editing the layer mask instead of its pixels.
  5. Remember that erasing does not erase the base image.

FLUX 3 box instructions are ignored or incomplete

  1. Enable the Boxes switch.
  2. Connect box_prompt, not just prompt, to the FLUX 3 prompt input.
  3. Pass the whole crop_image batch as documented.
  4. Check whether a box lies outside the outgoing crop.
  5. Check that referenced images loaded successfully.
  6. Read the editor status line and ComfyUI console for omitted boxes or prompts exceeding 15,000 characters.
  7. Do not send both elements and box_prompt for the same edit.

Copy rows may be unavailable when the editor is served over plain HTTP from another machine. Use the wired box_prompt output instead.

A large image is slow or the browser becomes unresponsive

  1. Reduce the number of large layers where practical.
  2. Allow extra time for flattening, export, and uploads before generation.
  3. Work on a half-size copy when full resolution is unnecessary.
  4. Keep the full-resolution original separately.

Automatic large-file uploading removes an upload-size obstacle, not browser RAM limits.

Frequently asked questions

Do I need a special inpainting model?
The canvas can work with different inpaint or edit chains. The model and workflow must accept the outputs you connect; mask-based local inpainting and instruction-based API editing use different arrangements.

Does prompt upsampling enlarge my image?
No. It rewrites your prompt. Image resolution is controlled separately.

Will I be charged for API generation while working locally?
With both return chains connected, only the selected chain executes. API helper calls, such as Gemini prompt upsampling, are separate from the generation chain.

Can I undo an edit?
Yes. Layer operations and editor actions support undo. While the editor is open, Ctrl+Z belongs to the editor, not the ComfyUI workflow.

Does the editor save everything automatically?
Edited layers upload 15 seconds after the last change, when the editor closes, and before generation. ComfyUI handles workflow saving separately. Keep saved workflows and their referenced files; automatic layer uploads are not a substitute for backups.

Can an AI agent operate the canvas?
Yes. The optional local MCP integration can load images, make selections, generate, add filters and text, and export through the open editor. See the MCP documentation.

ComfyUI-InpaintCanvas Keyboard Shortcuts

ShortcutAction
B / R / Shift+RSelection brush / rectangle / ellipse
L / Shift+LLasso / polygon
W / O / D / QMagic wand / object selection / deselect brush / Quick mask
P / EPaint / erase
I / G / Shift+GEyedropper / bucket / gradient
Shift+S / S / JSmudge / clone stamp / healing brush
T / Shift+T / C / XTransform / text / canvas / boxes
[ / ]Decrease / increase brush size
Ctrl+D / Ctrl+IClear / invert selection
Shift+FFill selection with colour
Ctrl+Shift+NNew paint layer
Ctrl+J / Ctrl+EDuplicate layer / merge down
Ctrl+C / Ctrl+Shift+CCopy selected pixels from active layer / visible image
Ctrl+X / Ctrl+VCut / paste as a new layer
Ctrl+Z / Ctrl+Shift+Z / Ctrl+YUndo / redo
Ctrl+UUpsample prompt
Ctrl+EnterGenerate
Ctrl+SSave finished image
F / 1Fit view / 100% zoom
4 / 6 / 5Rotate view left / right / reset
Ctrl+Shift+R / Ctrl+Shift+GRulers / grid
Hold backslashCompare with the base image without layers
Space, middle mouse, or right mousePan; mouse wheel zooms
EscCancel the current operation, then close the editor

Delete is context-sensitive: it clears selected pixels, deletes the active layer when no selection exists, or removes a selected box while using the Boxes tool.

Learn More about ComfyUI-InpaintCanvas

Start here

  • Compact canvas guide: a concise English manual suitable for a ComfyUI Note node or text display.
  • Example workflows: practical graphs for API editing, local Klein editing, and FLUX 3 boxes.
  • Three-minute video tutorial: demonstrates changing BMW 635 CSi wheels using a reference image, prompt upsampling, and a film-grain finish.

[Watch the Inpaint Canvas tutorial](https://www.youtube.com/watch?v=Lz7AT8SByx8&t=4s)

Optional tool documentation

Scumble is the related standalone desktop editor that shares editor code with Inpaint Canvas. It adds desktop-oriented features such as tabs and documents, and can render through a connected ComfyUI or supported API providers.

Its documentation covers the desktop application, so do not assume every Scumble feature is available inside this ComfyUI extension.

ComfyUI-InpaintCanvas License

ComfyUI-InpaintCanvas is released under GPL-3.0. See LICENSE.

You may use, modify, and redistribute the software, including commercially, under the licence terms. Distributed derivative versions must remain under the GPL.

Bundled fonts have their own OFL or Apache licences. Generation models, helper models, and API services have separate terms that you should review for your intended use.

ComfyUI-InpaintCanvas Related Nodes

RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

ComfyUI-InpaintCanvas detailed guide | ComfyUI