LeoXing1996 commited on
Commit
0647ed2
1 Parent(s): 0231c4c

revise download API

Browse files
Files changed (1) hide show
  1. app-huggingface.py +10 -10
app-huggingface.py CHANGED
@@ -65,7 +65,7 @@ if not LOCAL_DEBUG:
65
  os.makedirs(DreamBooth_LoRA_PATH, exist_ok=True)
66
  os.makedirs(STABLE_DIFFUSION_PATH, exist_ok=True)
67
 
68
- hf_hub_download(model_repo='leoxing/PIA-pruned',
69
  model_name='PIA', output=PIA_PATH)
70
  os.system('bash download_bashscripts/1-RealisticVision.sh')
71
  os.system('bash download_bashscripts/2-RcnzCartoon.sh')
@@ -81,18 +81,18 @@ if not LOCAL_DEBUG:
81
  cache_dir='models/StableDiffusion')
82
 
83
  # vae
84
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
85
  subfolder='vae', filename='config.json',
86
  cache_dir='models/StableDiffusion')
87
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
88
  subfolder='vae', filename='diffusion_pytorch_model.bin',
89
  cache_dir='models/StableDiffusion')
90
 
91
  # text encoder
92
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
93
  subfolder='text_encoder', filename='config.json',
94
  cache_dir='models/StableDiffusion')
95
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
96
  subfolder='text_encoder', filename='pytorch_model.bin',
97
  cache_dir='models/StableDiffusion')
98
 
@@ -100,23 +100,23 @@ if not LOCAL_DEBUG:
100
  hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
101
  subfolder='tokenizer', filename='merges.txt',
102
  cache_dir='models/StableDiffusion')
103
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
104
  subfolder='tokenizer', filename='special_tokens_map.json',
105
  cache_dir='models/StableDiffusion')
106
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
107
  subfolder='tokenizer', filename='tokenizer_config.json',
108
  cache_dir='models/StableDiffusion')
109
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
110
  subfolder='tokenizer', filename='vocab.json',
111
  cache_dir='models/StableDiffusion')
112
 
113
  # scheduler
114
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
115
  subfolder='scheduler', filename='scheduler_config.json',
116
  cache_dir='models/StableDiffusion')
117
 
118
  # model index
119
- hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5', filename='model_index.json',
120
  cache_dir='models/StableDiffusion')
121
 
122
  else:
 
65
  os.makedirs(DreamBooth_LoRA_PATH, exist_ok=True)
66
  os.makedirs(STABLE_DIFFUSION_PATH, exist_ok=True)
67
 
68
+ hf_hub_download(repo_id='leoxing/PIA-pruned',
69
  model_name='PIA', output=PIA_PATH)
70
  os.system('bash download_bashscripts/1-RealisticVision.sh')
71
  os.system('bash download_bashscripts/2-RcnzCartoon.sh')
 
81
  cache_dir='models/StableDiffusion')
82
 
83
  # vae
84
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5',
85
  subfolder='vae', filename='config.json',
86
  cache_dir='models/StableDiffusion')
87
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5',
88
  subfolder='vae', filename='diffusion_pytorch_model.bin',
89
  cache_dir='models/StableDiffusion')
90
 
91
  # text encoder
92
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5',
93
  subfolder='text_encoder', filename='config.json',
94
  cache_dir='models/StableDiffusion')
95
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5',
96
  subfolder='text_encoder', filename='pytorch_model.bin',
97
  cache_dir='models/StableDiffusion')
98
 
 
100
  hf_hub_download(model_repo='runwayml/stable-diffusion-v1-5',
101
  subfolder='tokenizer', filename='merges.txt',
102
  cache_dir='models/StableDiffusion')
103
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5',
104
  subfolder='tokenizer', filename='special_tokens_map.json',
105
  cache_dir='models/StableDiffusion')
106
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5',
107
  subfolder='tokenizer', filename='tokenizer_config.json',
108
  cache_dir='models/StableDiffusion')
109
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5',
110
  subfolder='tokenizer', filename='vocab.json',
111
  cache_dir='models/StableDiffusion')
112
 
113
  # scheduler
114
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5',
115
  subfolder='scheduler', filename='scheduler_config.json',
116
  cache_dir='models/StableDiffusion')
117
 
118
  # model index
119
+ hf_hub_download(repo_id='runwayml/stable-diffusion-v1-5', filename='model_index.json',
120
  cache_dir='models/StableDiffusion')
121
 
122
  else: