CCTech Lineart Preprocessor ⚡
Realistic lineart — the preprocessor behind character consistency
- image
- IMAGE
Lineart preprocessors turn a photo into a line drawing - the kind of clean, natural outline you'd expect a human illustrator to have started from - and that makes them the backbone of one of the most popular ControlNet tricks in the book: keeping a character consistent across scenes. The community thread "ControlNet reference+lineart works so great!" was a breakout for a reason. You extract lineart from a reference, feed it to a lineart ControlNet, and the character's outline travels with them into new poses and backgrounds.
This node is the "realistic" flavor: thicker, more natural line strokes than the anime variant in the same pack, aimed at illustration that still reads like a drawing rather than an inked cartoon. If your pipeline ends at anime-style art, you'll usually prefer the CCTech Lineart Anime node instead.
How it works
The detector is a ResNet encoder-decoder generator - it's literally trained to output line drawings, so it's a small generative model rather than an edge filter. It ships in two checkpoints: a fine one for detailed, dense lines and a coarse one for bolder, sketchier strokes. This node is a from-scratch port of the architecture from comfyui_controlnet_aux (Apache-2.0). The checkpoints download from HuggingFace on first use into ComfyUI/models/lineart/.
Inputs and outputs that matter
image- a photo or render of the subject you want to outline.resolution(default 512, 64–2048) - internal working size.coarse(default off) - switch to the coarser checkpoint. Off gives you the fine, detailed linework; on gives you fewer, bolder lines that read as a sketch. Worth trying both on the same reference - character consistency workflows often land on the coarse version because the ControlNet has less noisy detail to fight.
The output is one IMAGE: the line drawing. Wire it into a lineart ControlNet's control_image. Combined with a reference/identity condition, this is the standard character-consistency setup; on its own it's a clean structural condition for a wide range of illustration styles.
Installing it
One of eleven preprocessors in ChrisColeTech/ComfyUI-ControlNet-Nodes, under 🤖 CCTech/Preprocessors. Install via ComfyUI Manager (search "ComfyUI-ControlNet-Nodes") or:
cd ComfyUI/custom_nodes
git clone https://github.com/ChrisColeTech/ComfyUI-ControlNet-Nodes
Restart ComfyUI. Dependencies are just the pack's own huggingface_hub and opencv-python.
Common issues
First run downloads the checkpoint (both the fine and coarse weights are pulled on demand) - expect a pause the first time you run it, and again the first time you flip coarse. If the linework comes out messy, remember this is a generator, so it can hallucinate stray marks; dropping resolution a bit or switching to the coarse checkpoint usually helps. And don't confuse this with the anime variant - feeding realistic lineart into an anime-trained ControlNet checkpoint will fight you. Match the preprocessor to the ControlNet you loaded.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| resolution | INT | 51264–2048 | — |
| coarse | BOOLEAN | false | Use the coarser of the two checkpoints - fewer, bolder lines. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |