Spaces:
Running
on
Zero
Running
on
Zero
Update wan2_fast.py
Browse files- wan2_fast.py +10 -10
wan2_fast.py
CHANGED
@@ -16,7 +16,7 @@ import os
|
|
16 |
|
17 |
## This is working well ##
|
18 |
|
19 |
-
MODEL_ID = "FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers"
|
20 |
|
21 |
## below model has a blury output but it get loaded
|
22 |
##MODEL_ID ="Runware/Wan2.2-TI2V-5B"
|
@@ -26,13 +26,13 @@ MODEL_ID = "FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers"
|
|
26 |
#MODEL_ID ="Wan-AI/Wan2.2-T2V-A14B-Diffusers"
|
27 |
|
28 |
|
29 |
-
|
30 |
-
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
|
|
|
36 |
|
37 |
|
38 |
|
@@ -47,16 +47,16 @@ pipe = WanPipeline.from_pretrained(
|
|
47 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
|
48 |
pipe.to("cuda")
|
49 |
|
50 |
-
|
51 |
|
52 |
# hold lora for now
|
53 |
|
54 |
-
LORA_REPO_ID = "AlekseyCalvin/Phenakistiscopes_Wan22_5B_T2V_LoRA"
|
55 |
-
LORA_FILENAME = "PhenakistiscopesV4_000002300.safetensors"
|
56 |
-
causvid_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
|
57 |
-
pipe.load_lora_weights(causvid_path, adapter_name="causvid_lora")
|
58 |
-
pipe.set_adapters(["causvid_lora"], adapter_weights=[0.95])
|
59 |
-
pipe.fuse_lora()
|
60 |
|
61 |
|
62 |
# LORA_REPO_ID = "Kijai/WanVideo_comfy"
|
|
|
16 |
|
17 |
## This is working well ##
|
18 |
|
19 |
+
#MODEL_ID = "FastVideo/FastWan2.2-TI2V-5B-FullAttn-Diffusers"
|
20 |
|
21 |
## below model has a blury output but it get loaded
|
22 |
##MODEL_ID ="Runware/Wan2.2-TI2V-5B"
|
|
|
26 |
#MODEL_ID ="Wan-AI/Wan2.2-T2V-A14B-Diffusers"
|
27 |
|
28 |
|
29 |
+
MODEL_ID ="linoyts/Wan2.2-T2V-A14B-Diffusers-BF16"
|
|
|
30 |
|
31 |
|
32 |
|
33 |
|
34 |
|
35 |
+
device = "cuda" if torch.cuda.is_available() else "cpu"
|
36 |
|
37 |
|
38 |
|
|
|
47 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
|
48 |
pipe.to("cuda")
|
49 |
|
50 |
+
torch.cuda.empty_cache()
|
51 |
|
52 |
# hold lora for now
|
53 |
|
54 |
+
# LORA_REPO_ID = "AlekseyCalvin/Phenakistiscopes_Wan22_5B_T2V_LoRA"
|
55 |
+
# LORA_FILENAME = "PhenakistiscopesV4_000002300.safetensors"
|
56 |
+
# causvid_path = hf_hub_download(repo_id=LORA_REPO_ID, filename=LORA_FILENAME)
|
57 |
+
# pipe.load_lora_weights(causvid_path, adapter_name="causvid_lora")
|
58 |
+
# pipe.set_adapters(["causvid_lora"], adapter_weights=[0.95])
|
59 |
+
# pipe.fuse_lora()
|
60 |
|
61 |
|
62 |
# LORA_REPO_ID = "Kijai/WanVideo_comfy"
|