Animate any character image using a reference/guiding video — transfer motion, swap characters, or recreate performances with your own subject. Powered by the Wan2.1 14B SCAIL V2 model with SAM3 for pose detection and subject isolation.
⚠️ Custom Node Disclaimer
This workflow heavily utilizes custom nodes. Manually modifying the ComfyUI file system or improperly managing node installations can break your ComfyUI environment. Ensure you understand how to manage dependencies and custom node directories before altering the underlying installation to prevent conflicts or system instability.
If you are unfamiliar with these topics, please make a backup of your ComfyUI setup before installing new nodes or updating ComfyUI. For beginners, I generally recommend using the portable version, as it is easier to maintain and back up.
Prerequisites
⚠️ ComfyUI nightly — this workflow uses newer core nodes that might not be available in the stable release yet depending on when you read this.
The following custom node packs, all updated to their latest version:
KJNodes
ComfyUI Essentials
rgthree-comfy
ComfyUI-Frame-Interpolation (for the RIFE interpolation group)
Key Features
Motion transfer / character swap: animate your character with the motion from any reference video, supports single and multiple characters.
SAM3 subject isolation: isolate specific subjects from the guiding video using a simple text description.
Replacement mode (character swap): optionally replace the original character within the guiding video instead of generating a standalone clip.
Batched generation: handles long videos via overlapping batch windows for smooth, seamless output.
LoRA support: A Power LoRA node allows you to easily add character, concept and style Wan2.1 compatible LoRAs.
High-res fix pass: a second sampling pass at a higher resolution for improved detail.
NVIDIA VSR upscaling: GPU-accelerated video upscaling.
RIFE VFI interpolation: smooth out the frame rate with RIFE frame interpolation.
Audio: carries the original audio through to the final output, or a custom audio from an audio file or video source.
COMFYUI SECURITY ERROR FIX
If you hit a security level error while trying to install the ComfyUI_NVIDIA_RTX_Nodes custom node from ComfyUI manager:
You need to temporarily change the security level in your config.ini file.
If you are using the portable version, the file is located at:
ComfyUI/user/__manager/config.iniChange the value to:
security_level = weak
IMPORTANT:
Do NOT forget to restore it back to its original value. It is safe to temporarily lower the security level for this node since it comes directly from the ComfyUI team, but you should restore it afterward for safety reasons.
Perform a hard restart of ComfyUI (completely stop it, then start it again).
Install the custom node using ComfyUI manager and double-check that it is the official one. The link should point to:
https://github.com/Comfy-Org/Nvidia_RTX_Nodes_ComfyUIRestart ComfyUI and check if the node works properly.
If you encounter a dependency error, keep reading...Once everything is working properly, restore your original security level in the config.ini file and restart ComfyUI one final time.
COMFYUI PORTABLE DEPENDENCY ERROR FIX
If you hit a dependency error trying to run the Nvidia VSR node, try this:
Create a backup of your embedded Python directory, in case you break something you can restore your embedded directory later using this backup. Then run the following command:
python -m pip install -U --no-build-isolation nvidia-vfx --index-url https://pypi.nvidia.com
Run the command in your embedded Python directory.
For example: D:\ComfyUI\python_embeded.
This command is designed for CMD. If you're using PowerShell, replace the initial python with .\python.exe.
Detailed instructions are contained in the workflow itself:
Red nodes are instructions and useful notes.
Yellow nodes are configurable elements you can adjust to your needs.
Description
First version release
FAQ
Comments (6)
Trying this wf on my 3090 hoping it is faster than the last wf I've tried
Annoyed I can't set res to 512x896
Pretty annoying getting error at the end of the process
getting this error:
An error occurred in the ffmpeg subprocess: [av1_nvenc @ 0x55c042490800] No capable devices found [vost#0:0/av1_nvenc @ 0x55c0424901c0] [enc:av1_nvenc @ 0x55c042490780] Error while opening encoder - maybe incorrect parameters such as bit_rate, rate, width or height. [vf#0:0 @ 0x55c042491100] Error sending frames to consumers: Generic error in an external library [vf#0:0 @ 0x55c042491100] Task finished with error code: -542398533 (Generic error in an external library) [vf#0:0 @ 0x55c042491100] Terminating thread with return code -542398533 (Generic error in an external library) [vost#0:0/av1_nvenc @ 0x55c0424901c0] [enc:av1_nvenc @ 0x55c042490780] Could not open encoder before EOF [vost#0:0/av1_nvenc @ 0x55c0424901c0] Task finished with error code: -22 (Invalid argument) [vost#0:0/av1_nvenc @ 0x55c0424901c0] Terminating thread with return code -22 (Invalid argument) [out#0/mp4 @ 0x55c04248fcc0] Nothing was written into output file, because at least one of its streams received no packets.
You can set custom resolotions with the resolution master node, that's what it is for.
The error you describe seems to be an NVIDIA NVEC codec error, probably triggered by using an old generation card, try using h264 instead.
AV1 encoding via NVENC only works on NVIDIA's RTX 40-series (Ada Lovelace) and newer, plus some Ada/Hopper-based datacenter cards. Anything old like RTX 30-series, 20-series, or GTX-class can do H.264/HEVC via NVENC just fine, but not AV1.
@LatentHeart gotcha, thanks. A bit confusing since the res master node obscured partially
@LatentHeart as for the codec error dunno, managed to do the same video with a different wf. So you re saying I should export the video with that codec?
@drfaker911219 in the final "Video combine" node, there's a field called "format", it is set to "nvenc_av1-mp4", you should change that to a video codec the graphics card you are working on supports, for a 3090, any H264 codec should work just fine.
@LatentHeart Thanks man!
As you can see its a big buggy...
main prompt was "woman with bob cut hair style walking"
while sam3 prompt was "naked female person" will try with naked female only
any other settings I should modify?
