Wanxiao 2.1-1.3B-LoRA-Length-Extension-v1

Model Introduction

This LoRA model is trained based on the Wanxiao 2.1-1.3B model and the DiffSynth-Studio framework. It extends the video length capability, enabling generation of videos twice as long when using this LoRA model.

Recommended parameter setting: num_frames=161

Model Performance

Prompt: Documentary photography style, a lively puppy wearing black sunglasses running quickly across a lush green grass field. The puppy has golden-brown fur and black sunglasses, with upright ears and an expression full of focus and joy. Sunlight shines on its body, making its coat appear exceptionally soft and shiny. The background features an open grassland dotted with occasional wildflowers, with a faint view of blue sky and scattered white clouds in the distance. Strong perspective conveys the dynamic motion of the running puppy and the vitality of the surrounding grassland. Medium shot with a side-moving viewpoint.

Usage Instructions

This model is built upon the DiffSynth-Studio framework. Please install it first:

pip install diffsynth
import torch
from diffsynth import ModelManager, WanVideoPipeline, save_video
from modelscope import snapshot_download


snapshot_download(
    model_id="DiffSynth-Studio/Wan2.1-1.3b-lora-exvideo-v1",
    local_dir="models/DiffSynth-Studio/Wan2.1-1.3b-lora-exvideo-v1",
    allow_file_pattern="*.safetensors"
)
model_manager = ModelManager(device="cpu")
model_manager.load_models(
    [
        "models/Wan-AI/Wan2.1-T2V-1.3B/diffusion_pytorch_model.safetensors",
        "models/Wan-AI/Wan2.1-T2V-1.3B/models_t5_umt5-xxl-enc-bf16.pth",
        "models/Wan-AI/Wan2.1-T2V-1.3B/Wan2.1_VAE.pth",
    ],
    torch_dtype=torch.bfloat16,
)
model_manager.load_lora("models/DiffSynth-Studio/Wan2.1-1.3b-lora-exvideo-v1/model.safetensors", lora_alpha=1)
pipe = WanVideoPipeline.from_model_manager(model_manager, torch_dtype=torch.bfloat16, device="cuda")
pipe.enable_vram_management(num_persistent_param_in_dit=None)

video = pipe(
    prompt="Documentary photography style scene, a lively little dog running quickly on a green grassy field. The dog has brownish-yellow fur, upright ears, and an expression that is focused yet joyful. Sunlight shines on its body, making the fur appear exceptionally soft and shiny. The background features an open grassland dotted with occasional wildflowers, with a faint view of blue sky and a few white clouds in the distance. Strong sense of perspective captures the dynamic motion of the running dog and the vitality of the surrounding grass. Mid-shot side-moving viewpoint.",
    negative_prompt="Vivid colors, overexposed, static, blurry details, subtitles, style, artwork, painting, frame, still, overall grayish tone, worst quality, low quality, JPEG compression artifacts, ugly, defective, extra fingers, poorly drawn hands, poorly drawn face, malformed limbs, fused fingers, motionless scene, cluttered background, three legs, crowded background, walking backwards",
    num_inference_steps=50, num_frames=161,
    seed=0, tiled=True
)
save_video(video, "video1.mp4", fps=15, quality=5)
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. ๐Ÿ™‹ Ask for provider support