shauray commited on
Commit
cbdbc3f
·
verified ·
1 Parent(s): d112c4a

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +51 -1
README.md CHANGED
@@ -38,4 +38,54 @@ widget:
38
  url: videos/1742525503397__000001250_1.webp
39
 
40
  ---
41
- <Gallery />
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
38
  url: videos/1742525503397__000001250_1.webp
39
 
40
  ---
41
+ # PostMalone Lora for WanVideo2.1
42
+ <Gallery />
43
+
44
+ - First 2 videos are from [750 steps trained]
45
+ - Middle 2 videos are from [1000 steps trained] which is available for download
46
+ - Last 2 videos are from [1250 steps trained]
47
+
48
+ ## Trigger words
49
+
50
+ You should use `malone` to trigger the video generation.
51
+
52
+ ## Using with Diffusers
53
+ ```py
54
+ pip install git+https://github.com/huggingface/diffusers.git
55
+ ```
56
+
57
+ ```py
58
+ import torch
59
+ from diffusers.utils import export_to_video
60
+ from diffusers import AutoencoderKLWan, WanPipeline
61
+ from diffusers.schedulers.scheduling_unipc_multistep import UniPCMultistepScheduler
62
+
63
+ # Available models: Wan-AI/Wan2.1-T2V-14B-Diffusers, Wan-AI/Wan2.1-T2V-1.3B-Diffusers
64
+ model_id = "Wan-AI/Wan2.1-T2V-14B-Diffusers"
65
+ vae = AutoencoderKLWan.from_pretrained(model_id, subfolder="vae", torch_dtype=torch.float32)
66
+ pipe = WanPipeline.from_pretrained(model_id, vae=vae, torch_dtype=torch.bfloat16)
67
+ flow_shift = 5.0 # 5.0 for 720P, 3.0 for 480P
68
+ pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=flow_shift)
69
+ pipe.to("cuda")
70
+
71
+ pipe.load_lora_weights("shauray/PostMalone_WanLora")
72
+
73
+ pipe.enable_model_cpu_offload() #for low-vram environments
74
+
75
+ prompt = "malone a man walking through texas"
76
+
77
+ output = pipe(
78
+ prompt=prompt,
79
+ height=480,
80
+ width=720,
81
+ num_frames=81,
82
+ guidance_scale=5.0,
83
+ ).frames[0]
84
+ export_to_video(output, "output.mp4", fps=16)
85
+ ```
86
+
87
+ ## Download model
88
+
89
+ Weights for this model are available in Safetensors format.
90
+
91
+ [Download](/shauray/PostMalone_WanLora/tree/main) them in the Files & versions tab.