Spaces:
Runtime error
Runtime error
change duration of function
Browse files
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
|
|
|
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 =
|
|
|
|
|
|
|
175 |
# - **Download VAEs**
|
176 |
-
download_vae =
|
|
|
|
|
|
|
|
|
|
|
177 |
# - **Download LoRAs**
|
178 |
-
download_lora = (
|
179 |
-
|
180 |
-
|
181 |
-
|
182 |
-
|
183 |
-
|
184 |
-
|
185 |
-
|
186 |
-
|
|
|
|
|
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,
|