roubaofeipi commited on
Commit
a76c46f
1 Parent(s): 21c339e

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +6 -2
app.py CHANGED
@@ -14,6 +14,7 @@ import gradio as gr
14
  import spaces
15
  from huggingface_hub import hf_hub_url
16
  import subprocess
 
17
 
18
  def parse_args():
19
  parser = argparse.ArgumentParser()
@@ -219,10 +220,13 @@ def download_model():
219
  'https://huggingface.co/stabilityai/StableWurst/resolve/main/effnet_encoder.safetensors',
220
  'https://huggingface.co/stabilityai/StableWurst/resolve/main/stage_b_lite_bf16.safetensors',
221
  'https://huggingface.co/stabilityai/StableWurst/resolve/main/stage_c_bf16.safetensors',
222
- 'https://huggingface.co/roubaofeipi/UltraPixel/blob/main/ultrapixel_t2i.safetensors'
223
  ]
224
  for file_url in urls:
225
- download_with_wget(file_url, os.path.join('models', file_url.split('/')[-1]))
 
 
 
226
  if __name__ == "__main__":
227
 
228
  args = parse_args()
 
14
  import spaces
15
  from huggingface_hub import hf_hub_url
16
  import subprocess
17
+ from huggingface_hub import hf_hub_download
18
 
19
  def parse_args():
20
  parser = argparse.ArgumentParser()
 
220
  'https://huggingface.co/stabilityai/StableWurst/resolve/main/effnet_encoder.safetensors',
221
  'https://huggingface.co/stabilityai/StableWurst/resolve/main/stage_b_lite_bf16.safetensors',
222
  'https://huggingface.co/stabilityai/StableWurst/resolve/main/stage_c_bf16.safetensors',
223
+
224
  ]
225
  for file_url in urls:
226
+ hf_hub_download(repo_id="stabilityai/stable-cascade", filename=file_url.split('/')[-1], local_dir='models')
227
+ # 'https://huggingface.co/roubaofeipi/UltraPixel/blob/main/ultrapixel_t2i.safetensors'
228
+ hf_hub_download(repo_id="roubaofeipi/UltraPixel", filename='ultrapixel_t2i.safetensors', local_dir='models')
229
+
230
  if __name__ == "__main__":
231
 
232
  args = parse_args()