ComfyUI Node Runs on cloud

Scribble XDoG Lines

Fast, model-free scribble extraction with one knob

By Fannovel16·Created 3 years ago·Updated 4 months ago· 4,134
Scribble XDoG Lines
  • image
  • IMAGE
threshold32
resolution512

The scribble preprocessor with no neural model behind it. XDoG is a classic image-processing filter, so this node is fast, deterministic, downloads nothing, and gives you a single honest knob - a threshold - to dial how many lines you get. When you want rough scribble lines out of an image without waiting on a model or fiddling with safe-mode toggles, this is the lightweight pick.

How it works

XDoG stands for eXtended Difference of Gaussians. In plain terms: blur the image two different amounts, subtract one from the other, and what survives is the edges - then threshold that into clean strokes. It's a decades-old stylization technique, not a trained network, which is exactly why it's quick and predictable. Same output every time for the same input and threshold. The result is a scribble-style line map for a scribble ControlNet, which is the most creative-friendly conditioning type - it sets the broad layout and lets the model invent the detail rather than tracing every contour.

Because there's no model, XDoG can't be "smart" about what's a meaningful edge the way HED or PiDiNet are. It's a filter. That's the trade: speed and determinism versus a bit of judgment.

The inputs and output

  • image - your source.
  • threshold (default 32, range 1–64) - the one that matters. It controls how aggressive the line extraction is. Lower keeps more, fainter lines (busier, denser scribble); higher keeps only the strongest edges (sparser, cleaner scribble). This is your main creative lever - sweep it a few values and pick the density that suits the shot.
  • 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). Inert 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. No weight download for this one - it's pure algorithm, so it runs immediately.

Where people get burned

The main thing is knowing when to pick XDoG over its siblings. This pack has four scribble-ish nodes and they differ in character: XDoG is the fast, model-free, threshold-tunable one; FakeScribblePreprocessor (HED-based) gives softer organic strokes; Scribble_PiDiNet_Preprocessor gives cleaner PiDiNet lines; ScribblePreprocessor is the plain base. If XDoG's output looks too harsh or too sparse even after you've swept the threshold, that's your cue to try a model-based one instead. They all feed the same scribble ControlNet.

Second, that threshold is doing real work - don't leave it at default and conclude XDoG "doesn't look right." A couple of values up or down changes the map dramatically. It's the whole point of using this node over a model-based scribble.

And the universal reminder: the map does nothing without a scribble ControlNet loaded and a ControlNet Apply node in the graph. Cross-wiring it into a Canny or lineart model won't work either - match the preprocessor to the model.

CategoryControlNet Preprocessors/Line Extractors

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
thresholdoptINT321–64
resolutionoptINT51264–16384

Outputs (1)

NameTypeDescription
IMAGEIMAGE