File size: 992 Bytes
32c5da4
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
33
34
35
36
37
38
#!/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)