Line Boil (Video)
Batch-Boil an Entire Video File Without Touching a Frame Tensor
- output_path
Sibling to the Line Boil (Image) node, and it solves a different problem. The Image version works inside the graph - frames in, frames out, ready for more nodes. This one is the batch job: give it a path to a video file on disk, and it chews through every frame, writes a new .mp4 next to the original, and hands you back the output path. No tensors, no VRAM pressure from holding a whole clip in memory.
The use case is the same one that gets people asking on r/comfyui: your WAN (or whatever) output is too clean and stable, you want that hand-drawn line boil, and you don't want to babysit a thousand frames. This is the fire-and-forget version.
How it works
It's OpenCV end to end. cv2.VideoCapture opens the file, reads frames in chunks, and runs the exact same per-frame pipeline as the Image node - near-black line detection, mask warp, shift, jitter - then cv2.VideoWriter writes them out with the mp4v codec at the source's resolution and framerate. A progress bar tracks the whole clip, and if the parallel pool chokes for any reason it falls back to sequential rather than dying. The output filename is {original_name}{suffix}.mp4, written into the same directory as the source.
Same effect parameters as its sibling - black_threshold, warp_strength, warp_scale, shift, alpha_jitter, hold, seed, workers, use_gpu - so if you've tuned the Image version, copy your numbers over and it behaves identically. hold still does the "on twos / on threes" pattern reuse, which on a long clip is also your main speed lever.
Inputs and outputs that matter
video_path- a plainSTRINGwith the absolute path to your video. The whole node hangs on this.suffix- defaults to_boiled, soclip.mp4becomesclip_boiled.mp4.- Everything else is the shared effect kit:
black_threshold(45),warp_strength(0.8), andhold(2) are the three you'll actually turn.
The single output is output_path, a STRING pointing at the finished file. There's nothing to wire into the image pipeline - it's a file-out node by design.
Where it fits
Reach for this one when you're processing long footage, or when the video lives on disk and you just want the result on disk. It streams frame-by-frame, so memory stays flat no matter how long the clip is - the Image node loads the whole batch into RAM. If you want to keep working on the frames afterwards, or you're already holding them as a tensor, use the Image version instead.
The traps
- It will not accept a video tensor. VHS output, video latent batches, all that - this node takes a string path, full stop. Beginners wire a video output into it and wonder why nothing happens. It's a
STRINGinput. - Silent-ish failure. If the path doesn't exist or the file won't open, it logs an error and returns your input
video_pathunchanged. Check the console, and check the returned path isn't the original. - No audio.
cv2.VideoWriterdoesn't copy the audio track, so_boiled.mp4comes out silent. Mux it back:ffmpeg -i original.mp4 -i original_boiled.mp4 -map 0:a -map 1:v -c copy out.mp4 - Big files.
mp4vis a soft, space-hungry codec; re-encode with H.264 (-c:v libx264 -crf 18) if size matters. use_gpuis a no-op for most people. Stock OpenCV builds have no CUDA; the node detects that and falls back to CPU. Don't expect a speedup unless you installed a CUDA-enabled OpenCV.
Installation
Same pack as the Image node - install once:
cd ComfyUI/custom_nodes && git clone https://github.com/scofano/comfy-line-boil
Then restart ComfyUI (or use Manager and search "ComfyUI Line Boil"). Just numpy and opencv-python, auto-installed; no models, no keys. The whole pack is MIT-licensed and self-contained.
Inputs (13)
| Name | Type | Default | Description |
|---|---|---|---|
| video_path | STRING | — | |
| suffix | STRING | _boiled | — |
| enabled | BOOLEAN | true | — |
| black_threshold | INT | 450–255 | — |
| expand | INT | 10–10 | — |
| warp_strength | FLOAT | 0.80–10 | — |
| warp_scale | FLOAT | 28.01–100 | — |
| shift | INT | 10–10 | — |
| alpha_jitter | FLOAT | 0.060–1 | — |
| hold | INT | 21–100 | — |
| seed | INT | 12340–18446744073709550000 | — |
| workers | INT | 41–64 | — |
| use_gpu | BOOLEAN | false | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| output_path | STRING | — |