WanVideo Uni3C Apply (for KSampler)
Inject Uni3C camera control before the KSampler
- model
- uni3c_controlnet
- render_latent
- render_mask
- positive
- negative
- model
The character moves, the camera stays locked - that's the default WanAnimate experience, and for a lot of shots it's fine. But when you want a dolly-in, a pan, or any camera motion, you need Uni3C. WanUni3CApply is the injection point: it takes a model, the Uni3C ControlNet loaded by WanUni3CLoader, and a pre-rendered reference video latent, and returns a patched model whose sampling is steered by the camera trajectory baked into that reference. The patched model goes straight into your KSampler.
Under the hood it monkey-patches the model's forward_orig - the core forward pass - so that after every transformer block, the ControlNet's control states are injected into the stream before the next block processes it. That's the same recipe Kijai's own Wan nodes use, and it's what makes the camera control land at every layer instead of just once. It also does CPU→GPU asynchronous prefetch of the control signal so the injection overlaps with block computation instead of stalling it.
The inputs that matter
- model - the Wan model to inject into.
- uni3c_controlnet - from WanUni3CLoader.
- render_latent - a pre-rendered reference video latent tensor
(B, C, T, H, W). This is the visual reference the camera control is derived from; it's the "how the camera should move" baked into latent space. - strength (default 1, range 0–10) - control intensity, the ControlNet weight analogue. Start at 1 and treat >1 as "leaning hard" - this is where the community's usual weight advice applies: structure that's held too hard fights the motion model.
- start_percent / end_percent (default 0→1) - when during denoising the control applies. This is the same start/end control step that ControlNet users have been reaching for since SD1.5: if the camera control fights the character early, let it kick in after composition forms.
- trim_latent (optional) - the number of latent frames occupied by reference images. Wire this from WanAnimateToVideoCustom's
trim_latentoutput; it aligns the camera reference with the generation's temporal offset, which is the fiddly alignment bit. - positive / negative (optional) - pass your conditioning here and the node auto-extracts
concat_latent_imagefrom it, replacing a separate WanAnimateChannelPack node. If you don't connect these, you'll need the channel pack elsewhere. - render_mask (optional) - an experimental mask to scope where the render control applies.
The single output is the patched model, ready for the KSampler.
Where people get burned
If render_latent is all zeros (unconnected or wrong), the node detects it and silently skips the ControlNet with a console warning - so a "why is nothing happening" moment is usually this. Also check the dependency situation: the Uni3C stack needs diffusers and accelerate installed manually (they're not in the pack's requirements.txt), and you need the actual Uni3C .safetensors in models/controlnet via WanUni3CLoader. And the honest caveat from the community: Uni3C camera moves on Wan are niche and under-documented, so expect to tune strength and the percent window yourself rather than copy-pasting someone else's numbers.
Install
Part of ComfyUI-CustomNodeKit. ComfyUI Manager → search "ComfyUI-CustomNodeKit", or:
cd ComfyUI/custom_nodes
git clone https://github.com/user2318/ComfyUI-CustomNodeKit.git
cd ComfyUI-CustomNodeKit
pip install -r requirements.txt
pip install diffusers accelerate # required for Uni3C
Restart ComfyUI. The Uni3C model file goes in ComfyUI/models/controlnet.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| uni3c_controlnet | UNI3C_CONTROLNET | — | |
| render_latent | LATENT | 预渲染的参考视频潜空间张量 (B, C, T, H, W)。Pre-rendered reference video latent tensor (B, C, T, H, W). | |
| strength | FLOAT | 1.000–10 | — |
| start_percent | FLOAT | 0.000–1 | — |
| end_percent | FLOAT | 1.000–1 | — |
| render_maskopt | MASK | 可选的渲染遮罩(实验性)。Optional render mask (experimental). | |
| trim_latentopt | INT | 00–100 | 参考图占用的 latent 帧数(从 WanAnimateToVideoCustom 的 trim_latent 接入),用于时序对齐。Number of latent frames occupied by reference images (connect from WanAnimateToVideoCustom's trim_latent), used for temporal alignment. |
| positiveopt | CONDITIONING | 可选:传入 conditioning 自动提取 concat_latent_image,替代 WanAnimateChannelPack 节点。Optional: pass conditioning to auto-extract concat_latent_image, replacing the WanAnimateChannelPack node. | |
| negativeopt | CONDITIONING | 可选:传入 conditioning 自动提取 concat_latent_image,替代 WanAnimateChannelPack 节点。Optional: pass conditioning to auto-extract concat_latent_image, replacing the WanAnimateChannelPack node. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |