File size: 926 Bytes
73b60c6
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
"""Small helper to help debug HF Space checkpoint/paths issues.

This file is NOT used by the Space entrypoint. It can be executed locally
for sanity checks, and can be copied into the Space if needed.
"""

from __future__ import annotations

import os
from pathlib import Path


def main() -> None:
    print("=== HF Space debug ===")
    print("cwd:", os.getcwd())
    print("CATVTON_REPO_DIR:", os.getenv("CATVTON_REPO_DIR"))
    print("CATVTON_RESUME_PATH:", os.getenv("CATVTON_RESUME_PATH"))
    print("CATVTON_MODEL_DIR:", os.getenv("CATVTON_MODEL_DIR"))

    candidates = [
        Path("./CatVTON"),
        Path("./checkpoints/CatVTON"),
        Path("./models"),
        Path("./model"),
        Path("/app"),
        Path("/app/CatVTON"),
        Path("/app/checkpoints"),
    ]
    for c in candidates:
        print("exists", str(c), c.exists())

    print("=== end ===")


if __name__ == "__main__":
    main()