Nodes/ComfyUI-WanVideoWrapper/WanVideo Model Loader
ComfyUI Node Runs on cloud

WanVideo Model Loader

The front door to Kijai's Wan wrapper

By kijai·Created about a year ago·Updated 2 months ago· 6,651
WanVideo Model Loader
  • compile_args
  • block_swap_args
  • lora
  • vram_management_args
  • extra_model
  • fantasytalking_model
  • multitalk_model
  • fantasyportrait_model
  • model
model
base_precisionbf16
quantizationdisabled
load_deviceoffload_device
attention_modesdpa
rms_norm_functiondefault

This is the node every Wan-wrapper graph starts from. It loads the Wan diffusion transformer - the 14B or 5B checkpoint that actually generates your frames - and hands out a WANVIDEOMODEL that the sampler, block-swap, LoRA, and torch-compile nodes all plug into. If you're building a Wan workflow in Kijai's wrapper rather than ComfyUI's native Wan nodes, everything hangs off this.

One thing to get straight up front: this is the wrapper's loader, not ComfyUI's built-in one. The wrapper is a parallel, more feature-forward way to run Wan - it tends to get new models, new attention backends, and experimental features first, at the cost of being a faster-moving target. Its WANVIDEOMODEL type doesn't interchange with native Wan nodes, so don't try to mix the two families in one graph. Pick a lane.

The inputs that actually matter

  • model - the checkpoint file itself, picked from ComfyUI/models/diffusion_models. This is the single download you can't skip. Most people run Kijai's fp8 repacks (the WanVideo_comfy / WanVideo_comfy_fp8_scaled collections) rather than the raw 27B/14B weights.
  • base_precision - bf16 by default, and that's the right answer for the vast majority of cards. fp16_fast exists for a bit more speed on newer GPUs.
  • quantization - this is your VRAM lever. disabled runs the model at full base_precision; the fp8_e4m3fn variants roughly halve the weight footprint at near-zero visible quality loss, which is what makes Wan 14B fit on a 16-24GB card at all. If you own a 40-series or newer NVIDIA GPU, the _fast variants use native fp8 compute for extra speed. When in doubt, fp8_e4m3fn_scaled is a sane default.
  • attention_mode - sdpa works everywhere with no setup. sageattn and the flash-attention modes are meaningfully faster but need SageAttention/Triton or flash-attn installed, and getting Triton working on Windows is a well-known rite of passage. Start on sdpa, upgrade once the rest of the graph runs.

The output is a single WANVIDEOMODEL.

The optional sockets are where the wrapper flexes

The optional inputs are how you bolt features onto the model without a different loader for each: block_swap_args (from WanVideoBlockSwap) to fit on less VRAM, lora (from WanVideoLoraSelectMulti) for speed and character LoRAs, compile_args (from WanVideoTorchCompileSettings) for torch.compile, and extra_model / multitalk_model / fantasytalking_model / fantasyportrait_model to attach VACE and the audio-avatar models. You wire in only the ones your workflow needs; the rest stay empty.

How to install it

Via ComfyUI Manager: search WanVideo Wrapper (or ComfyUI-WanVideoWrapper), install, restart. Manually:

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

then restart. The pack itself is lightweight - the weight is the model files. You'll separately need the diffusion model (above), the Wan T5 text encoder, and the Wan VAE before a graph will run.

Common issues & troubleshooting

The model dropdown is empty. You haven't downloaded a checkpoint into models/diffusion_models yet, or ComfyUI hasn't rescanned. Drop a file in and restart.

Out of memory on a 12-16GB card. Set quantization to an fp8 variant and attach a WanVideoBlockSwap node. That combination is the standard way people run 14B locally; block swap trades some speed to move transformer blocks to system RAM.

You picked a Sage/flash attention_mode and it errors. Those backends aren't installed. Fall back to sdpa, which needs nothing, and only chase the faster ones once the workflow is otherwise solid.

Quality looks off after switching to fp8. It shouldn't - fp8 is near-lossless for Wan inference. If something genuinely regressed, it's more likely a speed LoRA on your high-noise pass than the quantization; check that before blaming fp8.

CategoryWanVideoWrapper

Inputs (14)

NameTypeDefaultDescription
modelCOMBOThese models are loaded from the 'ComfyUI/models/diffusion_models' -folder
base_precisionCOMBObf164 options: fp32, bf16, fp16, fp16_fast
quantizationCOMBOdisabledOptional quantization method, 'disabled' acts as autoselect based by weights. Scaled modes only work with matching weights, _fast modes (fp8 matmul) require CUDA compute capability >= 8.9 (NVIDIA 4000 series and up), e4m3fn generally can not be torch.compiled on compute capability < 8.9 (3000 series and under)
load_deviceCOMBOoffload_deviceInitial device to load the model to, NOT recommended with the larger models unless you have 48GB+ VRAM
attention_modeoptCOMBOsdpa9 options: sdpa, flash_attn_2, flash_attn_3, sageattn, sageattn_3, radial_sage_attention, +3
compile_argsoptWANCOMPILEARGS
block_swap_argsoptBLOCKSWAPARGS
loraoptWANVIDLORA
vram_management_argsoptVRAM_MANAGEMENTARGSAlternative offloading method from DiffSynth-Studio, more aggressive in reducing memory use than block swapping, but can be slower
extra_modeloptVACEPATHExtra model to add to the main model, ie. VACE or MTV Crafter
fantasytalking_modeloptFANTASYTALKINGMODELFantasyTalking model https://github.com/Fantasy-AMAP
multitalk_modeloptMULTITALKMODELMultitalk model
fantasyportrait_modeloptFANTASYPORTRAITMODELFantasyPortrait model
rms_norm_functionoptCOMBOdefaultRMSNorm function to use, 'pytorch' is the new native torch RMSNorm, which is faster (when not using torch.compile mostly) but changes results slightly. 'default' is the original WanRMSNorm

Outputs (1)

NameTypeDescription
modelWANVIDEOMODEL