ideogram-4-gguf-q4_k / download_deps.py
deep1401's picture
Upload download_deps.py with huggingface_hub
ec1b13f verified
"""Fetch everything else Ideogram 4 needs to run this quantized DiT.
This GGUF is the *quantized DiT only*. You also need the text encoder, VAE,
configs, and the custom inference package. Run this once.
Requires your own access to the GATED base repo `ideogram-ai/ideogram-4-fp8`:
1. Accept its license at https://huggingface.co/ideogram-ai/ideogram-4-fp8
2. `huggingface-cli login` (or `hf auth login`) with a token that has access.
"""
import subprocess
import sys
BASE = "ideogram-ai/ideogram-4-fp8"
def main():
# 1) the official Ideogram 4 inference package (provides the pipeline/architecture)
subprocess.run([sys.executable, "-m", "pip", "install", "-q",
"git+https://github.com/ideogram-oss/ideogram4.git"], check=True)
subprocess.run([sys.executable, "-m", "pip", "install", "-q", "gguf"], check=True)
# 2) base components (text encoder, VAE, configs, tokenizer). Gated download.
from huggingface_hub import snapshot_download
path = snapshot_download(repo_id=BASE)
print("Base Ideogram 4 components downloaded to:\n ", path)
print("\nNext: run `python usage.py \"your prompt\"` (keep ideogram4-q4_k.gguf in this dir).")
print("Note: the base repo also contains the FP8 DiT shards, which this loader")
print("replaces with the Q4_K weights — you can prune those shards to save disk.")
if __name__ == "__main__":
main()