GetAniDocControlnetImages
The lineart node AniDoc users underestimate — this one decides if the colorization works at all
- input_images
- controlnet_images
Every ControlNet workflow has a preprocessor that turns raw pixels into the condition the model actually follows, and GetAniDocControlnetImages is that node for AniDoc. It takes your lineart animation frames and turns them into the clean, uniformly-sized sketch condition the sampler feeds to its ControlNet. It's also the node people skip past - and then wonder why the colorization looks like a blurry watercolor smear. Garbage in, garbage out, but here the "garbage" is mostly a preprocessor problem.
What it does
The node runs each input frame through one of five bundled lineart detectors, optionally hardens the sketch, and resizes everything to a fixed resolution. The output (controlnet_images) goes straight into AniDocSampler's controlnet_images socket.
- lineart (default) - a neural line-art extractor, the one tuned for general sketches. This is the workhorse.
- lineart_anime - a variant tuned for anime-style clean lines. Use this if your source is already anime.
- canny - classic edge detection with fixed thresholds (100/200). Good for mechanical/architectural linework; gets inverted automatically since the model expects white-on-black.
- hed - soft, gradient edges. More forgiving than canny, less crisp.
- none - no detection at all. This is the important one: if you already have clean lineart (drawn yourself, or extracted elsewhere), pick
noneand feed your frames straight through. This is often the best option.
The neural detectors (lineart, lineart_anime) load real models and can run on cpu or cuda - a CPU is slow but fine for a batch of frames; cuda is much faster if you have the VRAM to spare. Note that cpu here means the detector, not the whole pipeline.
The inputs that matter
- input_images - your frames. In the example workflow these come from VHS_LoadVideo reading the source animation; you can also feed a batch from LoadImage.
- lineart_detector - covered above. Default
lineart, butnoneis the power move for clean input. - sketch_quantization (default on) - the name is a trap. Leave it on to keep soft grayscale lines (the model likes gradients). Flip it off and the code hard-thresholds everything to pure black and white - punchier, but you lose all the in-between shading, and thin lines can vanish.
- width / height (defaults 512 × 320) - the resolution everything gets resized to. The sampler resizes your reference to match, so this sets the effective working resolution of the whole colorization. 512×320 is the model's native sweet spot; going much bigger costs VRAM without buying you much, since SVD's output is still low-res.
- device -
cuda(default) orcpufor the neural detectors.
Why lineart quality is the whole game
Here's the part the demo GIFs don't tell you: the original AniDoc release thread is full of people who tested this on their own animation lineart and came away with results that ranged from mediocre to "so goddamn awful." The model is good; the lineart extraction is where real animation production lineart (or hand-drawn frames) breaks it. If your colorization looks wrong, suspect the sketch condition before you touch the sampler's steps or motion bucket. Try lineart_anime on anime sources, or - if you have clean lineart - switch to none and skip the detector entirely.
Gotchas
- The neural detectors are a hidden dependency. They're bundled in the pack, so they just work after
install.py, but they're another chunk of code that can break on torch-version churn. - Canny/HED output gets inverted automatically; lineart detectors don't. If you pick
none, you're responsible for getting the polarity right - the sampler assumes the condition it receives is in the form the model expects. - Inconsistent input sizes are fine - the node resizes everything to width/height anyway. What you lose by upscaling is sharpness, not the run.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| input_images | IMAGE | — | |
| lineart_detector | COMBO | lineart | 5 options: none, canny, hed, lineart, lineart_anime |
| sketch_quantization | BOOLEAN | true | — |
| width | INT | 51264–1024 | — |
| height | INT | 32064–1024 | — |
| device | COMBO | cuda | 2 options: cpu, cuda |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| controlnet_images | IMAGE | Processed controlnet images |