Spaces:
Runtime error
Runtime error
RamAnanth1
commited on
Commit
β’
17e381c
1
Parent(s):
664012c
Update app.py
Browse files
app.py
CHANGED
@@ -15,13 +15,27 @@ from lvdm.utils.common_utils import str2bool
|
|
15 |
from lvdm.utils.dist_utils import setup_dist, gather_data
|
16 |
from lvdm.utils.saving_utils import npz_to_video_grid, npz_to_imgsheet_5d
|
17 |
from utils import load_model, get_conditions, make_model_input_shape, torch_to_np
|
18 |
-
from huggingface_hub import
|
19 |
|
20 |
config_path = "model_config.yaml"
|
21 |
config = OmegaConf.load(config_path)
|
22 |
|
23 |
-
|
24 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
25 |
# # get model & sampler
|
26 |
model, _, _ = load_model(config, ckpt_path,
|
27 |
inject_lora=False,
|
|
|
15 |
from lvdm.utils.dist_utils import setup_dist, gather_data
|
16 |
from lvdm.utils.saving_utils import npz_to_video_grid, npz_to_imgsheet_5d
|
17 |
from utils import load_model, get_conditions, make_model_input_shape, torch_to_np
|
18 |
+
from huggingface_hub import hf_hub_download
|
19 |
|
20 |
config_path = "model_config.yaml"
|
21 |
config = OmegaConf.load(config_path)
|
22 |
|
23 |
+
|
24 |
+
# Download model
|
25 |
+
REPO_ID = 'VideoCrafter/t2v-version-1-1'
|
26 |
+
filename_list = ['models/base_t2v/model.ckpt',
|
27 |
+
'models/videolora/lora_001_Loving_Vincent_style.ckpt',
|
28 |
+
'models/videolora/lora_002_frozenmovie_style.ckpt',
|
29 |
+
'models/videolora/lora_003_MakotoShinkaiYourName_style.ckpt',
|
30 |
+
'models/videolora/lora_004_coco_style.ckpt']
|
31 |
+
for filename in filename_list:
|
32 |
+
if not os.path.exists(filename):
|
33 |
+
hf_hub_download(repo_id=REPO_ID, filename=filename, local_dir='./', local_dir_use_symlinks=False)
|
34 |
+
|
35 |
+
|
36 |
+
|
37 |
+
ckpt_path = 'models/base_t2v/model.ckpt'
|
38 |
+
|
39 |
# # get model & sampler
|
40 |
model, _, _ = load_model(config, ckpt_path,
|
41 |
inject_lora=False,
|