#!/usr/bin/env python3 """Download tiny-sd model - FAST download, REAL images (not dummy)""" import os import sys from pathlib import Path from huggingface_hub import snapshot_download os.environ['HF_HUB_DISABLE_SYMLINKS'] = '1' cache = Path("d:/VSC Codes/Bild/.cache/hf") print("=" * 60) print(" QUICK MODEL DOWNLOAD: tiny-sd") print("=" * 60) print() print("This is a small model (~600MB) that generates REAL images") print("(Not as good as SD 1.5, but better than white dummy images)") print() try: print("Downloading segmind/tiny-sd...") path = snapshot_download( "segmind/tiny-sd", cache_dir=str(cache), local_dir_use_symlinks=False ) print() print("=" * 60) print("✓ SUCCESS!") print("=" * 60) print(f"Model cached at: {path}") print() print("Backend can now generate REAL images!") print("Just restart the backend to use it.") sys.exit(0) except Exception as e: print(f"✗ Error: {e}") sys.exit(1)