Nodiw52992 commited on
Commit
a91a3df
·
verified ·
1 Parent(s): a30b396

Create download_flux.py

Browse files
Files changed (1) hide show
  1. download_flux.py +15 -0
download_flux.py ADDED
@@ -0,0 +1,15 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ #!/usr/bin/env python3
2
+ import os
3
+ from huggingface_hub import hf_hub_download
4
+
5
+ token = open('/run/secrets/HF_TOKEN').read().strip()
6
+ for subdir, filename in [['models/unet', 'flux1-schnell.safetensors'],
7
+ ['models/vae', 'ae.safetensors']]:
8
+ os.makedirs(subdir, exist_ok=True)
9
+ hf_hub_download(
10
+ repo_id="black-forest-labs/FLUX.1-schnell",
11
+ filename=filename,
12
+ token=token,
13
+ local_dir=subdir,
14
+ force_download=True
15
+ )