roll-ai commited on
Commit
0256ee4
Β·
verified Β·
1 Parent(s): fcc08fb

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +25 -25
app.py CHANGED
@@ -12,31 +12,31 @@ from huggingface_hub import hf_hub_download
12
  # 1. Define Hugging Face dataset + weights
13
  # =========================================
14
 
15
- # HF_DATASET_REPO = "roll-ai/FloVD-weights" # your dataset repo on HF
16
-
17
- # WEIGHT_FILES = {
18
- # "ckpt/FVSM/FloVD_FVSM_Controlnet.pt": "FVSM/FloVD_FVSM_Controlnet.pt",
19
- # "ckpt/OMSM/selected_blocks.safetensors": "OMSM/selected_blocks.safetensors",
20
- # "ckpt/OMSM/pytorch_lora_weights.safetensors": "OMSM/pytorch_lora_weights.safetensors",
21
- # "ckpt/others/depth_anything_v2_metric_hypersim_vitb.pth": "others/depth_anything_v2_metric_hypersim_vitb.pth"
22
- # }
23
-
24
- # def download_weights():
25
- # print("πŸ”„ Downloading model weights via huggingface_hub...")
26
- # for hf_path, local_rel_path in WEIGHT_FILES.items():
27
- # local_path = Path("ckpt") / local_rel_path
28
- # if not local_path.exists():
29
- # print(f"πŸ“₯ Downloading {hf_path}")
30
- # hf_hub_download(
31
- # repo_id=HF_DATASET_REPO,
32
- # repo_type="dataset",
33
- # filename=hf_path,
34
- # local_dir="./"
35
- # )
36
- # else:
37
- # print(f"βœ… Already exists: {local_path}")
38
-
39
- # download_weights()
40
 
41
  # =========================================
42
  # 2. Import the FloVD generation pipeline
 
12
  # 1. Define Hugging Face dataset + weights
13
  # =========================================
14
 
15
+ HF_DATASET_REPO = "roll-ai/FloVD-weights" # your dataset repo on HF
16
+
17
+ WEIGHT_FILES = {
18
+ "ckpt/FVSM/FloVD_FVSM_Controlnet.pt": "FVSM/FloVD_FVSM_Controlnet.pt",
19
+ "ckpt/OMSM/selected_blocks.safetensors": "OMSM/selected_blocks.safetensors",
20
+ "ckpt/OMSM/pytorch_lora_weights.safetensors": "OMSM/pytorch_lora_weights.safetensors",
21
+ "ckpt/others/depth_anything_v2_metric_hypersim_vitb.pth": "others/depth_anything_v2_metric_hypersim_vitb.pth"
22
+ }
23
+
24
+ def download_weights():
25
+ print("πŸ”„ Downloading model weights via huggingface_hub...")
26
+ for hf_path, local_rel_path in WEIGHT_FILES.items():
27
+ local_path = Path("ckpt") / local_rel_path
28
+ if not local_path.exists():
29
+ print(f"πŸ“₯ Downloading {hf_path}")
30
+ hf_hub_download(
31
+ repo_id=HF_DATASET_REPO,
32
+ repo_type="dataset",
33
+ filename=hf_path,
34
+ local_dir="./"
35
+ )
36
+ else:
37
+ print(f"βœ… Already exists: {local_path}")
38
+
39
+ download_weights()
40
 
41
  # =========================================
42
  # 2. Import the FloVD generation pipeline