zerhero commited on
Commit
90435ee
1 Parent(s): 1f6e42a

change duration of function

Browse files
Files changed (1) hide show
  1. app.py +24 -13
app.py CHANGED
@@ -123,7 +123,8 @@ def download_things(directory, url, hf_token="", civitai_api_key=""):
123
  f"aria2c --console-log-level=error --summary-interval=10 --header={user_header} -c -x 16 -k 1M -s 16 {url} -d {directory} -o {url.split('/')[-1]}")
124
  else:
125
  os.system(
126
- f"aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -c -x 16 -k 1M -s 16 {url} -d {directory} -o {url.split('/')[-1]}")
 
127
  elif "civitai.com" in url:
128
  if "?" in url:
129
  url = url.split("?")[0]
@@ -171,19 +172,29 @@ directory_vaes = 'vaes'
171
  os.makedirs(directory_vaes, exist_ok=True)
172
 
173
  # - **Download SD 1.5 Models**
174
- download_model = "https://civitai.com/api/download/models/574369, https://huggingface.co/TechnoByte/MilkyWonderland/resolve/main/milkyWonderland_v40.safetensors"
 
 
 
175
  # - **Download VAEs**
176
- download_vae = "https://huggingface.co/nubby/blessed-sdxl-vae-fp16-fix/resolve/main/sdxl_vae-fp16fix-c-1.1-b-0.5.safetensors?download=true, https://huggingface.co/nubby/blessed-sdxl-vae-fp16-fix/resolve/main/sdxl_vae-fp16fix-blessed.safetensors?download=true, https://huggingface.co/digiplay/VAE/resolve/main/vividReal_v20.safetensors?download=true, https://huggingface.co/fp16-guy/anything_kl-f8-anime2_vae-ft-mse-840000-ema-pruned_blessed_clearvae_fp16_cleaned/resolve/main/vae-ft-mse-840000-ema-pruned_fp16.safetensors?download=true"
 
 
 
 
 
177
  # - **Download LoRAs**
178
- download_lora = ("https://huggingface.co/Leopain/color/resolve/main/Coloring_book_-_LineArt.safetensors, "
179
- "https://civitai.com/api/download/models/135867, "
180
- "https://civitai.com/api/download/models/145907, "
181
- "https://huggingface.co/Linaqruf/anime-detailer-xl-lora/resolve/main/anime-detailer-xl.safetensors?download=true, "
182
- "https://huggingface.co/Linaqruf/style-enhancer-xl-lora/resolve/main/style-enhancer-xl.safetensors?download=true, "
183
- "https://civitai.com/api/download/models/28609, "
184
- "https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SD15-8steps-CFG-lora.safetensors?download=true, "
185
- "https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SDXL-8steps-CFG-lora.safetensors?download=true, "
186
- "https://civitai.com/api/download/models/30666 ")
 
 
187
 
188
  load_diffusers_format_model = [
189
  'stabilityai/stable-diffusion-xl-base-1.0',
@@ -413,7 +424,7 @@ class GuiSD:
413
  )
414
  yield f"Model loaded: {model_name}"
415
 
416
- @spaces.GPU
417
  def generate_pipeline(
418
  self,
419
  prompt,
 
123
  f"aria2c --console-log-level=error --summary-interval=10 --header={user_header} -c -x 16 -k 1M -s 16 {url} -d {directory} -o {url.split('/')[-1]}")
124
  else:
125
  os.system(
126
+ f"aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -c -x 16 -k "
127
+ f"1M -s 16 {url} -d {directory} -o {url.split('/')[-1]}")
128
  elif "civitai.com" in url:
129
  if "?" in url:
130
  url = url.split("?")[0]
 
172
  os.makedirs(directory_vaes, exist_ok=True)
173
 
174
  # - **Download SD 1.5 Models**
175
+ download_model = (
176
+ "https://civitai.com/api/download/models/574369, "
177
+ "https://huggingface.co/TechnoByte/MilkyWonderland/resolve/main/milkyWonderland_v40.safetensors"
178
+ )
179
  # - **Download VAEs**
180
+ download_vae = (
181
+ "https://huggingface.co/nubby/blessed-sdxl-vae-fp16-fix/resolve/main/sdxl_vae-fp16fix-c-1.1-b-0.5.safetensors?download=true, "
182
+ "https://huggingface.co/nubby/blessed-sdxl-vae-fp16-fix/resolve/main/sdxl_vae-fp16fix-blessed.safetensors?download=true, "
183
+ "https://huggingface.co/digiplay/VAE/resolve/main/vividReal_v20.safetensors?download=true, "
184
+ "https://huggingface.co/fp16-guy/anything_kl-f8-anime2_vae-ft-mse-840000-ema-pruned_blessed_clearvae_fp16_cleaned/resolve/main/vae-ft-mse-840000-ema-pruned_fp16.safetensors?download=true"
185
+ )
186
  # - **Download LoRAs**
187
+ download_lora = (
188
+ "https://huggingface.co/Leopain/color/resolve/main/Coloring_book_-_LineArt.safetensors, "
189
+ "https://civitai.com/api/download/models/135867, "
190
+ "https://civitai.com/api/download/models/145907, "
191
+ "https://huggingface.co/Linaqruf/anime-detailer-xl-lora/resolve/main/anime-detailer-xl.safetensors?download=true, "
192
+ "https://huggingface.co/Linaqruf/style-enhancer-xl-lora/resolve/main/style-enhancer-xl.safetensors?download=true, "
193
+ "https://civitai.com/api/download/models/28609, "
194
+ "https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SD15-8steps-CFG-lora.safetensors?download=true, "
195
+ "https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SDXL-8steps-CFG-lora.safetensors?download=true, "
196
+ "https://civitai.com/api/download/models/30666 "
197
+ )
198
 
199
  load_diffusers_format_model = [
200
  'stabilityai/stable-diffusion-xl-base-1.0',
 
424
  )
425
  yield f"Model loaded: {model_name}"
426
 
427
+ @spaces.GPU(duration=15)
428
  def generate_pipeline(
429
  self,
430
  prompt,