Fabrice-TIERCELIN
commited on
Download again
Browse files
app.py
CHANGED
@@ -13,23 +13,23 @@ from hyvideo.config import parse_args
|
|
13 |
from hyvideo.inference import HunyuanVideoSampler
|
14 |
from hyvideo.constants import NEGATIVE_PROMPT
|
15 |
|
16 |
-
|
17 |
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
#hf_hub_download(repo_id="tencent/HunyuanVideo", filename="README.md", local_dir="ckpts")
|
22 |
-
|
23 |
-
|
24 |
-
|
25 |
-
|
26 |
-
|
27 |
-
|
28 |
|
29 |
def initialize_model(model_path):
|
30 |
print('initialize_model: ' + model_path)
|
31 |
-
|
32 |
-
|
33 |
|
34 |
args = parse_args()
|
35 |
models_root_path = Path(model_path)
|
@@ -167,5 +167,5 @@ def create_demo(model_path):
|
|
167 |
|
168 |
if __name__ == "__main__":
|
169 |
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
170 |
-
demo = create_demo("
|
171 |
demo.queue(10).launch()
|
|
|
13 |
from hyvideo.inference import HunyuanVideoSampler
|
14 |
from hyvideo.constants import NEGATIVE_PROMPT
|
15 |
|
16 |
+
from huggingface_hub import hf_hub_download
|
17 |
|
18 |
+
if torch.cuda.device_count() > 0:
|
19 |
+
hf_hub_download(repo_id="tencent/HunyuanVideo", filename="LICENSE", local_dir="ckpts")
|
20 |
+
hf_hub_download(repo_id="tencent/HunyuanVideo", filename="Notice", local_dir="ckpts")
|
21 |
#hf_hub_download(repo_id="tencent/HunyuanVideo", filename="README.md", local_dir="ckpts")
|
22 |
+
hf_hub_download(repo_id="tencent/HunyuanVideo", filename="config.json", local_dir="ckpts")
|
23 |
+
hf_hub_download(repo_id="tencent/HunyuanVideo", filename="hunyuan-video-t2v-720p/transformers/mp_rank_00_model_states.pt", local_dir="ckpts/hunyuan-video-t2v-720p/transformers")
|
24 |
+
hf_hub_download(repo_id="tencent/HunyuanVideo", filename="hunyuan-video-t2v-720p/transformers/mp_rank_00_model_states_fp8.pt", local_dir="ckpts/hunyuan-video-t2v-720p/transformers")
|
25 |
+
hf_hub_download(repo_id="tencent/HunyuanVideo", filename="hunyuan-video-t2v-720p/transformers/mp_rank_00_model_states_fp8_map.pt", local_dir="ckpts/hunyuan-video-t2v-720p/transformers")
|
26 |
+
hf_hub_download(repo_id="tencent/HunyuanVideo", filename="hunyuan-video-t2v-720p/vae/config.json", local_dir="ckpts/hunyuan-video-t2v-720p/vae")
|
27 |
+
hf_hub_download(repo_id="tencent/HunyuanVideo", filename="hunyuan-video-t2v-720p/vae/pytorch_model.pt", local_dir="ckpts/hunyuan-video-t2v-720p/vae")
|
28 |
|
29 |
def initialize_model(model_path):
|
30 |
print('initialize_model: ' + model_path)
|
31 |
+
if torch.cuda.device_count() == 0:
|
32 |
+
return None
|
33 |
|
34 |
args = parse_args()
|
35 |
models_root_path = Path(model_path)
|
|
|
167 |
|
168 |
if __name__ == "__main__":
|
169 |
os.environ["GRADIO_ANALYTICS_ENABLED"] = "False"
|
170 |
+
demo = create_demo("ckpts")
|
171 |
demo.queue(10).launch()
|