Download scripts/download_model.py from devildasdf/NEXORA: direct link, hf CLI and curl.
- Browser
- Download file 943 Bytes
-
https://huggingface.co/devildasdf/NEXORA/resolve/main/scripts/download_model.py
- Command line
-
hf download hf://devildasdf/NEXORA/scripts/download_model.py
-
curl -L -o download_model.py https://huggingface.co/devildasdf/NEXORA/resolve/main/scripts/download_model.py
943 Bytes
| """Download an upstream model at a recorded immutable revision via the hf CLI.""" | |
| from pathlib import Path | |
| import argparse | |
| import json | |
| import subprocess | |
| def main(): | |
| p = argparse.ArgumentParser() | |
| p.add_argument("--repo", default="Qwen/Qwen3.5-0.8B") | |
| args = p.parse_args() | |
| sources = json.loads(Path("reports/sources.json").read_text())["models"] | |
| found = next((x for x in sources if x["repo"] == args.repo), None) | |
| if found is None: | |
| raise ValueError("Model must be recorded in reports/sources.json first") | |
| target = Path(".cache") / args.repo.split("/")[-1] | |
| subprocess.run(["hf", "download", args.repo, "--revision", found["revision"], "--local-dir", str(target), | |
| "--include", "*.json", "--include", "*.safetensors", "--include", "*.txt", "--include", "*.jinja", | |
| "--include", "LICENSE", "--include", "README.md"], check=True) | |
| if __name__ == "__main__": | |
| main() | |