Richard's Video Kits
ComfyUI video segment saving, Wan Animate 2 loops, and final assembly with source audio
Richard's Video Kits (RVK)
ComfyUI nodes for saving video segments, running an editable Wan Animate 2 workflow across a driving video, and assembling the finished segments with the original audio.
Configure one Motion Transfer graph and queue once. RVK saves each completed segment before queuing the next, keeping continuation in memory. Completed videos survive a stopped run; generation does not resume from disk checkpoints.
Version: 1.0.0. This repository contains the stable runtime, user documentation and example workflows. It is published in the Comfy Registry and available to current ComfyUI Manager versions as Richard's Video Kits / richards-video-kits.
Nodes
| Node | Purpose | | --- | --- | | RVK Save Segment Video | Save an IMAGE batch as a verified, silent H.264 MP4. Usable without Wan. | | RVK Finalize Segments | Join completed segments and add the driving video's audio. Usable without model inference. | | RVK Wan Animate 2 Loop Entry | Start a run, plan its windows and select an empty output directory. | | RVK Wan Animate 2 Collect | Prepare the delivered frames and minimal in-memory continuation. | | RVK Wan Animate 2 Advance | Confirm the saved segment and advance the loop. |
Installation
The tested configuration is Windows / NTFS, Python 3.12, ComfyUI v0.36.0, frontend 1.52.7, with --cache-classic. Wan inference was tested on an RTX 4080. Other configurations have not been validated.
- In a current ComfyUI Manager, search for Richard's Video Kits or
richards-video-kits, install version1.0.0, then restart ComfyUI. If a cached channel does not show a newly published entry, refresh it or use the remote channel. - Keep only one RVK installation. Its
__init__.py,rvk/, andweb/must be directly inside one directory underComfyUI/custom_nodes/. - RVK uses PyAV, NumPy and PyTorch from ComfyUI's existing environment and adds no pip dependencies. For final assembly, ensure that FFmpeg with AAC encoding is available on the ComfyUI process's
PATH; FFmpeg 7.0.2 was tested. - Start ComfyUI with
--cache-classic, refresh the browser, search for the five nodes above, and import the loop workflow.
For a fresh installation, run this from your ComfyUI directory while ComfyUI is stopped:
git clone https://github.com/Richard-Wang-fs/ComfyUI-RichardsVideoKits.git custom_nodes/ComfyUI-RichardsVideoKits
If you already have RVK installed under another directory name, stop ComfyUI and move that installation outside custom_nodes before cloning. Keep it as a backup; loading two copies can cause conflicts. Your videos remain in ComfyUI's output directory.
Quick start
- Select your reference image and full, untrimmed constant-frame-rate (CFR) driving video. The video must include audio if you want a final video with sound.
- Select the official Wan Animate 2 models and edit the prompt in the Motion Transfer subgraph. Models and media are not included.
- Set
lengthon Loop Entry:81is the default; accepted values are4k+1from 5 through 16381. Longer segments require more memory. Keep the existing length connection to Motion Transfer. - Set a new, empty directory relative to ComfyUI's output directory on Loop Entry. It is already connected to Save and Finalize.
- Queue once and keep the workflow open. Do not edit its inputs or graph during a run. Use Stop RVK after current segment on Loop Entry to stop further segments.
See workflow usage and input constraints.
Outputs and recovery
Each segment is saved as segment_0000.mp4, segment_0001.mp4, and so on. These videos are silent. When all frames are complete, Finalize joins the video streams without re-encoding and adds the first original audio track as AAC to final.mp4. Segment files are retained; existing outputs are never overwritten.
If every segment already exists, use the standalone finalization workflow with the same original video and segment directory. It performs no Wan inference. An incomplete run must start again in a new directory; RVK does not reconstruct model state from saved videos.
Files ending in .partial.mp4 are incomplete outputs. Investigate the reported error before manually removing a partial file, and ensure no active writer is using it. A cleanup_required error can mean that a completed file and its partial link both exist.
Tested limits
- Verified: real three-segment Wan runs with a short tail, public Stop, and a separate 12-segment / 903-frame finalization with AAC audio.
- The short Wan test used a silent input, so its finalization correctly rejected missing audio; it was not an end-to-end audio test.
- Not validated: a full three-minute resource profile, interruption during active inference, segments taking more than 30 minutes, other filesystems, or equivalent memory behavior with the default RAM-pressure cache.
- Input must be file-backed CFR video with an exactly representable frame timeline. Missing, short or offset audio is rejected by Finalize. Saved segments remain usable when finalization fails.
- No persistent tensors, image sequences, automatic generation resume, model downloads or bundled weights.
ComfyUI baseline: v0.36.0, ee71d5c4993f29086b27fde1629a945ae48425bf. See NOTICE for workflow attribution and PUBLISHING for release maintenance.
License
RVK's original code is available under the PolyForm Noncommercial License 1.0.0. This is source-available software for noncommercial purposes, not an OSI-approved open source license. Commercial use is not granted by this license; contact Richard-Wang-fs for separate permission.
The upstream workflow template material retains its MIT notice. The software license does not grant rights in model weights, input media or generated media; their applicable terms remain separate.