lineArt2LineArt Assistant
Recolor and clean line art you already have — the pack's second act
- lineArt
- lineArt
- default
The other three nodes in the ComfyUI-Img2DrawingAssistants pack create sketches and line art from photos. This one, the lineArt2LineArt Assistant, assumes you already have line art - from the Img2LineArt Assistant, from a ControlNet lineart preprocessor, from a scan - and gives it a cleanup and a recolor. It's the pack's finishing pass, and the README's own suggested workflow is exactly that: hang this node off a lineart preprocessor and repaint the result however you like.
If you've ever pulled line art out of a preprocessor and been stuck with white lines on a black background, or wanted navy-blue ink on white paper without doing it in an image editor, this is the node. Model-free again - pure OpenCV on CPU, instant.
How it works
Nothing is extracted here; the input line art is treated as-is. The node takes the image, optionally inverts it (invert, default on - many preprocessors output white lines on black, and this flips that to black-on-white for processing), cleans up stray specks with clean_up (0–5, morphological noise removal), then re-inks the dark strokes in your chosen line_color and repaints the background with bg_color / bg_light. The details slider (25–255, default 240) is the threshold that decides which pixels count as "line" vs. "paper."
The slightly confusing part is the second invert_default toggle (also default on). It controls the other output: the "default" output is an untouched copy of the input, and invert_default decides whether that passthrough copy gets inverted too. So you get your recolored lineArt output plus a normalized copy of the original. If both toggles are on and you feed in white-on-black line art, the "default" output is your original flipped to black-on-white - useful if you want the clean source and the recolored version.
The inputs that matter
invert(default true) - normalize white-on-black input before processing. Leave it on unless your input is already black-on-white.line_color+color_strength(1–10, default 8) - the ink color and its saturation; strength 10 is full color, lower values wash toward white.bg_color+bg_light- the paper color;bg_lightabove 10 washes toward white.clean_up(0–5) - speckle removal on the incoming line art.
Outputs
lineArt - the cleaned, recolored line art; wire this to Preview or Save Image. default - the (optionally inverted) untouched copy of your input. The naming is unhelpful, but once you know "default = the passthrough," it's easy to ignore.
Install
ComfyUI Manager, search ComfyUI-Img2DrawingAssistants, install, restart. Or:
cd ComfyUI/custom_nodes
git clone https://github.com/Isi-dev/ComfyUI-Img2DrawingAssistants
No model files to download. Dependencies: torch, numpy, opencv-python - torch and numpy come with ComfyUI, and Manager installs cv2 for you. One pack-wide gotcha: this pack requests the full opencv-python build while ComfyUI usually ships opencv-python-headless; both provide cv2, so it mostly works, but pip can churn on which package owns the module.
Troubleshooting
Because the input is pre-existing line art, the single biggest failure mode is getting the inversion wrong: feed it black-on-white art with invert on and your lines vanish into the background. If the output looks empty, flip invert. If lines look thin and washed, raise color_strength toward 10. If your line art came from a messy threshold, clean_up 2–3 handles most speckle.
The author's note applies here as much as anywhere: quality in, quality out. Garbage line art in, cleaner-but-still-garbage line art out. But for taking a usable extraction and turning it into colored, polished ink in one click, it's the one node in the pack that does something the others can't.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| lineArt | IMAGE | — | |
| details | INT | 24025–255 | — |
| clean_up | INT | 00–5 | — |
| line_color | COMBO | 16 options: black, gray, white, lime, blue, yellow, +10 | |
| color_strength | FLOAT | 8.01–10 | — |
| bg_color | COMBO | 16 options: white, black, red, lime, blue, yellow, +10 | |
| bg_light | FLOAT | 101–100 | — |
| invert | BOOLEAN | true | — |
| invert_default | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| lineArt | IMAGE | — |
| default | IMAGE | — |