ControlNet Pre (+Model/ControlNet): LineArt
LineArt — softer edges than Canny, for structure and characters
- image
- model
- clip
- vae
- control_net
- control_image
- model
- clip
- vae
- control_net
LineArt sits next to Canny in the ControlNet preprocessor family, and the difference between the two matters more than it looks. Canny is a hard-edge detector - thresholds, thin crisp lines, great for architecture and mechanical objects. LineArt produces something softer and more forgiving, closer to actual line-art illustration, and it's historically the preferred conditioning for character work - paired with a Reference ControlNet unit, lineart is the classic 2023-era recipe for keeping a character's design consistent across multiple generated scenes. If Canny gives you a blueprint, LineArt gives you a sketch.
What the settings actually do
Three required inputs beyond image, and they're all genuinely simple. coarse is a boolean toggle between a bold, sketch-like extraction and a finer, more detailed one - the wider ControlNet ecosystem has historically split lineart into named variants like this (a bold/coarse style versus a thinner/realistic one), and this node's coarse flag maps onto that same idea in a single switch rather than a full menu of named presets. style picks the output color mode - grayscale or rgb - and matters because different ControlNet checkpoints were trained on different conventions; if your result looks off, this is worth flipping before you touch anything else. invert flips black and white, the same polarity concern that shows up on every preprocessor in this pack.
Inputs and outputs
Required: image, coarse, style, invert - that's the whole surface, and it's genuinely one of the simplest nodes in the pack. Like its sibling Loaders nodes it also carries optional model/clip/vae/control_net passthrough inputs that mirror straight to matching outputs, purely for keeping your graph tidy if you're routing a model bundle through the same node that's generating your lineart map - skip them if you don't need it. The output you actually care about is control_image (IMAGE), which wires into your ControlNet Apply node the same as any other preprocessor's output - you'll still need a lineart-trained ControlNet checkpoint loaded separately; this node produces the hint image, not the conditioning itself.
Installing it
Search ComfyUI-CN-Pre in ComfyUI Manager, or manually: cd ComfyUI/custom_nodes && git clone https://github.com/OKIE5/ComfyUI-CN-Pre, then restart. One honest caveat before you go looking for documentation: this pack's README is a single mismatched line that doesn't describe the pack's contents at all, and there's no meaningful community discussion of it anywhere - it's a small, low-profile tool you most likely encountered because a workflow you downloaded uses it, not because you went hunting for a lineart node specifically.
A note on what's actually running under the hood
Unlike the MLSD and Segmentation nodes in this same pack, this one doesn't expose a weights_dir or onnx_model field anywhere in its parameters - which is a real, observable difference, worth flagging honestly rather than glossing over: it suggests LineArt either bundles its own small extraction model internally or is built from a more classical, non-downloadable edge algorithm, rather than depending on a separately-fetched checkpoint the way MLSD and Segmentation do. The README doesn't confirm which, so if this node errors on first run, the ComfyUI console log at startup is your best source of truth - it'll show an import or load error if a dependency is actually missing.
Where people get burned
The most likely thing to trip you up is the style setting mismatching what your ControlNet checkpoint expects - try flipping grayscale/rgb before assuming the node itself is broken. Second: because lineart output is softer than Canny by design, don't expect the same crisp precision - if you need architectural sharpness, reach for CN Pre+Loaders: Canny instead; if you're doing character or illustration work where a hard edge map feels too rigid, this is the better starting point. And since there's no documentation to fall back on for what "coarse" actually changes internally, the fastest way to understand it is empirically - toggle it on the same source image and compare the two outputs side by side before committing to a workflow.
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| coarse | COMBO | 2 options: false, true | |
| style | COMBO | 2 options: grayscale, rgb | |
| invert | COMBO | 2 options: false, true | |
| modelopt | MODEL | — | |
| clipopt | CLIP | — | |
| vaeopt | VAE | — | |
| control_netopt | CONTROL_NET | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| control_image | IMAGE | — |
| model | MODEL | — |
| clip | CLIP | — |
| vae | VAE | — |
| control_net | CONTROL_NET | — |