File size: 1,403 Bytes
ec1b13f | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | """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()
|