from huggingface_hub import hf_hub_download, upload_file, login import os # HF Spaces have HF_TOKEN set automatically token = os.environ.get("HF_TOKEN", "") print("Downloading Z-Image-Turbo Q2_K from unsloth (fast - we're on HF infra)...") path = hf_hub_download( "unsloth/Z-Image-Turbo-GGUF", "z-image-turbo-Q2_K.gguf", token=token, ) print(f"Downloaded: {os.path.getsize(path)} bytes") print("Uploading to wannabecomputerscientist/zimage-mirror...") upload_file( path_or_fileobj=path, path_in_repo="z-image-turbo-Q2_K.gguf", repo_id="wannabecomputerscientist/zimage-mirror", repo_type="model", token=token, ) print("Done!")