Contour FX (CRT)
Turn a photo into stylized outlines
- image
- line_color
- background_color
- IMAGE
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- requiredIMAGEinput.threshold(default 1, range 0–1) andsensitivity(default 0.77, range 0–1) - together control how much of the image reads as an edge. Lowerthresholdor raisesensitivityto 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) andline_opacity(default 1) - the color and strength of the extracted lines themselves.background_color(default#000000) andbackground_opacity(default 1) - what fills the space between lines.output_mode(Final ImageorEdge 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/sensitivitypair is doing too much or too little work. Start from the defaults and nudgesensitivitydown 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
softnessa bit. This is a stylistic effect, not a bug, but if you want crisp technical-drawing-style lines, keepsoftnesslow and lean onthresholdinstead to control line quality. - Want this for ControlNet input, not as a final look - switch
output_modetoEdge Maskand skip theline_color/background_colorstyling 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_opacityisn't accidentally left low relative tobackground_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.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| threshold | FLOAT | 1.000–1 | — |
| softness | FLOAT | 1.000–1 | — |
| sensitivity | FLOAT | 0.770–1 | — |
| line_color | COLOR | #FFFFFF | — |
| line_opacity | FLOAT | 1.000–1 | — |
| background_color | COLOR | #000000 | — |
| background_opacity | FLOAT | 1.000–1 | — |
| output_mode | COMBO | 2 options: Final Image, Edge Mask |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |