Nodes/ComfyUI-WanVideoWrapper/WanVideo Set LoRAs
ComfyUI Node Runs on cloud

WanVideo Set LoRAs

Apply Wan LoRAs live in the linear layers, no merge

By kijai·Created about a year ago·Updated 2 months ago· 6,651
WanVideo Set LoRAs
  • model
  • lora
  • model

If you run Wan the way most people do, you've got at least one LoRA in the graph - a speed LoRA like LightX2V or CausVid, a character LoRA, probably both. The usual way to apply a LoRA in WanVideoWrapper merges its weights into the model before sampling. WanVideoSetLoRAs does it differently: it sets the LoRA weights to be used directly in the model's linear layers, and it does NOT merge.

Why care about that distinction? Merging bakes the LoRA into the model weights, which costs a chunk of time and memory up front and has to be redone every time you change the LoRA or its strength. Applying at the linear-layer level instead means the base weights stay untouched and the LoRA is applied on the fly during the forward pass. You pay a small per-step compute cost but skip the merge entirely - which is a real win when you're iterating, swapping LoRAs, or stacking several and tweaking strengths run after run.

How it works

A LoRA is a low-rank pair of matrices that adjust specific linear layers of the model. "Merging" folds that adjustment permanently into the weights. This node keeps them separate: it registers the LoRA against the linear layers so the math happens live at inference. The model comes out the other side patched-but-not-baked, ready for the sampler, with the LoRA sitting on top rather than inside.

The inputs and outputs that matter

This node is deliberately minimal:

  • model (WANVIDEOMODEL) in, model (WANVIDEOMODEL) out - the required connection. Wire the output straight into your sampler (or the next patch node).
  • lora (WANVIDLORA, optional) - the LoRA(s) to apply, coming from a WanVideo LoRA-select node where you actually pick the file and set strength. This is optional on the node, but with nothing plugged in it's a passthrough that does nothing, so in practice you always feed it something.

There are no strength or blend knobs on this node itself - that lives on the LoRA-select node upstream. This one is purely the "apply these, live, no merge" step.

How to install it

ComfyUI Manager: search ComfyUI-WanVideoWrapper, install, restart. Or manually:

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

then restart. The node downloads nothing - but you need the Wan LoRA files themselves in ComfyUI/models/loras and the base Wan model loaded for it to have anything to patch.

Common issues & troubleshooting

Nothing plugged into lora. The input is optional, so ComfyUI won't stop you leaving it empty - and then the node is a no-op. If your LoRA "isn't doing anything," check the wire.

Speed LoRAs still pin you to CFG 1. This node changes how the LoRA is applied, not what it does. A distillation/speed LoRA (LightX2V, CausVid) still forces CFG 1.0 and still costs you some motion and detail - the community's standing warning is that these LoRAs degrade Wan 2.2's scene composition and give it "plastic skin," best mitigated by using them on the low-noise pass only. Set-vs-merge doesn't rescue that; it just avoids the merge overhead.

Chained ordering. If you're stacking this with other model-patch nodes (attention swaps, cache args, experimental args), remember they each take model in and hand model out - order them deliberately and check the final model wire actually reaches the sampler.

CategoryWanVideoWrapper

Inputs (2)

NameTypeDefaultDescription
modelWANVIDEOMODEL
loraoptWANVIDLORA

Outputs (1)

NameTypeDescription
modelWANVIDEOMODEL