Update app.py
Browse files
app.py
CHANGED
@@ -8,39 +8,32 @@ iface = gr.Interface(fn=greet, inputs="text", outputs="text")
|
|
8 |
iface.launch()
|
9 |
|
10 |
# - Dependencies - #
|
11 |
-
|
12 |
|
13 |
# - Stable Diffusion WebUI - #
|
14 |
-
|
15 |
|
16 |
# --- MODELS, LORAS, VAE --- #
|
17 |
-
|
18 |
-
|
19 |
-
|
20 |
-
|
21 |
|
22 |
# --- UPSCALERS --- #
|
23 |
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/ESRGAN/4x-UltraSharp.pth", "https://huggingface.co/Zabin/Resizers/resolve/main/4x-UltraSharp.pth"])
|
24 |
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/ESRGAN/4x_foolhardy_Remacri.pth", "https://huggingface.co/Zabin/Resizers/resolve/main/4x_foolhardy_Remacri.pth"])
|
25 |
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/ESRGAN/4x_NMKD-Superscale-SP_178000_G.pth", "https://huggingface.co/gemasai/4x_NMKD-Superscale-SP_178000_G/resolve/main/4x_NMKD-Superscale-SP_178000_G.pth"])
|
26 |
|
27 |
-
|
28 |
# --- EMBEDDINGS --- #
|
29 |
-
|
30 |
-
|
31 |
# Descarga de otros archivos de embeddings...
|
32 |
|
33 |
-
# ---
|
34 |
-
|
35 |
-
|
36 |
-
|
37 |
-
|
38 |
-
!wget -O /content/stable-diffusion-webui/ui-config.json https://huggingface.co/TNitro/ui-config/resolve/main/ui-config.json
|
39 |
-
!cp /content/stable-diffusion-webui/ui-config.json /content/stable-diffusion-webui/config.json
|
40 |
-
!sed -i -e 's/\["sd_model_checkpoint"\],/\["sd_model_checkpoint","sd_vae","CLIP_stop_at_last_layers"\],/g' /content/stable-diffusion-webui/modules/shared_options.py
|
41 |
-
!sed -i -e 's/"\[seed\]"/"\[model_name\],\[seed\]"/g' /content/stable-diffusion-webui/modules/images.py
|
42 |
# Otras modificaciones en la configuraci贸n de la interfaz de usuario...
|
43 |
|
44 |
# - Run - #
|
45 |
-
|
46 |
-
!python launch.py --theme dark --enable-insecure-extension-access --disable-safe-unpickle --no-hashing --xformers &
|
|
|
8 |
iface.launch()
|
9 |
|
10 |
# - Dependencies - #
|
11 |
+
subprocess.run(["pip", "install", "xformers", "pyngrok"]) # Instalamos las dependencias necesarias
|
12 |
|
13 |
# - Stable Diffusion WebUI - #
|
14 |
+
subprocess.run(["git", "clone", "https://github.com/AUTOMATIC1111/stable-diffusion-webui"])
|
15 |
|
16 |
# --- MODELS, LORAS, VAE --- #
|
17 |
+
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/Stable-diffusion/absolutereality_v181.safetensors", "https://civitai.com/api/download/models/132760"])
|
18 |
+
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/VAE/vae-ft-mse-840000-ema-pruned.safetensors", "https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors"])
|
19 |
+
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/VAE/kl-f8-anime2.ckpt", "https://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt"])
|
|
|
20 |
|
21 |
# --- UPSCALERS --- #
|
22 |
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/ESRGAN/4x-UltraSharp.pth", "https://huggingface.co/Zabin/Resizers/resolve/main/4x-UltraSharp.pth"])
|
23 |
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/ESRGAN/4x_foolhardy_Remacri.pth", "https://huggingface.co/Zabin/Resizers/resolve/main/4x_foolhardy_Remacri.pth"])
|
24 |
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/models/ESRGAN/4x_NMKD-Superscale-SP_178000_G.pth", "https://huggingface.co/gemasai/4x_NMKD-Superscale-SP_178000_G/resolve/main/4x_NMKD-Superscale-SP_178000_G.pth"])
|
25 |
|
|
|
26 |
# --- EMBEDDINGS --- #
|
27 |
+
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/embeddings/Negative/EasyNegative.pt", "https://huggingface.co/embed/negative/resolve/main/EasyNegative.pt"])
|
28 |
+
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/embeddings/Negative/EasyNegativeV2.safetensors", "https://huggingface.co/gsdf/Counterfeit-V3.0/resolve/main/embedding/EasyNegativeV2.safetensors"])
|
29 |
# Descarga de otros archivos de embeddings...
|
30 |
|
31 |
+
# --- UI Config - #
|
32 |
+
subprocess.run(["wget", "-O", "/content/stable-diffusion-webui/ui-config.json", "https://huggingface.co/TNitro/ui-config/resolve/main/ui-config.json"])
|
33 |
+
subprocess.run(["cp", "/content/stable-diffusion-webui/ui-config.json", "/content/stable-diffusion-webui/config.json"])
|
34 |
+
subprocess.run(["sed", "-i", "-e", 's/\["sd_model_checkpoint"\],/\["sd_model_checkpoint","sd_vae","CLIP_stop_at_last_layers"\],/g', "/content/stable-diffusion-webui/modules/shared_options.py"])
|
35 |
+
subprocess.run(["sed", "-i", "-e", 's/"\[seed\]"/"\[model_name\],\[seed\]"/g', "/content/stable-diffusion-webui/modules/images.py"])
|
|
|
|
|
|
|
|
|
36 |
# Otras modificaciones en la configuraci贸n de la interfaz de usuario...
|
37 |
|
38 |
# - Run - #
|
39 |
+
subprocess.run(["python", "/content/stable-diffusion-webui/launch.py", "--theme", "dark", "--enable-insecure-extension-access", "--disable-safe-unpickle", "--no-hashing", "--xformers"])
|
|