LoRA: add a style or a subject
Lesson "lora", in the group Video of the lesson list. Steps: 8.
What you will be able to do
You connect a LoRA to both models and put its words into the prompt.
What you need
- It goes on from Video from text. The card says so; it is a hint, not a lock.
- Model files the lesson checks:
- the high_noise half of Wan 2.2:
models/diffusion_models, for exampleWan2_2-T2V-A14B-HIGH_fp8_e4m3fn_scaled_KJ.safetensors; - the low_noise half of Wan 2.2:
models/diffusion_models, for exampleWan2_2-T2V-A14B-LOW_fp8_e4m3fn_scaled_KJ.safetensors; - a LoRA for Wan: the high file of a pair, or a single LoRA:
models/loras, for examplemy_style_wan22_high_noise.safetensors; - a LoRA for Wan: the low file of a pair, or a single LoRA:
models/loras, for examplemy_style_wan22_low_noise.safetensors.
- the high_noise half of Wan 2.2:
- Nodes: Load Diffusion Model, ModelSamplingSD3, LoraLoaderModelOnly, CLIP Text Encode (Prompt), WanImageToVideo / KSampler (Advanced) / KSampler.
- The app downloads and installs nothing. The step texts below say which files and folders, and which ComfyUI template names them.
The steps
The words of each step, as the lesson shows them. Node names are in bold.
What a LoRA is (reading)
A LoRA is a small addition to a model. It teaches the model one thing: a style, a character, an object, a kind of motion.
A LoRA is made for its own model. A LoRA for Wan does not work with SDXL, nor the other way round. In the "Models" tab on the left the card of a file shows which model it belongs to.
Wan 2.2 has two models, so a LoRA often comes as a pair of files:
highandlow.A video graph is needed
This lesson goes on from the graph of "Video from text" or "Video from a picture". The canvas must have two Load Diffusion Model nodes and two ModelSamplingSD3 nodes.
If they are not there, do one of those lessons first.
Add two LoRA nodes
Add two LoraLoaderModelOnly nodes: one for each model.
Put them into the model's path
Each LoRA node stands between a model loader and its ModelSamplingSD3 node:
- the
MODELoutput of Load Diffusion Model to themodelinput of the LoRA node; - the
MODELoutput of the LoRA node to themodelinput of ModelSamplingSD3.
Do this for both models. The model passes through the LoRA and comes out changed.
- the
Choose the files and the strength
Choose a file in
lora_name. The node in the path of thehigh_noisemodel takes thehighfile, the one in the path oflow_noisethelowfile. If the LoRA is a single file, put it into both nodes.strength_modelis the strength. 1 means full strength. If the LoRA overrides everything else or spoils the picture, lower it to 0.6-0.8.Several LoRAs are chained: the output of one LoRA node to the input of the next.
The words that switch a LoRA on (reading)
Many LoRAs act only when the prompt holds their words. These are called trigger words.
Open the card of the file in the "Models" tab: if the author wrote these words into the file, they are shown there. If they are not, look at the page you took the LoRA from.
Put the LoRA's words into the prompt
Add your LoRA's words to the
textfield of the CLIP Text Encode (Prompt) node whose output goes into apositiveinput.The app compares the prompt with the words written in the LoRA file itself. If its author wrote none there, there is nothing to compare with and the step counts on its own.
The LoRA is connected (reading)
Run the graph in ComfyUI and compare with the clip without the LoRA.
If nothing changed, check three things: the file fits the model, the trigger words are in the prompt, the strength is not too low.
What the lesson checks
A reading step is done when you press Got it, next. A doing step ticks itself off when the canvas holds:
- Step 2, A video graph is needed:
- a Load Diffusion Model node.
- a Load Diffusion Model node.
- a ModelSamplingSD3 node.
- a ModelSamplingSD3 node.
unet_nameof Load Diffusion Model (first pass) holds the high_noise half of Wan 2.2; such a file lies inmodels/diffusion_models, for exampleWan2_2-T2V-A14B-HIGH_fp8_e4m3fn_scaled_KJ.safetensors.unet_nameof Load Diffusion Model (second pass) holds the low_noise half of Wan 2.2; such a file lies inmodels/diffusion_models, for exampleWan2_2-T2V-A14B-LOW_fp8_e4m3fn_scaled_KJ.safetensors.
- Step 3, Add two LoRA nodes:
- a LoraLoaderModelOnly node.
- a LoraLoaderModelOnly node.
- Step 4, Put them into the model's path:
MODELof Load Diffusion Model (first pass) intomodelof LoraLoaderModelOnly (LoRA of the first pass) (a LoraLoaderModelOnly or ModelSamplingSD3 in between is accepted).MODELof LoraLoaderModelOnly (LoRA of the first pass) intomodelof ModelSamplingSD3 (shift of the first pass) (a LoraLoaderModelOnly in between is accepted); orMODELof ModelSamplingSD3 (shift of the first pass) intomodelof LoraLoaderModelOnly (LoRA of the first pass) (a LoraLoaderModelOnly in between is accepted).MODELof Load Diffusion Model (second pass) intomodelof LoraLoaderModelOnly (LoRA of the second pass) (a LoraLoaderModelOnly or ModelSamplingSD3 in between is accepted).MODELof LoraLoaderModelOnly (LoRA of the second pass) intomodelof ModelSamplingSD3 (shift of the second pass) (a LoraLoaderModelOnly in between is accepted); orMODELof ModelSamplingSD3 (shift of the second pass) intomodelof LoraLoaderModelOnly (LoRA of the second pass) (a LoraLoaderModelOnly in between is accepted).
- Step 5, Choose the files and the strength:
lora_nameof LoraLoaderModelOnly (LoRA of the first pass) holds a LoRA for Wan: the high file of a pair, or a single LoRA; such a file lies inmodels/loras, for examplemy_style_wan22_high_noise.safetensors.lora_nameof LoraLoaderModelOnly (LoRA of the second pass) holds a LoRA for Wan: the low file of a pair, or a single LoRA; such a file lies inmodels/loras, for examplemy_style_wan22_low_noise.safetensors.
- Step 7, Put the LoRA's words into the prompt:
- a CLIP Text Encode (Prompt) node.
- a WanImageToVideo or KSampler (Advanced) or KSampler node.
CONDITIONINGof CLIP Text Encode (Prompt) intopositiveof WanImageToVideo or KSampler (Advanced) or KSampler.textof CLIP Text Encode (Prompt) holds a trigger word of the file chosen inlora_nameof LoraLoaderModelOnly (LoRA of the first pass) orlora_nameof LoraLoaderModelOnly (LoRA of the second pass), when the file's description names any.
Mistakes people make
- A LoRA made for another family or size (SDXL, or Wan 1.3B with a 14B model): nothing happens, ComfyUI only logs warnings.
- The
lowfile in thehigh_noisepath. - Strength 1.5 or more: the picture breaks.
- Forgetting the trigger words.
What next
These lessons go on from this one: Fast video in four steps.