ComfyUI Node

Snap Canvas

The ComfyUI node that pauses the queue so you can stage a product shot by hand

By SS-snap·Created 2 years ago·Updated about a year ago· 61
Snap Canvas
  • image
  • image
  • seed
  • string
  • X
  • Y
  • factor
seed0

Snap Canvas is the one ComfyUI node that deliberately stops the whole queue while you fiddle. Run it and a PyQt5 window pops up mid-workflow, blocking execution until you've manually placed your image on a white canvas, and only then does the graph continue with the composited result. No API, no models, no magic - it's a tiny desktop app parked inside a node.

The author built it out of necessity. The README is blunt about this: he couldn't find a ComfyUI node that let him size and stage a product on a clean background for his "Majic product" e-commerce workflow, so he wrote his own. That's the niche this fills. If you do product compositing - putting a cutout onto a white 512×512 canvas, eyeballing placement instead of trusting an automated pipeline - this is the manual control you were missing.

How it works

Feed it an image and the node converts the tensor to a QImage, opens the CanvasWindow dialog, and calls dialog.exec_() - a blocking event loop. Nothing else in your queue runs until you click 保存并关闭 (Save and Close). On save, the scene renders onto a white canvas (512×512 by default), the result gets written to canvas/output.png in your ComfyUI root directory, and the node returns it as an IMAGE tensor. "Blocking" isn't a bug here, it's the design: this is a manual, human-in-the-loop step.

The inputs that matter

  • image (IMAGE) - whatever you're placing on the canvas.
  • seed (INT) - genuinely decorative. It's printed to the console and echoed back unchanged. Don't expect it to do anything.

What it hands back

Six outputs, and you'll use two of them:

  • image - the composited canvas.
  • string - the saved PNG path. This is the one you care about: wire it into the pack's Snapload node to get the composition back as an image plus mask.
  • seed, X, Y, factor - echo of the seed, the placed image's top-left corner, and its current scale. Useful if a later node needs to know where the product ended up.

The controls

  • Scroll wheel over the view = zoom the view; Ctrl + wheel over the image = scale the image (or type a factor in the 缩放 box).
  • Drag to move, type an angle and hit 旋转 to rotate.
  • Set canvas width/height with the fields, then 设置画布大小.

Install

ComfyUI Manager: search "Snap Processing". Or the manual route:

cd ComfyUI/custom_nodes
git clone https://github.com/SS-snap/ComfyUI-Snap_Processing
cd ComfyUI-Snap_Processing
pip install -r requirements.txt   # just pyqt5

Restart ComfyUI. The only dependency is PyQt5 - no model downloads, no heavy Python packages. (Note the README's own clone URL is stale; the repo above is the live one.)

Where people get burned

  • Use the Save and Close button, not the window X. Closing the dialog via the title-bar X skips the save step, so the node never gets a rendered image and throws an error. The button is the only graceful exit.
  • It needs a desktop. PyQt5 pops a real window, so this node fails on a headless server or over SSH without a display. Run ComfyUI where you can see a screen.
  • It blocks, always. You can't batch it or leave it unattended - every run demands a click. That's the point, but plan workflows around it.
  • It writes to canvas/output.png relative to your ComfyUI working directory, not your inputs folder - the string output tells you exactly where it landed.
CategorySnap Processing

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
seedINT00–18446744073709550000

Outputs (6)

NameTypeDescription
imageIMAGE
seedINT
stringSTRING
XINT
YINT
factorFLOAT