ComfyUI Node Runs on cloud

WanVideo Sampler

The node that actually generates the video

By kijai·Created about a year ago·Updated 2 months ago· 6,651
WanVideo Sampler
  • model
  • image_embeds
  • text_embeds
  • samples
  • feta_args
  • context_options
  • cache_args
  • flowedit_args
  • slg_args
  • loop_args
  • experimental_args
  • sigmas
  • unianimate_poses
  • fantasytalking_embeds
  • uni3c_embeds
  • multitalk_embeds
  • freeinit_args
  • samples
  • denoised_samples
steps30
cfg6.00
shift5.00
seed0
force_offloadtrue
schedulerunipc
riflex_freq_index0
denoise_strength1.00
batched_cfgfalse
rope_functioncomfy
start_step0
end_step-1
add_noise_to_samplesfalse

This is the engine. Everything else in a Wan-wrapper graph - the model loader, the text encoder, the image embeds - exists to feed this node, which runs the denoising loop and produces the latent video. If you only understand one node in the pack, make it this one, because almost every quality-versus-speed decision you make lives on it.

It takes the WANVIDEOMODEL, the WANVIDIMAGE_EMBEDS (from an I2V-encode or an empty-latent node), and your text_embeds, and outputs LATENT samples for the decode node. The long list of optional inputs is where the wrapper's whole feature set - context windows, caching, MultiTalk, Uni3C, skip-layer guidance - plugs in.

The inputs you'll actually set

  • steps - how many denoising iterations. Full-quality Wan is 20-30 steps. With a speed LoRA it's a different world: 3-4 steps per pass, 6-8 total. Default is 30.
  • cfg - guidance strength. Without speed LoRAs, 3.5+ gives better prompt adherence and detail. With a speed LoRA (LightX2V / CausVid), CFG must be 1.0 - and at CFG 1 your negative prompt stops working, which trips up everyone once. Default is 6, which is a no-speed-LoRA number.
  • scheduler - 21 choices, but you live in a handful. unipc (default) is a solid all-rounder. euler/beta is the fast standard. For distilled/speed-LoRA runs, lcm is common. Don't overthink it early; unipc or euler/beta cover most needs.
  • shift - the flow-matching timestep shift. Default 5 is a sensible Wan value; higher shift pushes detail/structure tradeoffs. Leave it until you know why you're changing it.
  • riflex_freq_index - the knob for going past 81 frames. Native Wan context is 81 frames; beyond that, clips start looping or degrading. RIFLEX helps extend cleanly. Leave at 0 for standard-length clips.

Outputs are two LATENTs: samples and denoised_samples. Wire samples into WanVideoDecode.

The optional sockets

This is where the wrapper's advanced features attach: context_options (WanVideoContextOptions, for long-video sliding windows), cache_args (caching for speed), slg_args (skip-layer guidance), multitalk_embeds / uni3c_embeds / fantasytalking_embeds (the audio-avatar and camera-control paths), sigmas (custom sigma schedules), and denoise_strength (for vid2vid or refinement passes where you don't start from pure noise). You add these one at a time as your workflow grows; a first render needs none of them.

How to install it

Part of the pack. Via ComfyUI Manager: search WanVideo Wrapper, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/kijai/ComfyUI-WanVideoWrapper
pip install -r ComfyUI-WanVideoWrapper/requirements.txt

then restart.

Common issues & troubleshooting

Negative prompt is ignored. You're at CFG 1 because of a speed LoRA. That's expected - there's no classifier-free guidance at CFG 1. Either run CFG 3.5+ without the speed LoRA, or add a NAG node to get negative control back.

Output is plastic-skinned and lifeless. Speed LoRAs on the high-noise pass are the usual culprit - the community's well-worn PSA is that they "kill everything that's good" in Wan: composition, lighting, motion, emotion. The fix that stuck is to apply speed LoRAs to the low-noise pass only and keep the high-noise pass clean.

Motion looks like slow-motion or the clip loops at the end. Past ~81 frames Wan starts misbehaving without help. Keep clips at native length, or use riflex_freq_index and/or context options for longer generations.

It's unbearably slow at full quality. That's Wan without acceleration - 25+ minutes for a 720p clip on a 5090 is normal at full quality. Stack fp8, block swap, an attention backend, and a low-noise speed LoRA. Speed on Wan is always an assembled thing, never one switch.

CategoryWanVideoWrapper

Inputs (30)

NameTypeDefaultDescription
modelWANVIDEOMODEL
image_embedsWANVIDIMAGE_EMBEDS
stepsINT30
cfgFLOAT6.000–30
shiftFLOAT5.000–1000
seedINT00–18446744073709550000
force_offloadBOOLEANtrueMoves the model to the offload device after sampling
schedulerCOMBOunipc21 options: unipc, unipc/beta, dpm++, dpm++/beta, dpm++_sde, dpm++_sde/beta, +15
riflex_freq_indexINT00–1000Frequency index for RIFLEX, disabled when 0, default 6. Allows for new frames to be generated after without looping
text_embedsoptWANVIDEOTEXTEMBEDS
samplesoptLATENTinit Latents to use for video2video process
denoise_strengthoptFLOAT1.000–1
feta_argsoptFETAARGS
context_optionsoptWANVIDCONTEXT
cache_argsoptCACHEARGS
flowedit_argsoptFLOWEDITARGSFlowEdit support has been deprecated
batched_cfgoptBOOLEANfalseBatch cond and uncond for faster sampling, possibly faster on some hardware, uses more memory
slg_argsoptSLGARGS
rope_functionoptCOMBOcomfyComfy's RoPE implementation doesn't use complex numbers and can thus be compiled, that should be a lot faster when using torch.compile. Chunked version has reduced peak VRAM usage when not using torch.compile
loop_argsoptLOOPARGS
experimental_argsoptEXPERIMENTALARGS
sigmasoptSIGMAS
unianimate_posesoptUNIANIMATE_POSE
fantasytalking_embedsoptFANTASYTALKING_EMBEDS
uni3c_embedsoptUNI3C_EMBEDS
multitalk_embedsoptMULTITALK_EMBEDS
freeinit_argsoptFREEINITARGS
start_stepoptINT00–10000Start step for the sampling, 0 means full sampling, otherwise samples only from this step
end_stepoptINT-1-1–10000End step for the sampling, -1 means full sampling, otherwise samples only until this step
add_noise_to_samplesoptBOOLEANfalseAdd noise to the samples before sampling, needed for video2video sampling when starting from clean video

Outputs (2)

NameTypeDescription
samplesLATENT
denoised_samplesLATENT