Nodes/CRT-Nodes/Contour FX (CRT)
ComfyUI Node

Contour FX (CRT)

Turn a photo into stylized outlines

By PGCRT·Created 2 years ago·Updated 7 days ago· 129
Contour FX (CRT)
  • image
  • line_color
  • background_color
  • IMAGE
threshold1.00
softness1.00
sensitivity0.77
line_opacity1.00
background_opacity1.00
output_mode

Edge detection is one of the oldest tricks in image processing, and it's still the fastest way to turn a photo-realistic render into a line-art or comic-style pass. Contour FX runs an edge/contour extraction over your image and lets you fully restyle what comes out the other side - line color, background color, opacity on both - instead of handing you a flat black-on-white edge map and calling it done.

What it's for

Two obvious uses: generating clean line art or coloring-book-style output directly from a photoreal generation, or producing an edge map to feed into a ControlNet/lineart pipeline elsewhere in your graph. The output_mode switch covers both cases from the same node - get the fully stylized result, or get just the raw edge mask if that's what you actually need downstream.

Unlike a bare Canny node, Contour FX gives you direct control over softness and sensitivity, plus the ability to recolor both the lines and the background before the image ever leaves the node - useful if you're going for a specific look (white lines on black, colored lines on a transparent-feeling background) without a separate recolor pass.

The inputs and outputs that matter

  • image - required IMAGE input.
  • threshold (default 1, range 0–1) and sensitivity (default 0.77, range 0–1) - together control how much of the image reads as an edge. Lower threshold or raise sensitivity to pick up finer detail; the reverse to keep only strong, obvious edges.
  • softness (default 1, range 0–1) - how hard or feathered the resulting lines are.
  • line_color (default #FFFFFF) and line_opacity (default 1) - the color and strength of the extracted lines themselves.
  • background_color (default #000000) and background_opacity (default 1) - what fills the space between lines.
  • output_mode (Final Image or Edge Mask) - the fully composited, recolored result, or a raw edge mask if you're feeding this into something like a ControlNet apply node instead of using it as a finished look.

Output: a single IMAGE.

Installing it

One of twelve nodes in CRT-Nodes' CRT/FX category, alongside Color Isolation FX and Arcane Bloom FX - the whole post-processing suite ships together in PGCRT's CRT-Nodes pack.

ComfyUI Manager - search CRT-Nodes, install, restart.

Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/PGCRT/CRT-Nodes.git
pip install -r requirements.txt

Restart ComfyUI. Edge detection like this is exactly the kind of thing opencv-contrib-python (in the pack's base requirements) exists for - no extra install needed beyond the shared pack dependencies.

Common issues

  • Output is either solid color or a mess of noise, nothing in between - the threshold/sensitivity pair is doing too much or too little work. Start from the defaults and nudge sensitivity down first if you're getting noise picked up from texture and grain rather than real edges; nudge it up if fine detail (hair, fabric texture) is getting lost entirely.
  • Lines look jagged or aliased - raise softness a bit. This is a stylistic effect, not a bug, but if you want crisp technical-drawing-style lines, keep softness low and lean on threshold instead to control line quality.
  • Want this for ControlNet input, not as a final look - switch output_mode to Edge Mask and skip the line_color/background_color styling entirely; those fields still exist on the node but are irrelevant to a ControlNet's line-detection use case.
  • Recolored lines don't show up at all - check line_opacity isn't accidentally left low relative to background_opacity; with both near 1 by default this rarely bites, but it's the first thing to check if a manual tweak made the effect vanish.
CategoryCRT/FX

Inputs (9)

NameTypeDefaultDescription
imageIMAGE
thresholdFLOAT1.000–1
softnessFLOAT1.000–1
sensitivityFLOAT0.770–1
line_colorCOLOR#FFFFFF
line_opacityFLOAT1.000–1
background_colorCOLOR#000000
background_opacityFLOAT1.000–1
output_modeCOMBO2 options: Final Image, Edge Mask

Outputs (1)

NameTypeDescription
IMAGEIMAGE