Anime Lineart
Clean line extraction for anime and illustration
- image
- IMAGE
This one pulls clean, anime-style line art out of an image - the crisp, deliberate outlines you'd see in a cel-shaded illustration, not the busy edge soup a Canny detector gives you. Hand those lines to a lineart ControlNet and the model redraws the scene following your outlines while inventing new color, shading, and style. It's the go-to preprocessor for anime and illustration structure work: recolor a character, restyle a drawing, or keep a character's silhouette consistent across scenes while everything else changes.
Why you'd reach for it over Canny
Canny gives you every edge, including texture and noise. Anime Lineart is trained specifically to extract the kind of intentional linework an artist would draw - smoother, more selective, and far more forgiving for stylized subjects. On an anime screenshot or a piece of line art, Canny produces a jittery mess; this node produces clean lines the ControlNet can actually follow into a coherent redraw. The KB's standing note is that lineart (paired with a Reference ControlNet on SD1.5/SDXL) was one of the classic recipes for keeping an AI character consistent from scene to scene - and the anime flavor is the one you want when the subject is drawn rather than photographed.
The inputs and output
Refreshingly minimal - there's basically nothing to fiddle with:
image- the source, ideally an illustration, anime frame, or drawing.resolution(default 512) - working size. Match it to your generation resolution for clean lines; higher resolution captures finer linework at the cost of speed. ThePixelPerfectResolutionnode in this pack can compute the ideal value.
The single output is an IMAGE - white lines on black - that goes into a ControlNet Apply node with an anime lineart ControlNet (control_v11p_sd15s2_lineart_anime). As with everything in this pack, the node makes the hint image; the lineart ControlNet model is a separate download.
Installing it
ComfyUI Manager: search ComfyUI's ControlNet Auxiliary Preprocessors, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Fannovel16/comfyui_controlnet_aux
pip install -r requirements.txt
Restart ComfyUI. The line-extraction weight (netG.pth) downloads from HuggingFace on first run - expect a one-time pause.
Where people get burned
First - you knew it was coming - the lines alone do nothing without a lineart ControlNet loaded and wired to this node's output. Second, match the model to the flavor: this node pairs with the anime lineart ControlNet, and feeding its clean anime lines into a realistic-lineart or generic model gives muddier results than using the matched pair. Third, input matters more here than with edge detectors: Anime Lineart is tuned for drawn content, so on a noisy photograph it'll still extract something, but it's not the right tool - use a realistic lineart node or Canny for photos. And if you're working from a noisy manga scan or a low-quality screenshot with compression artifacts, look at the Manga Lineart node (Manga2Anime_LineArt_Preprocessor) instead - it's built to denoise before it extracts, which keeps junk out of your line map. Finally, the usual weight discipline: for line conditioning, dropping the ControlNet weight a little and ending it partway through the steps keeps the redraw from feeling traced.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| resolutionopt | INT | 51264–16384 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |