LVCD Sampler
Feed it lineart plus one color frame, get a video back — LVCD Sampler
- LVCD_pipe
- ref_images
- sketch_images
- LVCD_pipe
- samples
This is the node where the actual magic happens. Load LVCD Model gives you a pipe; this node takes that pipe plus two image inputs and runs the diffusion. It's the SVD sampler at the core of the LVCD pack, and if you've ever used a KSampler, the shape of the controls will feel familiar - the difference is that it samples a sequence of frames conditioned on sketches and a reference, not a single image.
The idea is simple and the paper behind it is elegant: you hand it a ref_images batch (your color reference, often just the first colored frame of your animation) and a sketch_images batch (the lineart frames you actually want colorized). LVCD - "Reference-based Lineart Video Colorization," SIGGRAPH Asia 2024 - uses a sketch-guided ControlNet on top of Stable Video Diffusion to keep the video controllable, and ReferenceAttention to drag the colors from the reference across frames, even through fast motion where frame-by-frame colorization falls apart.
What you actually set
There are a dozen inputs here but the defaults are sane and only a handful matter on day one:
- ref_images / sketch_images - the two image batches above. Both are required; wire your first frame to
ref_imagesand the lineart sequence tosketch_images. In the bundled example, aLineArtPreprocessor(from the ControlNet Aux pack) produces the lineart and anImageConcatMulti(KJNodes) packs the frames into a batch. - num_frames - default 19, and note the minimum is 15. That floor is SVD's native fixed-length window. If you want longer output, don't crank this number in a panic - the overlap and prev_attn_steps inputs exist precisely so the model can extend past its window with sequential, overlapped sampling.
- num_steps - default 25. Normal sampler behavior; fewer steps = faster but rougher.
- seed - default 123, ranges up to 2^32. Set it to a fixed value to reproduce a run, or randomize to explore.
- overlap / prev_attn_steps - the long-video machinery.
overlap(default 4) is how many frames bleed between sampling passes so seams don't show;prev_attn_steps(default 25) is how many steps keep attention on the previously sampled frames. Both equal num_steps at default, which is the right starting place. - fps_id / motion_bucket_id / cond_aug - SVD's micro-conditioning, passed through untouched. fps_id 6 and motion_bucket_id 160 are the standard video defaults;
cond_augadds noise to the conditioning frame during sampling (0 is clean, the example uses 0.02 - higher gives the model more creative room at the cost of drift). - keep_model_loaded - off by default, and that's deliberate: the sampler offloads SVD and the ControlNet back to RAM after each run to keep VRAM free. Flip it on only if you're iterating repeatedly and the reload time is killing you and you have the memory to spare.
What comes out
Two outputs: a pass-through LVCD_pipe (handy if you want to chain sampling or keep the decoder fed from the same pipe), and the one you care about - samples, typed SVDSAMPLES. These are latents, not frames. Do not wire them into SaveImage and wonder why it's angry; they go straight into the LVCD Decoder node, which turns them into actual images you can save or feed to VHS_VideoCombine to write an MP4.
Same install, one gotcha
Install is the pack-level story: ComfyUI Manager search "LVCD", or clone https://github.com/kijai/ComfyUI-LVCDWrapper into custom_nodes and restart. The heavy requirements.txt (openai clip, open-clip-torch, pytorch-lightning, timm, omegaconf) is this pack's real install step - if sampling dies on import, those are the first things to check. And remember it needs an SVD checkpoint in models/checkpoints; without one, Load LVCD Model hands you an empty pipe and this node has nothing to run.
The one beginner trap specific to this node: forget ref_images and you're doing unconditional-ish sampling with no color source, and the output looks like noise pretending to be lineart. The reference is the whole point - that's what makes the result "your colors, consistently, across a long clip." If you want the lineart colorization workflow, this is the node to reach for, and it's still the honest purpose-built tool for it even now that the general video field has moved on to Wan and LTX.
Inputs (12)
| Name | Type | Default | Description |
|---|---|---|---|
| LVCD_pipe | LVCDPIPE | — | |
| ref_images | IMAGE | — | |
| sketch_images | IMAGE | — | |
| num_frames | INT | 1915–100 | — |
| num_steps | INT | 251–100 | — |
| fps_id | INT | 61–100 | — |
| motion_bucket_id | INT | 1600–1000 | — |
| cond_aug | FLOAT | 0.000–1 | — |
| overlap | INT | 41–100 | — |
| prev_attn_steps | INT | 251–100 | — |
| seed | INT | 1230–4294967296 | — |
| keep_model_loaded | BOOLEAN | false | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| LVCD_pipe | LVCDPIPE | — |
| samples | SVDSAMPLES | — |