22 lines
977 B
Python
22 lines
977 B
Python
"""Fetch only the two pinned public Q8 assets; never use an implicit HF token."""
|
|
import json
|
|
import os
|
|
import hashlib
|
|
from pathlib import Path
|
|
|
|
os.environ['HF_HUB_DISABLE_IMPLICIT_TOKEN'] = '1'
|
|
from huggingface_hub import hf_hub_download
|
|
|
|
ROOT = Path('/data/experiments/qwen06-q8-native-cpu-20261019')
|
|
REVISION = 'b7ee2e8c7459c3bea99da23e3d178125a7d1713c'
|
|
paths = [hf_hub_download(
|
|
repo_id='Serveurperso/Qwen3-TTS-GGUF', revision=REVISION, filename=name,
|
|
cache_dir=ROOT / 'models', token=False,
|
|
) for name in ('qwen-talker-0.6b-base-Q8_0.gguf', 'qwen-tokenizer-12hz-Q8_0.gguf')]
|
|
expected = ['d54dbaf10591421fa764ed630d764efa717ae40cd959bd48c66d4eb1af226426',
|
|
'1883beeed99348fc35e23dd225e9082f93f6f8c109330a33d935baa8acdbfd94']
|
|
for path, digest in zip(paths, expected):
|
|
with open(path, 'rb') as f:
|
|
assert hashlib.file_digest(f, 'sha256').hexdigest() == digest, 'Model checksum mismatch'
|
|
(ROOT / 'model-paths.json').write_text(json.dumps(paths))
|