Nodes/ComfyUI-ZhiHui/🎨 智绘_画板
ComfyUI Node

🎨 智绘_画板

Draw, paint and scribble over your generation without leaving ComfyUI

By zhuyungen·Created 8 months ago·Updated 4 months ago· 0
🎨 智绘_画板
  • image
  • image
◄image_data►

Sometimes the fastest edit isn't a prompt - it's a brush. ZH_DrawingBoard (🎨 智绘_画板) is the 智绘灵箱 pack's multi-layer painting canvas: a drawing board that lives right inside the ComfyUI node, with brush, eraser, text and shape tools, plus a real trick - if you feed it an image, that image loads into the board and you paint on top of it. The result comes out the other side as an ordinary IMAGE tensor, ready for img2img, inpainting, or whatever your pipeline does next. It's the pack's answer to "I need to mark up this image by hand mid-workflow."

How it works

This one is a frontend widget with a small server backend rather than pure pixel math. The node sends any upstream image to the board over a websocket (zh_drawing_board_input), so the canvas is seeded with your last generation; you paint, type, add shapes, or erase; and on execution the canvas is serialized to a base64 PNG (that's what the image_data string is - a data URL) and decoded back into a tensor. No upstream image? The board starts blank and you draw from scratch. Neither? You get a 512×512 white placeholder rather than a crash.

The "多图层" (multi-layer) bit is the board's own UI - the layers are a painting convenience on the canvas, not separate tensor outputs. What you actually get out is one flat composited image.

The inputs that matter

Two, and they're almost self-explanatory once you see them: image_data (the required STRING that the widget fills in with the canvas contents - you don't type into this, the board does) and image (the optional IMAGE that seeds the board when connected). Output is a single image (IMAGE) socket. The practical workflow is: connect your render into image, draw a mask-ish scribble or add a text label, run, and wire the result into an inpaint/img2img node or straight to a save.

Install

Part of the 智绘灵箱 (ComfyUI-ZhiHui) pack:

cd ComfyUI/custom_nodes
git clone https://github.com/zhuyungen/ComfyUI-ZhiHui.git

Restart ComfyUI - the JS frontend is required for the board, so a hard restart (not just "reload nodes") is the safe move. ComfyUI Manager search "智绘灵箱" / "ComfyUI-ZhiHui" works too. Runtime deps: torch/Pillow only.

Where people get burned

  • The board is a frontend, so a stale page breaks it. If the canvas doesn't appear or paint doesn't stick, refresh the browser after install. Classic ComfyUI custom-widget gotcha.
  • It's one composited image out, not layers out. If your downstream needs the scribble as a separate MASK (say, for inpainting), this node gives you a painted image - turn it into a mask elsewhere (compare against the original) rather than expecting a MASK socket.
  • image_data looks like a mysterious required input. Ignore it - it's the widget's mailbox. Typing into it manually does nothing useful.
  • Resolution follows the seed image. The board is sized by whatever you feed in; a 4K render means a big canvas, and a blank board defaults to 512×512.

It's a niche tool, but when you need "draw on the image mid-pipeline" it beats leaving ComfyUI for a photo editor and coming back - especially for quick inpainting scribbles or adding text/composition notes to a workflow you run repeatedly. The pack's README calls it a flagship feature, and for the "sketch an idea, feed it to the model" loop it genuinely earns its spot.

CategoryZhiHui/image

Inputs (2)

NameTypeDefaultDescription
image_dataSTRING—
imageoptIMAGE—

Outputs (1)

NameTypeDescription
imageIMAGE—