❤️ If you enjoy my work and would like to support me, consider buying me a
☕ Coffee.
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 (17)
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?
I'm amazed at how easy this workflow was to install, setup and run. You did a really great job. I haven't delved into the extra features but the standard generation is excellent. I am running on a 16Gb RTX 5060TI if this helps anyone.
Glad to hear it ;)
@LatentHeart i pushed it to the limit and did a 50 second clip with standard settings. It took 2 hours and 12 minutes. Result posted to the gallery. It was surprisingly good but image degradation noticeably appears around 20 seconds and gets progressively worse till the end of the clip. I presume this is still a big problem with Wan. In the past I would splice the clip and render a multiple sections. I think I might try that and see.
@boinobin730 Yes, but in my opinion is not image degradation, is color degradation, because of the looping sampling, since every new batch, the last few frames are taken as reference and the color starts drifting the more batches you do, so the best strategy with this model is to try to maximize the batch size, push it as high as your GPU can handle, and try to make as fewer loops as possible. On my 4090, 30 second videos seem ok with a batch size of 80 frames, beyond that is when color drifting starts to be noticeable. Still pretty impressive you could get such a long video with a 16GB graphics card, cudos for that ;)
@LatentHeart Interesting. I will have a play and tweak settings. Fantastic improvement of Scail2 is compared to the old method. .oh thanks for the yellow buzz tip. Keep up the great workflows.
@boinobin730 which quant or model are you using for your hardware?
@sandpies Apologies for the late reply. Been remote away from the AI rig. I am using the standard . wan2.1_14B_SCAIL_2_fp8_scaled.safetensors . This thing is moving too fast. I am now just looking at Minimax now.
Garbage workflow, just crashes and won't even run. Just go to sleep.
Maybe you have a garbage PC hahahaha
works for me, though there are some minor issues with it. author needs to learn how fps works with scail since they're giving bad advice in the notes, plus a few things that hinder quality but if u kno what ur doing it's easy edits and i'll upload an example of what it can do soon
decent wflow with some minor issues. please IGNORE the author's advice about keeping 16fps! 16fps is fine for testing.. but you always want to use an fps as close to your source video as possible (up to 30fps) for better motion fidelity example here
the distilled lora should be set to 1 and not .8, and the video size should be divisible by 32 instead of 16(otherwise some videos will affix a weird bar on the side or bottom).
for some reason this wflow tends to keep the red/blue masking in the final output video as you can see here (this one looked cool but usually it doesn't), which i haven't experienced with other wflows (yet?).
the notification node is annoying and my browser keeps asking me if i want to allow notifs even when the node is bypassed, so i deleted the node altogether.
another issue is when replacing characters, this wflow changes the background and removes text on screen more so than any other wflow i've tried, and i haven't found a way around it.
and lastly, the hi-res fix is useless? it doubled my gen time at 720p and tripled it at 1080p while making the output slightly worse. (i'll play around with hires fix again if i ever come back to this wflow after i've tested the others)
