Downloads · 30 days
0
wangkanai/wan21-fp16-loras-nsfw
wan21-fp16-loras-nsfw is a text-to-video model from wangkanai. Use it when you need video from a text prompt. It is set up for diffusers. The card lists the license as other.
This repository is structured to store LoRA (Low-Rank Adaptation) models for the WAN (World Animation Network) 2.1 video generation system. These LoRAs are designed to provide specialized enhancements for camera contr…
Downloads · 30 days
0
Access
Public
Updated Oct 28, 2025
Repo size
—
Likes
7
Public
Click a slice to open those files.
.md13.8 KB · 90%
From the Hugging Face model README
This repository is structured to store LoRA (Low-Rank Adaptation) models for the WAN (World Animation Network) 2.1 video generation system. These LoRAs are designed to provide specialized enhancements for camera control, lighting, motion dynamics, and quality improvements for NSFW content generation.
WAN 2.1 LoRAs are adapter models that modify the behavior of the base WAN 2.1 video generation model without requiring full model retraining. These lightweight adapters enable:
LoRA models offer memory-efficient fine-tuning by adapting only low-rank weight matrices, typically requiring 50-500 MB per adapter compared to multi-gigabyte full model fine-tunes.
Current Status: Repository structure initialized, awaiting model downloads.
wan21-fp16-loras-nsfw/
├── loras/
│ └── wan/ # WAN-specific LoRA models
│ ├── [camera-control] # Camera movement and angle LoRAs
│ ├── [lighting] # Lighting and atmosphere LoRAs
│ ├── [motion] # Motion enhancement LoRAs
│ └── [quality] # Quality improvement LoRAs
└── README.md # This file (14 KB)
Expected Model Files:
.safetensors (preferred for security and efficiency)Total Repository Size: 18 KB (structure only, no models downloaded yet)
from diffusers import DiffusionPipeline
import torch
# Load base WAN 2.1 pipeline
pipe = DiffusionPipeline.from_pretrained(
"wangkanai/WAN2.1",
torch_dtype=torch.float16,
variant="fp16"
)
pipe.to("cuda")
# Load LoRA adapter
lora_path = r"E:\huggingface\wan21-fp16-loras-nsfw\loras\wan\camera-control.safetensors"
pipe.load_lora_weights(lora_path)
# Generate video with LoRA enhancements
prompt = "cinematic pan shot of a mountain landscape at sunset"
video = pipe(
prompt=prompt,
num_frames=64,
height=512,
width=512,
num_inference_steps=50,
guidance_scale=7.5
).frames
# Save video
from diffusers.utils import export_to_video
export_to_video(video, "output.mp4", fps=8)
# Load multiple LoRAs with different weights
lora_configs = [
(r"E:\huggingface\wan21-fp16-loras-nsfw\loras\wan\camera-control.safetensors", 0.8),
(r"E:\huggingface\wan21-fp16-loras-nsfw\loras\wan\lighting-enhancement.safetensors", 0.6),
(r"E:\huggingface\wan21-fp16-loras-nsfw\loras\wan\quality-boost.safetensors", 0.7),
]
for lora_path, weight in lora_configs:
pipe.load_lora_weights(lora_path, adapter_name=lora_path.split("\\")[-1])
pipe.set_adapters([lora_path.split("\\")[-1]], adapter_weights=[weight])
# Generate with combined LoRA effects
video = pipe(prompt="your prompt here", num_frames=64).frames
# Enable/disable LoRAs dynamically
pipe.enable_lora() # Enable LoRA adapters
video_with_lora = pipe(prompt="enhanced prompt").frames
pipe.disable_lora() # Disable LoRA adapters
video_without_lora = pipe(prompt="same prompt").frames
.safetensors)# Enable CPU offloading for lower VRAM usage
pipe.enable_model_cpu_offload()
# Enable attention slicing for memory efficiency
pipe.enable_attention_slicing()
# Enable VAE tiling for large videos
pipe.enable_vae_tiling()
# Sequential CPU offload for maximum memory savings
pipe.enable_sequential_cpu_offload()
# Use torch.compile for faster inference (PyTorch 2.0+)
pipe.unet = torch.compile(pipe.unet, mode="reduce-overhead", fullgraph=True)
# Reduce inference steps (quality vs speed trade-off)
video = pipe(prompt="...", num_inference_steps=30) # Default: 50
# Use lower resolution for faster generation
video = pipe(prompt="...", height=384, width=384) # Default: 512x512
# Batch multiple generations
videos = pipe(prompt=["prompt1", "prompt2"], num_frames=64).frames
# Higher inference steps for better quality
video = pipe(prompt="...", num_inference_steps=75)
# Fine-tune guidance scale (7.0-10.0 typical range)
video = pipe(prompt="...", guidance_scale=9.0) # Default: 7.5
# Generate longer videos with temporal consistency
video = pipe(prompt="...", num_frames=128) # Default: 64
# Use higher resolution for better detail
video = pipe(prompt="...", height=768, width=768)
# Adjust LoRA strength for subtle or dramatic effects
pipe.set_adapters(["camera-control"], adapter_weights=[0.5]) # Subtle
pipe.set_adapters(["camera-control"], adapter_weights=[1.0]) # Full strength
pipe.set_adapters(["camera-control"], adapter_weights=[1.5]) # Exaggerated
# Combine multiple LoRAs with different weights
pipe.set_adapters(
["camera-control", "lighting", "quality"],
adapter_weights=[0.8, 0.6, 0.9]
)
This repository contains LoRA adapters for the WAN 2.1 model. Usage is subject to:
Important: Always review and comply with:
If you use these LoRA models in your research or projects, please cite:
@misc{wan21-loras-nsfw,
title={WAN 2.1 FP16 LoRA Adapters for Video Generation},
author={Community Contributors},
year={2024},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/models}},
note={LoRA adapters for WAN 2.1 video generation model}
}
@misc{wan21-base,
title={WAN 2.1: World Animation Network for Video Generation},
author={Wangkanai and Contributors},
year={2024},
publisher={Hugging Face},
howpublished={\url{https://huggingface.co/wangkanai/WAN2.1}}
}
# Core dependencies
pip install torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu121
# Diffusers with video support
pip install diffusers[torch] transformers accelerate safetensors
# Additional utilities
pip install opencv-python imageio imageio-ffmpeg xformers
import torch
import diffusers
print(f"PyTorch: {torch.__version__}")
print(f"CUDA Available: {torch.cuda.is_available()}")
print(f"CUDA Version: {torch.version.cuda}")
print(f"Diffusers: {diffusers.__version__}")
Out of Memory Errors:
pipe.enable_model_cpu_offload()height=384, width=384, num_frames=32pipe.enable_attention_slicing()pipe.enable_sequential_cpu_offload()Slow Generation:
num_inference_steps=30torch.cuda.is_available()pip install xformersLoRA Not Loading:
r"path")pip install safetensorspipe.load_lora_weights(path, adapter_name="my_lora")Quality Issues:
num_inference_steps=75guidance_scale=8.0-9.0Video Artifacts or Flickering:
num_frames=128For issues, questions, or contributions:
Note: This repository is currently empty and serves as a prepared structure for downloading and organizing WAN 2.1 LoRA models. Download models from Hugging Face Hub or other sources and place them in the appropriate subdirectories under loras/wan/.