Spaces:
Runtime error
Runtime error
wangmengchao
commited on
Commit
·
189ac63
1
Parent(s):
13128c2
fix
Browse files
infer.py
CHANGED
|
@@ -11,6 +11,8 @@ from model import FantasyTalkingAudioConditionModel
|
|
| 11 |
from utils import save_video, get_audio_features, resize_image_by_longest_edge
|
| 12 |
from pathlib import Path
|
| 13 |
from datetime import datetime
|
|
|
|
|
|
|
| 14 |
|
| 15 |
def parse_args():
|
| 16 |
parser = argparse.ArgumentParser(description="Simple example of a training script.")
|
|
@@ -122,14 +124,14 @@ def parse_args():
|
|
| 122 |
|
| 123 |
def load_models(args):
|
| 124 |
# Load Wan I2V models
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 125 |
model_manager = ModelManager(device="cpu")
|
| 126 |
-
ckpt_path = hf_hub_download(configs[name].repo_id, configs[name].repo_flow.replace("sft", "safetensors"))
|
| 127 |
|
| 128 |
-
if hf_download:
|
| 129 |
-
# lora_ckpt_path = hf_hub_download("bytedance-research/UNO", "dit_lora.safetensors")
|
| 130 |
-
try:
|
| 131 |
-
lora_ckpt_path = hf_hub_download("bytedance-research/UNO", "dit_lora.safetensors")
|
| 132 |
-
|
| 133 |
model_manager.load_models(
|
| 134 |
[
|
| 135 |
[
|
|
|
|
| 11 |
from utils import save_video, get_audio_features, resize_image_by_longest_edge
|
| 12 |
from pathlib import Path
|
| 13 |
from datetime import datetime
|
| 14 |
+
from modelscope import snapshot_download
|
| 15 |
+
|
| 16 |
|
| 17 |
def parse_args():
|
| 18 |
parser = argparse.ArgumentParser(description="Simple example of a training script.")
|
|
|
|
| 124 |
|
| 125 |
def load_models(args):
|
| 126 |
# Load Wan I2V models
|
| 127 |
+
|
| 128 |
+
snapshot_download("Wan-AI/Wan2.1-I2V-14B-720P", local_dir="models/Wan2.1-I2V-14B-720P")
|
| 129 |
+
snapshot_download("facebook/wav2vec2-base-960h", local_dir="models/wav2vec2-base-960h")
|
| 130 |
+
snapshot_download("acvlab/FantasyTalking", local_dir="models")
|
| 131 |
+
|
| 132 |
+
|
| 133 |
model_manager = ModelManager(device="cpu")
|
|
|
|
| 134 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 135 |
model_manager.load_models(
|
| 136 |
[
|
| 137 |
[
|