Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
@@ -8,7 +8,13 @@ MODEL_REPO = "tencent/HunyuanVideo-Avatar"
|
|
8 |
BASE_DIR = os.getcwd() # current working directory absolute path
|
9 |
WEIGHTS_DIR = os.path.join(BASE_DIR, "weights")
|
10 |
|
11 |
-
CHECKPOINT_FILE = os.path.join(
|
|
|
|
|
|
|
|
|
|
|
|
|
12 |
|
13 |
def download_model():
|
14 |
print("⬇️ Model not found. Downloading with snapshot_download into weights directory...")
|
@@ -17,7 +23,7 @@ def download_model():
|
|
17 |
snapshot_download(
|
18 |
repo_id=MODEL_REPO,
|
19 |
local_dir=WEIGHTS_DIR,
|
20 |
-
local_dir_use_symlinks=False
|
21 |
)
|
22 |
|
23 |
if not os.path.isfile(CHECKPOINT_FILE):
|
@@ -60,7 +66,7 @@ def main():
|
|
60 |
download_model()
|
61 |
|
62 |
flask_proc = run_flask_audio()
|
63 |
-
time.sleep(5) # Wait a
|
64 |
gradio_proc = run_gradio_ui()
|
65 |
|
66 |
if __name__ == "__main__":
|
|
|
8 |
BASE_DIR = os.getcwd() # current working directory absolute path
|
9 |
WEIGHTS_DIR = os.path.join(BASE_DIR, "weights")
|
10 |
|
11 |
+
CHECKPOINT_FILE = os.path.join(
|
12 |
+
WEIGHTS_DIR,
|
13 |
+
"ckpts",
|
14 |
+
"hunyuan-video-t2v-720p",
|
15 |
+
"transformers",
|
16 |
+
"mp_rank_00_model_states.pt"
|
17 |
+
)
|
18 |
|
19 |
def download_model():
|
20 |
print("⬇️ Model not found. Downloading with snapshot_download into weights directory...")
|
|
|
23 |
snapshot_download(
|
24 |
repo_id=MODEL_REPO,
|
25 |
local_dir=WEIGHTS_DIR,
|
26 |
+
local_dir_use_symlinks=False
|
27 |
)
|
28 |
|
29 |
if not os.path.isfile(CHECKPOINT_FILE):
|
|
|
66 |
download_model()
|
67 |
|
68 |
flask_proc = run_flask_audio()
|
69 |
+
time.sleep(5) # Wait a bit for flask_audio.py to start
|
70 |
gradio_proc = run_gradio_ui()
|
71 |
|
72 |
if __name__ == "__main__":
|