Scribble PiDiNet Lines
Cleaner scribble extraction via PiDiNet edges
- image
- IMAGE
Scribble lines, but derived from PiDiNet edges instead of HED. If Fake Scribble is the HED-based way to turn a photo into rough scribble strokes, this is the PiDiNet-based cousin - and PiDiNet's cleaner edge detection tends to give tidier, more coherent scribble lines. It targets the same scribble ControlNet as the rest of the family, so it's a drop-in alternative when you want scribble conditioning that isn't quite as loose or noisy as the HED route.
How it works
It runs PiDiNet edge detection, then simplifies the result into scribble-style strokes. PiDiNet (a compact, modern edge network) produces cleaner soft edges than the older HED, and that cleanliness carries through to the scribble output. The reason you'd want scribble at all is its philosophy: it's the most creative-friendly ControlNet conditioning, setting a rough layout and letting the model invent the details rather than tracing every contour like Canny. This node gets you that loose guidance from an existing image, with lines a notch tidier than the HED-based Fake Scribble.
The inputs and output
image- your source.safe- the safe-mode toggle (enable/disable), which quantizes edge intensities so the ControlNet doesn't over-read faint gradients into stray lines. Keep it enabled for normal use; disable only when chasing fine detail and willing to accept more noise.resolution(default 512) - processing size; match it to your render.
The single output is an IMAGE - the scribble map - which wires into a ControlNet Apply node with a scribble ControlNet (control_v11p_sd15_scribble or control_scribble). It does nothing until that model is loaded.
Installing it
ComfyUI Manager: search ComfyUI's ControlNet Auxiliary Preprocessors, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Fannovel16/comfyui_controlnet_aux
pip install -r requirements.txt
Restart ComfyUI. Because it's PiDiNet-based, it downloads the small table5_pidinet.pth weight from HuggingFace on first run - quick, since PiDiNet is a light model.
Where people get burned
The useful thing to know is how the scribble family differs, because they all feed the same ControlNet and choosing between them is just taste plus your source image. This PiDiNet version gives cleaner lines. FakeScribblePreprocessor (HED-based) gives softer, more organic strokes. Scribble_XDoG_Preprocessor is a fast, model-free filter with a tunable threshold. ScribblePreprocessor is the plain, blockier base. Swapping between them is a one-node change, so if this one's lines feel too clean or too sparse for your subject, try Fake Scribble; if you want speed and a density knob, try XDoG.
Second, remember scribble's shortcut: if you already have a rough hand drawing, you can feed it straight to the scribble ControlNet and skip the preprocessor entirely. These nodes are for when you're starting from an existing image rather than a sketch.
And the universal one: the scribble map is inert without a scribble ControlNet loaded and a ControlNet Apply node in the graph. Don't cross-wire it into a Canny or lineart model - those expect precise thin lines, not loose scribble, and they won't behave.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| safeopt | COMBO | 2 options: enable, disable | |
| resolutionopt | INT | 51264–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |