Img2Sketch Assistant
Pencil sketches from any photo — no model, no GPU, no API key
- image
- sketch
- grayscale image
The name is a little misleading: this is called "Img2Sketch Assistant," but there's no model behind it. No checkpoint, no GPU requirement, no API key, nothing to download. It's a chunk of OpenCV running on your CPU, and it turns a photo into a colored pencil sketch in well under a second. That's the whole appeal - you get a hand-drawn-look image for free, and you can feed it straight into a ControlNet scribble or lineart pass without ever leaving ComfyUI.
It ships in the ComfyUI-Img2DrawingAssistants pack, a set of four nodes for converting images to sketches and line art. This one is the color pick of the family: it outputs both a recolored sketch and the plain grayscale version, and it handles batches, so the video-to-sketch-animation trick in the README is just this node running on a frame sequence.
How it works
The mechanism is the classic photo-to-pencil-sketch algorithm you've seen in a hundred Python tutorials: grayscale the image, blur it hard with a Gaussian filter, then divide the original by its own blur (cv2.divide(gray, blurred, scale=256)). Where a pixel is close to the local average, the division comes out flat; where it deviates sharply - edges, dark strokes - you get a pencil stroke. Blur and divide, that's the whole trick, and it's why the node is instant and model-free.
After that, the artist dropdown picks between two ink renderings. Artist 1 keeps tonal shading, so strokes fade and blend like real graphite; artist 2 flattens toward solid, uniform ink lines. The line_color picker then recolors the strokes into any of 16 named colors, and if you flip enable_bg_color_change on, bg_color and bg_light let you repaint the paper behind the sketch (background lightness above 10 washes toward white).
The inputs that actually matter
shading_effect(5–105, default 41) - the blur kernel size. This is the one knob that decides "rough scribble" vs. "clean pencil." Small values keep the shading tight and detailed; large values smear it into broad, soft strokes.line_strength(1–10, default 2) - how dark the ink goes. Higher = heavier, more saturated pencil. Default 2 is intentionally light.details(50–255, default 240) - the cutoff for what counts as a line. Crank it up and more of the image gets pulled into the ink.smoothness(1–5) - a downsampling smoothing pass. 1 is sharp, 5 is foggy.noise_removal(0–5) - morphological cleanup that kills speckle in low-quality inputs.
Outputs
You get two IMAGE outputs: sketch (the colored pencil rendering - wire this to a Save Image or Preview node) and grayscale image (the straight desaturated source, handy if you want the gray version with no pencil treatment, e.g. for an img2img pass).
Install
Through ComfyUI Manager, search for ComfyUI-Img2DrawingAssistants and install, or from a terminal:
cd ComfyUI/custom_nodes
git clone https://github.com/Isi-dev/ComfyUI-Img2DrawingAssistants
Then restart ComfyUI. No model files to place anywhere. Dependencies are torch, numpy, and opencv-python - the first two ship with ComfyUI, so cv2 is the only one that might need installing, and Manager handles that automatically. One caveat: ComfyUI normally installs opencv-python-headless, and this pack asks for the full opencv-python build. Both provide cv2, and they can fight over the same files when pip swaps one for the other - usually harmless, occasionally causes a reinstall loop.
Troubleshooting
The author's own caveat is the one to remember: output quality tracks input quality. A clean, flat photo with good contrast sketches beautifully; a noisy compressed screenshot comes out a speckled mess - that's what noise_removal is for, so bump it (2–3 is usually enough) before you blame the node. It's CPU-only and fast enough for animation work, so don't reach for a big GPU node when this is the tool. And if your sketch looks washed out, push line_strength up; the default is deliberately light.
Where people get burned: mixing up the two outputs. If you wire the raw grayscale image output into a ControlNet preprocessor expecting clean scribble lines, you'll get mush. The processed sketch output is the one you want.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| artist | COMBO | 2 options: 1, 2 | |
| line_strength | FLOAT | 2.01–10 | — |
| shading_effect | INT | 415–105 | — |
| line_color | COMBO | 16 options: black, white, red, lime, blue, yellow, +10 | |
| details | INT | 24050–255 | — |
| smoothness | FLOAT | 1.01–5 | — |
| enable_bg_color_change | BOOLEAN | false | — |
| bg_color | COMBO | 16 options: white, black, red, lime, blue, yellow, +10 | |
| bg_light | FLOAT | 101–100 | — |
| noise_removal | INT | 00–5 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| sketch | IMAGE | — |
| grayscale image | IMAGE | — |