Nodes/comfyui-comfysketch/✏️ ComfySketch
ComfyUI Node

✏️ ComfySketch

A real drawing pad inside ComfyUI, so you can stop alt-tabbing to Krita

By Mexes1978·Created 7 months ago·Updated 6 months ago· 122
✏️ ComfySketch
  • input_image
  • image
preset_size1920 x 1080
custom_width512
custom_height768
background_colorwhite
canvas_data

Sketch it, click Done, and feed the drawing straight into img2img or a scribble ControlNet - without leaving the graph. That's the whole pitch of ComfySketch, and honestly it fills a hole that should have been filled years ago. ComfyUI's node graph is the most powerful way to generate locally, but it's never had a decent way to draw something. This node is a full sketching app - layers, brushes, a color wheel, zoom and pan - living inside a single node that outputs a normal image tensor.

ComfyUI's power is that every operation is a node and a wire, and sketch-to-image is a legit workflow people keep asking about: rough composition as a scribble, then the model does the rendering. The ControlNet folks have a name for exactly your rough drawing - scribble, the "draw a rough layout, let the model fill in the details" preprocessor. ComfySketch is the missing input device for that. The name is also a lie in the best way: it calls no API, needs no key, and downloads no model.

How it works

All the interesting stuff happens in your browser. The node's JS builds a canvas editor (click the Sketch button or the preview to open the fullscreen editor), and when you're done, the composited drawing is serialized to a base64 JPEG data URL and stashed in the canvas_data widget. The Python side just decodes that string back into an image tensor when the graph runs - IS_CHANGED returns NaN so it re-runs every time, and your sketch is saved inside the workflow JSON itself. Reload the workflow and your doodle is still there. No GPU, no inference, nothing but numpy/PIL/torch, which ComfyUI already ships.

The inputs that actually matter

  • preset_size - the canvas. You get everything from 512×512 up to 1920×1080, plus From Input Image (match the size of whatever you wire in) and Custom (which uses custom_width/custom_height, 64–4096 in steps of 64).
  • background_color - white, black, or gray starter canvas. Pick based on whether you sketch dark-on-light or light-on-dark.
  • input_image - optional. Wire in any image and you can draw over it or trace it, like a quick inpaint mask source.
  • canvas_data - a hidden widget; that's where the sketch actually lives. Leave it alone.

The single image output is a standard BHWC tensor, so it plugs into anything an image does: VAE Encode → img2img sampler, a ControlNet node (skip the scribble preprocessor - your drawing already is a scribble), or a mask operation. That's the whole node, and it's the whole point.

Installing it

ComfyUI Manager: search ComfySketch or comfyui-comfysketch, install, restart. Or the manual way:

cd ComfyUI/custom_nodes
git clone https://github.com/Mexes1978/comfyui-comfysketch

Then restart ComfyUI and find it under Add Node → image → ComfySketch. No requirements.txt, no model files, no heavy dependencies - this is the rare pack that just works. It's MIT-licensed and still in active development.

Common issues

Where people get burned, based on reading the source rather than the ads:

  • Changing background_color wipes your drawing. The node clears the canvas whenever that dropdown changes. Set your background before you sketch.
  • Set the canvas size before you draw. If you sketch at 512 and later bump preset_size to 1024, the output is just a LANCZOS upscale - blurry doodles. The canvas is your resolution.
  • The output is JPEG at 85% quality. Fine for scribble ControlNet, slightly sad if you're doing clean lineart you want to preserve exactly. If you care, sketch bigger than you need.
  • "From Input Image" with nothing wired in falls back to a 1920×1080 default rather than erroring - confusing if you expect it to complain.

It's a young project from a solo dev (posted to r/comfyui early in 2026), so treat weird edge cases kindly and check the repo for updates. But for "I need a rough sketch in my img2img workflow right now," it's the easiest honest answer.

Categoryimage

Inputs (6)

NameTypeDefaultDescription
preset_sizeCOMBO1920 x 108010 options: 512 x 512, 512 x 768, 768 x 512, 768 x 1024, 1024 x 768, 1024 x 1024, +4
custom_widthINT51264–4096
custom_heightINT76864–4096
background_colorCOMBOwhite3 options: white, black, gray
canvas_dataSTRING
input_imageoptIMAGE

Outputs (1)

NameTypeDescription
imageIMAGE