Instructions to use nhuquangls/ha379-wan-lora with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use nhuquangls/ha379-wan-lora with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image, export_to_video # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("ai-toolkit/Wan2.2-I2V-A14B-Diffusers-bf16", torch_dtype=torch.bfloat16, device_map="cuda") pipe.load_lora_weights("nhuquangls/ha379-wan-lora") prompt = "A man with short gray hair plays a red electric guitar." input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/guitar-man.png") image = pipe(image=input_image, prompt=prompt).frames[0] export_to_video(output, "output.mp4") - Wan2.2
How to use nhuquangls/ha379-wan-lora with Wan2.2:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
ha379 Wan 2.2 I2V 14B LoRA
This repo contains the ha379 dataset, AI Toolkit training config, LoRA checkpoints, and optimizer state for continuing training Wan 2.2 I2V 14B.
Trained LoRA
Each LoRA checkpoint is split into Wan 2.2 high-noise and low-noise files. Available checkpoints:
loras/ha379_wan22_i2v_14b_lora_step5000_high_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_step5000_low_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_000008000_high_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_000008000_low_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_000008500_high_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_000008500_low_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_000009000_high_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_000009000_low_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_000009500_high_noise.safetensorsloras/ha379_wan22_i2v_14b_lora_000009500_low_noise.safetensors
Use both files together in ComfyUI Wan 2.2 I2V workflows. The trigger word is:
ha379
Training Config
Config file:
train_lora_wan22_i2v_14b_ha379.yaml
Important settings:
- Model arch:
wan22_14b_i2v - Base model:
ai-toolkit/Wan2.2-I2V-A14B-Diffusers-bf16 - LoRA rank/alpha:
32/32 steps: 10000save_every: 500quantize: falselow_vram: falsecache_latents_to_disk: falsedisable_sampling: true- Dataset:
dataset/ha379
Notes:
cache_latents_to_diskis disabled because this Wan I2V training path needs the image tensor at train time. Latent caching caused aNoneTypetensor error.- Sampling is disabled because sample generation failed for this setup around sample time, while the training loop and checkpoint saving work normally.
- Text embeddings are cached to disk and the cache folders are ignored by git.
- The final step 5000 output from AI Toolkit was renamed with an explicit
step5000suffix before upload. - Training was resumed from step 5000 and stopped after the step 9500 checkpoint. Because
max_step_saves_to_keepis 4, only checkpoints 8000, 8500, 9000, and 9500 from the resumed run were kept.
Resume State
Optimizer states:
resume_state/optimizer_step5000.pt
resume_state/optimizer_step9500.pt
To continue training, copy or link the desired LoRA files and matching optimizer state into the AI Toolkit output folder for the job, then run AI Toolkit with the config above. The config is set to train to step 10000. For the latest state, resume from the step 9500 LoRA pair and optimizer_step9500.pt.
Example local paths from the original run:
/root/ai-toolkit/output/ha379_wan22_i2v_14b_lora/
/root/ha379-wan-lora/train_lora_wan22_i2v_14b_ha379.yaml
ComfyUI Placement
Copy the LoRA files into:
ComfyUI/models/loras/
Wan 2.2 I2V also needs the Wan diffusion models, text encoder, and VAE installed in the appropriate ComfyUI model folders.
- Downloads last month
- -
Model tree for nhuquangls/ha379-wan-lora
Base model
ai-toolkit/Wan2.2-I2V-A14B-Diffusers-bf16