[Inference.Core] Standard Lineart
The Classical, No-Download Lineart Extractor
- image
- IMAGE
"Standard" in the name is doing real work here - it's telling you this is the classical version of lineart extraction, not a neural one. The more famous lineart variants (realistic, coarse, anime) are trained models with their own opinions baked in. This one isn't a model at all; it's a Gaussian-blur-and-threshold pipeline, which is exactly why it exposes two raw CV knobs - guassian_sigma and intensity_threshold - that the neural variants keep hidden as black-box internals. No download, no VRAM overhead, tune it directly.
Lineart in general sits a step softer than Canny in the edge-extraction lineup. Canny gives you clean, thin, hard-edge maps - great for architecture and mechanical subjects, but unforgiving on anything organic. Lineart is more like what a person would actually draw if they were sketching the image: softer contours, more forgiving of noisy or painterly source material. Standard lineart, specifically, is the version to reach for when you want that softer read without committing to whatever stylistic bias a trained model brings.
What you actually tune: image is required. guassian_sigma (default 6, range 0–100) controls how much the image gets blurred before edges are extracted - push it up for thicker, softer lines that smooth over fine texture; pull it down for a crisper, more literal read of the source. intensity_threshold (default 8, range 0–16) sets how aggressive the cutoff is once edges are detected - raise it to keep only the strongest, most obvious lines, lower it to let fainter detail through at the cost of a busier map. resolution (default 512) is the standard preprocessing size shared across this whole pack. The single IMAGE output goes into a ControlNet Apply node paired with a Lineart ControlNet checkpoint - this preprocessor only produces the condition, it doesn't load the model.
If you're deciding whether Lineart or Canny is the right call for a given image: Canny wants hard, defined contours and will produce a mess on soft photographic subjects (skin, fabric, foliage). Lineart handles those far better because the Gaussian pass smooths out the noise before edges get pulled, so you get a cleaner, more usable line map on anything that isn't already geometric.
Installing it: this ships in LykosAI's ComfyUI-Inference-Core-Nodes pack. LykosAI is the team behind Stability Matrix, the meta-installer a lot of people use for managing multiple local SD UIs, so this pack tends to be more carefully packaged than a typical one-person node repo. Install through ComfyUI Manager by searching "ComfyUI-Inference-Core-Nodes," or manually: cd ComfyUI/custom_nodes && git clone https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes, then run install.py against ComfyUI's Python environment, or pip install -e .[cuda] / .[cuda12] / .[rocm] / .[directml] / .[cpu] to match your GPU backend for an accelerated onnxruntime, or a bare pip install -e . if you don't need that (this particular node doesn't, since it's pure classical CV). Restart ComfyUI once done.
Troubleshooting: since there's no neural model involved, runtime failures here are almost always parameter tuning rather than bugs - a blank or overly sparse map usually means intensity_threshold is too high, and a noisy, over-detailed map usually means guassian_sigma is too low for your source image. The pack-level issue people do actually hit is ModuleNotFoundError: No module named 'inference_core_nodes', which shows up when the git clone succeeded but the Python package install step didn't complete - often from running install.py against the wrong interpreter on a portable ComfyUI build (target python_embeded explicitly there). If the whole pack won't import, also check for opencv-python version conflicts with other installed node packs - a version mismatch there is a common, well-known cause of import failures across this entire family of preprocessor nodes.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| guassian_sigmaopt | FLOAT | 6.000–100 | — |
| intensity_thresholdopt | INT | 80–16 | — |
| resolutionopt | INT | 51264–2048 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |