FL Anime Line Extractor
Pull clean line art out of any image with OpenCV
- image
- IMAGE
If you've ever wanted to turn a rendered image into something that looks hand-inked - clean black lines, no shading, ready to color - FL_AnimeLineExtractor is the node for that. And unlike most "extract the lines" tools floating around ComfyUI, it isn't a neural net at all. It's straight OpenCV: adaptive thresholding plus morphological operations. No model to download, no GPU required, runs instantly on CPU.
That's actually the interesting part. Most of the ControlNet-adjacent lineart preprocessors you've probably used (lineart_anime, lineart_realistic, and friends) are learned models trained to guess where the "important" edges are, which is why they hold up on messy photos and complex scenes. FL_AnimeLineExtractor is classical computer vision - it's threshold-and-clean, not understand-and-extract. That means it's fast and predictable, but it also means it works best on images that already have reasonably clean, high-contrast structure: illustrations, renders, flat-shaded art. Feed it a busy photo with lots of texture and gradients and you'll get noisy, cluttered lines rather than something you'd want to color inside of.
What it actually does. Take the image input, and it runs adaptive thresholding to find edge structure, then morphological cleanup to tidy the result into continuous lines rather than a scatter of pixels. Five knobs control the outcome, and you'll mostly touch two or three of them:
line_threshold(0–1, default 0.4) - how sensitive the edge detection is. Lower catches more faint detail; higher keeps only the strongest edges.line_width(1–5, default 1) - how thick the resulting lines are.detail_level(0.1–1, default 0.5) - how much fine detail survives versus getting smoothed away.noise_reduction(0–1, default 0.3) - Gaussian blur applied before thresholding, to keep grain and JPEG artifacts from turning into fake lines.invert_output(bool, default off) - flips black-lines-on-white to white-lines-on-black, or vice versa, depending on what your downstream compositing expects.
There's exactly one output: IMAGE, the extracted line art. Wire it wherever you'd use a lineart image - as a base for a coloring-book-style pass, a ControlNet-style conditioning input if your workflow accepts a plain lineart image rather than requiring the actual ControlNet preprocessor node, or just as a stylistic effect on its own.
Installing it is the standard Fill-Nodes routine: grab it through ComfyUI Manager by searching "Fill-Nodes" (or the full repo name ComfyUI_Fill-Nodes), or do it by hand -
cd ComfyUI/custom_nodes
git clone https://github.com/filliptm/ComfyUI_Fill-Nodes
- then restart ComfyUI.
FL_AnimeLineExtractoritself has no extra model files or heavy dependencies to worry about beyond OpenCV, which the pack already needs for a bunch of its other image nodes, so it should just work the moment the pack loads.
Where people get burned. The most common complaint with a node like this isn't a crash, it's disappointing output - and it's almost always a tuning problem, not a bug. If your lines look broken and patchy, drop line_threshold a bit so weaker edges survive. If the result is a mess of noise instead of clean lines, push noise_reduction up before you touch anything else; a lot of "bad" line extractions are actually just JPEG compression artifacts getting picked up as edges. If you're working from a photo rather than flat art and the output looks chaotic no matter what you do, that's the CV-versus-neural-net tradeoff showing up - this node isn't trying to understand what's foreground and what's background texture, it's just finding contrast boundaries, so genuinely photographic source material is fighting the tool's design. For that kind of source, a learned lineart preprocessor will generally serve you better; save FL_AnimeLineExtractor for cases where speed and a CPU-only footprint actually matter, or where you specifically want its blunter, more literal edge-finding behavior.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| line_threshold | FLOAT | 0.400–1 | — |
| line_width | INT | 11–5 | — |
| detail_level | FLOAT | 0.500.1–1 | — |
| noise_reduction | FLOAT | 0.300–1 | — |
| invert_output | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |