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
-
You select an area.
The selection identifies what you want to change. -
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. -
Your workflow generates a result.
The canvas sends the crop, selection mask, prompt, and any connected settings to your generation chain. -
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. -
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 indicator | Meaning |
|---|---|
| Marching-ants outline or red selection tint | The area you selected |
| Blue dashed rectangle | The 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
- Add an Inpaint Canvas node to your workflow.
- Click Open editor.
- Load an image with the image button, drag and drop, or Ctrl+V.
- 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 connection | Purpose |
|---|---|
crop_image | The image region your model will edit |
crop_mask | The mask identifying the selected region, when your workflow needs one |
prompt | Your editing instruction or description |
crop_width / crop_height | Crop dimensions for nodes that require explicit image size |
result | Return input for an API workflow |
result_local | Return 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
- Choose a selection tool and mark the area to change.
- Enter a prompt describing the change.
- Choose API or Local to match your return connection.
- Click Generate, or press Ctrl+Enter.
- Review the new layer.
- 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.
| Example | What it demonstrates |
|---|---|
| Flux.2 API workflow | Sends 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 workflow | Uses 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 workflow | Uses 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 feature | What it does | Example use |
|---|---|---|
| Selection brush | Paints a selection directly | Mark an irregular patch of clothing |
| Rectangle and ellipse | Creates simple geometric selections | Select a poster, wheel, or circular object |
| Lasso | Draws a freehand outline | Select an uneven silhouette |
| Polygon | Creates an outline point by point | Follow architectural edges |
| Magic wand | Selects similar colours | Pick a flat-colour background |
| Object selection | Highlights objects under your cursor using SAM2 | Select a person or an object without tracing |
| Select by text | Finds the object you name | Select “shirt,” “hair,” or “the red car” |
| Quick mask | Shows the selection as a red overlay and lets you paint it | Refine 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
| Tool | What it does |
|---|---|
| Paint and eraser | Adds or removes pixels with adjustable size, hardness, and opacity |
| Eyedropper | Samples a colour from the visible image or active layer |
| Bucket | Fills a connected area of similar colour |
| Gradient | Draws a linear or radial gradient |
| Smudge | Pushes pixels along the stroke, like dragging a finger through wet paint |
| Clone stamp | Copies pixels from a source point chosen with Alt+click |
| Healing brush | Copies 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_imagebatch in list order. - Transparent areas are placed on white after cutout masks are applied.
Reference fitting options are:
| Fit mode | Effect |
|---|---|
| Pad | Keeps the image’s proportions and fills unused space with its border colour |
| Crop | Fills the crop dimensions, trimming excess image |
| Stretch | Fills 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.
| Filter | Available adjustments or purpose |
|---|---|
| Film / Grain | Film presets, grain appearance, colour share, look strength, and optional real grain plates |
| Sharpen | Amount, radius, and threshold |
| Gaussian blur | Radius from 0–64 image pixels |
| Levels | Input/output black and white points, plus gamma |
| Curves | Master RGB and individual colour-channel curves |
| Brightness / Contrast | Overall tonal adjustment |
| Hue / Saturation | Hue rotation, saturation, and lightness |
| Colour balance | Colour shifts for shadows, midtones, and highlights |
| Black & white | Channel weighting and optional tint |
| Invert | A negative of the image below |
| LUT | A 3D .cube file with adjustable strength |
| Vignette | Amount, 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 case | Prompt style |
|---|---|
| Fill | Describes what should occupy the area, including materials and lighting |
| Add | Describes a new object with suitable scale and contact shadows |
| Remove | Describes the replacement background without naming the removed object |
| Edit | Writes a direct editing instruction and states what should remain unchanged |
| Outpaint | Describes a continuation beyond the image boundary |
| Auto | Uses 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 kind | Purpose |
|---|---|
| New | Places a described element in the box |
| Text | Places words in the box, with a description of their appearance |
| Keep | Preserves an element in place |
| Move | Moves an element from a source box to a destination |
| Remove | Removes an element and fills the background |
| From reference | Places 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_promptto the model’s prompt input. - Connect the whole
crop_imagebatch 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
| Setting | What it changes | Practical guidance |
|---|---|---|
| Context | How much surrounding image accompanies the selection | Auto adapts to selection size. Manual uses padding. More context can help the model understand nearby forms. |
| Feather | How the mask and stitched edge transition into the original | Auto grows and softens the mask based on selection size. Manual sends the raw selection and uses the feather value during stitching. |
| Fill | What the model sees inside the selected area | Try a fill mode if the model keeps preserving content you want replaced. The canvas image itself is unchanged. |
| Original | Adds the untouched crop after a filled crop in the batch | Helps a compatible edit model understand what was hidden by the fill. Not intended for an unsplit VAE Encode chain. |
| Paste | Whether to place only the selection or the entire generated crop | Selection limits the change; Whole crop can preserve consistency when an edit model re-renders the whole rectangle. |
| Align | Corrects small shifts or scaling differences before stitching | Useful when contours appear doubled across the selection boundary. Applied only if the measured match improves. |
| Color match | Matches returned colour and brightness to surrounding pixels | Helps 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
| Widget | Meaning |
|---|---|
padding | Context pixels when Context is Manual |
target_size | Longest side of the outgoing crop; 0 keeps native size |
feather | Stitch-edge blur when Feather is Manual |
multiple_of | Rounds 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 family | Documented use |
|---|---|
| Flux.2 | API image editing, including additional reference images |
| Flux.2 Klein 9B | Local editing example with reference conditioning |
| Kontext | Compatible multi-reference editing and edit-style prompting |
| FLUX 3 Image | Spatial box instructions through box_prompt |
| SDXL-class workflows | Local 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.
| Model | Editor feature | When to use it |
|---|---|---|
| SAM3, through ComfyUI-RMBG | Default text-based selection | Select an object by naming it |
| GroundingDINO SwinT + SAM, through ComfyUI Segment Anything | Fallback text selection | An alternative backend for finding and outlining named objects |
| SAM2 Base+, through ComfyUI-segment-anything-2 | Hover-based object selection | Quickly pick objects visually |
| Qwen3-VL 2B, through ComfyUI-QwenVL | Local prompt upsampling | Expand short editing requests |
| Qwen3-VL 4B | Local prompt upsampling | The author reports better removal descriptions and translation; the first-use download is about 8 GB |
| Gemini, through ComfyUI’s API node | API prompt upsampling | Use a remote vision-language helper instead of a local one |
| RMBG-2.0 | Layer cutouts | Remove backgrounds while preserving object boundaries and fine details |
| BiRefNet | Layer cutouts | General background removal and matting |
| BEN2 | Layer cutouts | Another option for difficult or complex backgrounds |
| BRIA RMBG 1.4, through ComfyUI-BRIA_AI-RMBG | Layer cutouts | An 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 action | What it preserves |
|---|---|
| PNG | Visible image with workflow and canvas prompt metadata |
| JPEG / WebP | Flattened image in a smaller-file format |
| PSD | Pixel layers with names, positions, opacity, visibility, and blend modes, plus a merged image |
| ORA | Layered OpenRaster export for compatible applications such as Krita and GIMP |
| Layer | Active layer as a transparent PNG |
| Mask | Selection 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-livedreference_imagesoutput 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
- Check that the generated image returns to
resultorresult_local. - Check the API / Local switch.
- Read the Crop panel’s connection message.
- If both inputs are connected, select the intended mode.
- 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
- Identify the feature in the helper-model table above.
- Check whether its corresponding node pack is available in your ComfyUI.
- Remember that the editor lists only detected backends.
- 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
- Allow time for the first-use model download, where applicable.
- Allow the helper model to load.
- 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
- Use Free VRAM in the Generate section.
- Make sure the editor is using Local mode for the local workflow.
- If appropriate for your task, reduce the outgoing crop size with
target_size. - 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
- Confirm that the selection covers everything you want replaced.
- Try Neutral, Blur, Border, or Green Fill.
- Make the requested change explicit in the prompt.
- For a compatible multi-image edit workflow, enable Original if filling hides information the model needs.
- 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
- Turn on Align for shifted or slightly rescaled results.
- Turn on Color match for a colour or brightness difference.
- Review feathering.
- If an edit model has re-rendered the entire crop, try Paste → Whole crop.
- 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
- Check whether
crop_imagecontains references or an Original image. - Do not feed that entire batch into an ordinary single-image VAE workflow.
- Use batch-aware nodes or split the images explicitly.
- 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
- Check Source: Image and Active layer can produce different results.
- Try a clearer object name.
- Lower Threshold to find more candidates.
- Use HQ if you are on the GroundingDINO + SAM backend and want to try it.
- Refine manually with add/subtract brushes, Grow/Shrink, or Quick mask.
Painting or erasing seems ineffective
- Check that the correct layer is active.
- Check whether the layer is locked or alpha-locked.
- Clear an unintended selection with Ctrl+D.
- Check whether you are editing the layer mask instead of its pixels.
- Remember that erasing does not erase the base image.
FLUX 3 box instructions are ignored or incomplete
- Enable the Boxes switch.
- Connect
box_prompt, not justprompt, to the FLUX 3 prompt input. - Pass the whole
crop_imagebatch as documented. - Check whether a box lies outside the outgoing crop.
- Check that referenced images loaded successfully.
- Read the editor status line and ComfyUI console for omitted boxes or prompts exceeding 15,000 characters.
- Do not send both
elementsandbox_promptfor 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
- Reduce the number of large layers where practical.
- Allow extra time for flattening, export, and uploads before generation.
- Work on a half-size copy when full resolution is unnecessary.
- 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
| Shortcut | Action |
|---|---|
| B / R / Shift+R | Selection brush / rectangle / ellipse |
| L / Shift+L | Lasso / polygon |
| W / O / D / Q | Magic wand / object selection / deselect brush / Quick mask |
| P / E | Paint / erase |
| I / G / Shift+G | Eyedropper / bucket / gradient |
| Shift+S / S / J | Smudge / clone stamp / healing brush |
| T / Shift+T / C / X | Transform / text / canvas / boxes |
| [ / ] | Decrease / increase brush size |
| Ctrl+D / Ctrl+I | Clear / invert selection |
| Shift+F | Fill selection with colour |
| Ctrl+Shift+N | New paint layer |
| Ctrl+J / Ctrl+E | Duplicate layer / merge down |
| Ctrl+C / Ctrl+Shift+C | Copy selected pixels from active layer / visible image |
| Ctrl+X / Ctrl+V | Cut / paste as a new layer |
| Ctrl+Z / Ctrl+Shift+Z / Ctrl+Y | Undo / redo |
| Ctrl+U | Upsample prompt |
| Ctrl+Enter | Generate |
| Ctrl+S | Save finished image |
| F / 1 | Fit view / 100% zoom |
| 4 / 6 / 5 | Rotate view left / right / reset |
| Ctrl+Shift+R / Ctrl+Shift+G | Rulers / grid |
| Hold backslash | Compare with the base image without layers |
| Space, middle mouse, or right mouse | Pan; mouse wheel zooms |
| Esc | Cancel 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
- ComfyUI-RMBG: background removal and text-based segmentation documentation.
- ComfyUI-segment-anything-2: the SAM2 integration used for hover-based object selection.
- ComfyUI Segment Anything: GroundingDINO and SAM fallback selection.
- ComfyUI-QwenVL user guide: background information on the vision-language helpers.
- MCP guide: using an external AI agent with the open canvas.
Related desktop editor
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.
