"""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()