Nodes/Allor Plugin/ImageFilterContour
ComfyUI Node

ImageFilterContour

Outline extraction with zero knobs

By Nourepide·Created 3 years ago·Updated 2 years ago· 295
ImageFilterContour
  • images
  • IMAGE

ImageFilterContour is the PIL CONTOUR filter wrapped up as a node, and it does what its name says: it traces the edges of an image and returns a line-drawing version of it. One input, one output, no settings to misconfigure. It's a niche tool, but when you need to see the structure of an image - or make a rough line-art base - there's nothing to fiddle with.

How it works

The PIL CONTOUR filter detects intensity changes across the image and renders the strongest transitions as dark lines on a light background, flattening the interior detail into flat tones. It's a quick-and-dirty edge extraction, not a high-precision edge detector - think "sketch" rather than "CAD drawing." Because it's implemented via the pack's PIL bridge, the input image gets converted to a PIL image, filtered, and converted back to a tensor, which is a slightly heavier round-trip than the pack's pure-tensor nodes - but for a one-shot filter it doesn't matter.

Inputs and output

  • images - an IMAGE or batch. The only input.
  • Output: an IMAGE - the contour-traced version.

That's it. There's no threshold, no blur-to-preprocess, no line-width control. If you need adjustable edge extraction, this isn't the node - but if you want a quick structural read or a stylized line look, it's a one-drag solution.

Where it fits

Contour output can feed into workflows that want a line-art style (a sketchy inpaint or stylization target), or act as a quick visual debug of what edges exist in a frame before you commit to a proper edge-detection preprocessor. It's also a legitimately fun artistic filter: run a busy photo through it and you get an instant doodle.

Installing it

It ships in the Allor pack:

cd ComfyUI/custom_nodes
git clone https://github.com/Nourepide/ComfyUI-Allor

Restart ComfyUI, or use ComfyUI Manager → Allor Plugin. First launch installs rembg + onnx from requirements.txt - slow once - and no model downloads are needed for this node.

Gotchas

  • Because it's a fixed algorithm, results vary a lot with source contrast. A noisy image gives a noisy contour; if it's too busy, clean the image up before running it.
  • The pack's standing update gotcha applies: Allor's repo was rebased to strip old images from history, so an old clone can fail on git pull. Re-clone if auto-update breaks.

If you want something a bit more photographic, ImageFilterEdgeEnhance boosts existing edges instead of collapsing the image into lines.

Categoryimage/filter

Inputs (1)

NameTypeDefaultDescription
imagesIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE