Nodes/ComfyUI-Inference-Core-Nodes/[Inference.Core] Realistic Lineart
ComfyUI Node

[Inference.Core] Realistic Lineart

Photographic edges extracted as clean strokes

By LykosAI·Created 2 years ago·Updated about a year ago· 33
[Inference.Core] Realistic Lineart
  • image
  • IMAGE
coarsedisable
resolution512

This is the lineart extractor tuned for photographs and photorealistic renders rather than illustration - it's what the community shorthand lineart_realistic refers to. Where a plain edge detector like Canny gives you a rigid, threshold-based binary line, this one is trained to produce thicker, more natural-looking strokes closer to what a human artist tracing the photo would actually draw. It's a solid middle ground: more structure and confidence than HED's soft gradients, less brittle than Canny's hard threshold - which is exactly why lineart shows up so often in character-consistency workflows, where you want a strong, legible structural anchor without Canny's habit of catching every stray fold and blemish as a hard line.

How it works

A learned line-extraction network trained on photographic source images, predicting where a natural line drawing would place its strokes rather than mechanically thresholding pixel gradients. The single toggle it exposes controls how much detail versus how much simplification you get in the result.

The inputs and outputs that matter

  • image - required, your source photo or photorealistic render.
  • coarse - disable (default) for the standard, more detailed line extraction, or enable for bold, sketch-like strokes that drop finer detail in favor of stronger, simpler lines.
  • resolution (default 512) - working resolution.

One output: IMAGE, the line-art map, wired into a lineart ControlNet.

How to install it

ComfyUI Manager: search ComfyUI-Inference-Core-Nodes, install, restart. By hand:

cd ComfyUI/custom_nodes
git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes

then run install.py, or pip install -e .[cuda12] (or .[cuda] / .[rocm] / .[directml] / .[cpu]). Restart ComfyUI. The model weights download from Hugging Face the first time you run the node.

Common issues & troubleshooting

If your line-art output feels too busy or noisy on a detailed photo, flip coarse to enable - it trades detail for boldness and often cleans up the visual noise that comes from fine texture (skin pores, fabric weave, background clutter) getting picked up as lines.

If you're actually working with anime or illustration source material and results look weak or off compared to what you've seen elsewhere, that's a source-mismatch problem, not a setting: this node is trained on photographic edges specifically, and this pack ships a separate Anime Lineart node trained for illustration-style input - use that one for anime art instead. And the usual reminder: match your lineart ControlNet checkpoint to the style this node actually produces (realistic, not anime) or the conditioning won't land the way you expect.

One more thing worth knowing if you came here from an old workflow: this node is sometimes still called by its pre-rename identity in shared graphs and tutorials, since it's part of the same lineage as the original comfyui_controlnet_aux pack this fork descends from. If a downloaded workflow shows a missing-node error for a lineart preprocessor and ComfyUI Manager can't resolve it automatically, check whether it's actually asking for this exact class under a different pack name before assuming your install is broken.

CategoryControlNet Preprocessors/Line Extractors

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
coarseoptCOMBOdisable2 options: disable, enable
resolutionoptINT51264–2048

Outputs (1)

NameTypeDescription
IMAGEIMAGE