Nodes/Canvas Tab/Edit In Another Tab
ComfyUI Node

Edit In Another Tab

Paint your masks by hand — ComfyUI gets a real canvas editor

By Lerc·Created 3 years ago·Updated 2 years ago· 204
Edit In Another Tab
  • mask
  • canvas
  • IMAGE
  • MASK

ComfyUI's built-in image widget will happily upload a file, but the moment you want to actually paint something - a mask over the hand you want regenerated, a rough scribble for ControlNet - you're bouncing between Krita and a pile of export/import nodes. Canvas Tab fixes that by giving ComfyUI a real, full-page image editor that lives in a second browser tab. The pack ships two nodes: this one, Edit In Another Tab, and its partner Send to Editor Tab, which pushes generated images back into the editor. Together they turn a graph into something close to a paint program.

This is an inpainting-first tool, and the author says so outright: the whole thing started as an inpainting workflow. You paint, the editor hands ComfyUI both the image and the mask you drew, and generations come back into the editor as layers you can keep drawing on. With a turbo model and the node's "Queue on change" toggle, you get a live-drawing loop - sketch, generate, copy the result to a new layer, refine. The repo even ships an SDXL Turbo workflow showing that exact process.

How it works

The node's two inputs, canvas and mask, are both a custom CANVAS widget type - they look like inputs in the schema, but you never wire anything into them. They're previews. You work in the editor page (a full HTML paint app that opens in a new tab), and when you edit, the editor uploads the image to ComfyUI's /upload/image endpoint and the widgets update. When the node runs, it reads those uploaded files, transposes EXIF, and returns them.

The MASK output comes from the canvas's alpha channel. Paint on an alpha layer and that's your mask; if the layer has no alpha, you get a blank 64×64 zero tensor back - a classic "why is nothing masked" trap.

Two editor details matter more than everything else put together:

  • The green tab. Each image has a green tab on its side; click it to highlight. The highlighted image is the one sent through to the node. If you can't remember which layer is going to the graph, this is it.
  • Multiple Canvas_Tab nodes. Supported, with a catch: set the node's title and an image's title to the same name, and that node picks up that image. Otherwise everything funnels into whichever node matches.

Worth knowing in the editor: B/E/Z for brush/eraser/pixel tools, P for picker, T for transform (double-click toggles rotate/scale), [ ] for brush radius, Backspace clears a layer, Ctrl+Backspace fills with background color, Ctrl+Z / Ctrl+Shift+Z undo/redo. Middle-drag moves images, scroll zooms. Ctrl-click a layer to delete it (only when visible - a guard against accidental nukes).

Wiring it in

Outputs are IMAGE and MASK, so it plugs in wherever those types go. Classic inpainting: IMAGE → VAEEncode, MASK → SetLatentNoiseMask. On a Flux stack you'd hand both to InpaintModelConditioning. The mask-feather rules from the inpainting playbook still apply - a hard-edged mask gives you seams.

Installing

Via ComfyUI Manager (search "Canvas Tab"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/Lerc/canvas_tab

Restart ComfyUI and look in the image submenu. There's no requirements.txt and nothing heavy - the Python side only uses torch, PIL and folder_paths, which ComfyUI already ships. All the real work is frontend JavaScript. One command, no model downloads, can't eat your VRAM.

Where people get burned

  • It won't re-run on its own. The node has no IS_CHANGED, so editing the canvas and hitting Queue can do nothing if the inputs look identical. That's exactly why the "Queue on change" toggle exists - and when it's on, it waits for the current queue to empty before queuing again, so you don't stack a pile of duplicate runs. It's a known quirk the author has acknowledged and patched around.
  • One shared editor, not one per node. The code comments say only one editor node is practical; all the images live in a single editor window. Fine for most people, annoying if you expected isolation.
  • It's a 2023-era tool and it shows. Development slowed through 2024, and by 2026 most of the "inpaint this region" chatter had moved to instruction-editing models. Don't install it expecting regular updates. But it still owns the thing those models can't do: masked, bit-identical inpainting where nothing outside your mask moves. For hand-painted, mask-first work inside ComfyUI, it remains the tool to reach for.
Categoryimage

Inputs (2)

NameTypeDefaultDescription
maskCANVAS
canvasCANVAS

Outputs (2)

NameTypeDescription
IMAGEIMAGE
MASKMASK