sdcreator / app.py
Necht's picture
Update app.py
967928f verified
raw
history blame
2.66 kB
import gradio as gr
def greet(name):
return "Hello " + name + "!!"
iface = gr.Interface(fn=greet, inputs="text", outputs="text")
iface.launch()
# - Dependencies - #
!pip install xformers pyngrok # Instalamos las dependencias necesarias
# - Stable Diffusion WebUI - #
!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui
# --- MODELS, LORAS, VAE --- #
!wget -O /content/stable-diffusion-webui/models/Stable-diffusion/absolutereality_v181.safetensors https://civitai.com/api/download/models/132760
!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
!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
# --- UPSCALERS --- #
!wget -O /content/stable-diffusion-webui/models/ESRGAN/4x-UltraSharp.pth https://huggingface.co/Zabin/Resizers/resolve/main/4x-UltraSharp.pth
!wget -O /content/stable-diffusion-webui/models/ESRGAN/4x_foolhardy_Remacri.pth https://huggingface.co/Zabin/Resizers/resolve/main/4x_foolhardy_Remacri.pth
!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
# --- EMBEDDINGS --- #
!wget -O /content/stable-diffusion-webui/embeddings/Negative/EasyNegative.pt https://huggingface.co/embed/negative/resolve/main/EasyNegative.pt
!wget -O /content/stable-diffusion-webui/embeddings/Negative/EasyNegativeV2.safetensors https://huggingface.co/gsdf/Counterfeit-V3.0/resolve/main/embedding/EasyNegativeV2.safetensors
# Descarga de otros archivos de embeddings...
# --- EXTENSIONS --- #
# Clonamos los repositorios de las extensiones...
# Descargamos los modelos necesarios...
# - UI Config - #
!wget -O /content/stable-diffusion-webui/ui-config.json https://huggingface.co/TNitro/ui-config/resolve/main/ui-config.json
!cp /content/stable-diffusion-webui/ui-config.json /content/stable-diffusion-webui/config.json
!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
!sed -i -e 's/"\[seed\]"/"\[model_name\],\[seed\]"/g' /content/stable-diffusion-webui/modules/images.py
# Otras modificaciones en la configuración de la interfaz de usuario...
# - Run - #
%cd /content/stable-diffusion-webui
!python launch.py --theme dark --enable-insecure-extension-access --disable-safe-unpickle --no-hashing --xformers &