Spaces:
Running
on
L40S
Running
on
L40S
Update app.py
Browse files
app.py
CHANGED
@@ -1,5 +1,5 @@
|
|
1 |
import torch
|
2 |
-
from diffusers import AutoencoderKLWan,
|
3 |
from diffusers.utils import export_to_video
|
4 |
import gradio as gr
|
5 |
import tempfile
|
@@ -13,7 +13,7 @@ LORA_REPO_ID = "Kijai/WanVideo_comfy"
|
|
13 |
LORA_FILENAME = "Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors"
|
14 |
|
15 |
vae = AutoencoderKLWan.from_pretrained(MODEL_ID, subfolder="vae", torch_dtype=torch.float32)
|
16 |
-
pipe =
|
17 |
MODEL_ID, vae=vae, torch_dtype=torch.bfloat16
|
18 |
)
|
19 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
|
|
|
1 |
import torch
|
2 |
+
from diffusers import AutoencoderKLWan, WanPipeline, UniPCMultistepScheduler
|
3 |
from diffusers.utils import export_to_video
|
4 |
import gradio as gr
|
5 |
import tempfile
|
|
|
13 |
LORA_FILENAME = "Wan21_CausVid_bidirect2_T2V_1_3B_lora_rank32.safetensors"
|
14 |
|
15 |
vae = AutoencoderKLWan.from_pretrained(MODEL_ID, subfolder="vae", torch_dtype=torch.float32)
|
16 |
+
pipe = WanPipeline.from_pretrained(
|
17 |
MODEL_ID, vae=vae, torch_dtype=torch.bfloat16
|
18 |
)
|
19 |
pipe.scheduler = UniPCMultistepScheduler.from_config(pipe.scheduler.config, flow_shift=8.0)
|