Spaces:
Runtime error
Runtime error
wangmengchao
commited on
Commit
·
3660685
1
Parent(s):
b5445b9
fix
Browse files
app.py
CHANGED
|
@@ -82,21 +82,21 @@ def create_args(
|
|
| 82 |
parser.add_argument(
|
| 83 |
"--wan_model_dir",
|
| 84 |
type=str,
|
| 85 |
-
default="
|
| 86 |
required=False,
|
| 87 |
help="The dir of the Wan I2V 14B model.",
|
| 88 |
)
|
| 89 |
parser.add_argument(
|
| 90 |
"--fantasytalking_model_path",
|
| 91 |
type=str,
|
| 92 |
-
default="
|
| 93 |
required=False,
|
| 94 |
help="The .ckpt path of fantasytalking model.",
|
| 95 |
)
|
| 96 |
parser.add_argument(
|
| 97 |
"--wav2vec_model_dir",
|
| 98 |
type=str,
|
| 99 |
-
default="
|
| 100 |
required=False,
|
| 101 |
help="The dir of wav2vec model.",
|
| 102 |
)
|
|
@@ -291,8 +291,8 @@ with gr.Blocks(title="FantasyTalking Video Generation") as demo:
|
|
| 291 |
gr.Examples(
|
| 292 |
examples=[
|
| 293 |
[
|
| 294 |
-
"assets/images/woman.png",
|
| 295 |
-
"assets/audios/woman.wav",
|
| 296 |
],
|
| 297 |
],
|
| 298 |
inputs=[image_input, audio_input],
|
|
|
|
| 82 |
parser.add_argument(
|
| 83 |
"--wan_model_dir",
|
| 84 |
type=str,
|
| 85 |
+
default="/data/models/Wan2.1-I2V-14B-720P",
|
| 86 |
required=False,
|
| 87 |
help="The dir of the Wan I2V 14B model.",
|
| 88 |
)
|
| 89 |
parser.add_argument(
|
| 90 |
"--fantasytalking_model_path",
|
| 91 |
type=str,
|
| 92 |
+
default="/data/models/fantasytalking_model.ckpt",
|
| 93 |
required=False,
|
| 94 |
help="The .ckpt path of fantasytalking model.",
|
| 95 |
)
|
| 96 |
parser.add_argument(
|
| 97 |
"--wav2vec_model_dir",
|
| 98 |
type=str,
|
| 99 |
+
default="/data/models/wav2vec2-base-960h",
|
| 100 |
required=False,
|
| 101 |
help="The dir of wav2vec model.",
|
| 102 |
)
|
|
|
|
| 291 |
gr.Examples(
|
| 292 |
examples=[
|
| 293 |
[
|
| 294 |
+
"./assets/images/woman.png",
|
| 295 |
+
"./assets/audios/woman.wav",
|
| 296 |
],
|
| 297 |
],
|
| 298 |
inputs=[image_input, audio_input],
|
infer.py
CHANGED
|
@@ -11,8 +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 |
-
from modelscope import snapshot_download
|
| 15 |
-
|
| 16 |
|
| 17 |
def parse_args():
|
| 18 |
parser = argparse.ArgumentParser(description="Simple example of a training script.")
|
|
@@ -125,9 +125,9 @@ def parse_args():
|
|
| 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")
|
|
|
|
| 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 |
+
from huggingface_hub import snapshot_download
|
| 16 |
|
| 17 |
def parse_args():
|
| 18 |
parser = argparse.ArgumentParser(description="Simple example of a training script.")
|
|
|
|
| 125 |
def load_models(args):
|
| 126 |
# Load Wan I2V models
|
| 127 |
|
| 128 |
+
snapshot_download("Wan-AI/Wan2.1-I2V-14B-720P", local_dir="/data/models/Wan2.1-I2V-14B-720P")
|
| 129 |
+
snapshot_download("facebook/wav2vec2-base-960h", local_dir="/data/models/wav2vec2-base-960h")
|
| 130 |
+
snapshot_download("acvlab/FantasyTalking", local_dir="/data/models")
|
| 131 |
|
| 132 |
|
| 133 |
model_manager = ModelManager(device="cpu")
|