from __future__ import annotations import os os.environ.setdefault("HORIZONSTREAM_CHECKPOINT", os.path.join("checkpoints", "HorizonStream.pt")) def _ensure_default_checkpoint() -> None: checkpoint_path = os.getenv("HORIZONSTREAM_CHECKPOINT", os.path.join("checkpoints", "HorizonStream.pt")) if os.path.exists(checkpoint_path): return from huggingface_hub import hf_hub_download hf_hub_download( repo_id=os.getenv("HORIZONSTREAM_HF_REPO", "NicolasCC/HorizonStream"), filename=os.getenv("HORIZONSTREAM_HF_FILE", "HorizonStream.pt"), local_dir=os.path.dirname(checkpoint_path) or "checkpoints", ) from demo_gradio_viser import main # noqa: E402 if __name__ == "__main__": _ensure_default_checkpoint() main()