SD-deploy-2 / app.py
Nathyboy's picture
Update app.py
87af562
raw
history blame
598 Bytes
import os
import subprocess
import gradio as gr
# Start Automatic1111 WebUI in background
if not os.path.exists("stable-diffusion-webui"):
subprocess.run([
"git", "clone", "--depth", "1",
"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git"
])
os.chdir("stable-diffusion-webui")
# Install dependencies (will be picked up by requirements.txt too)
subprocess.run(["pip", "install", "-r", "requirements.txt"])
# Launch WebUI
os.environ["COMMANDLINE_ARGS"] = "--listen --xformers --enable-insecure-extension-access --medvram"
subprocess.run(["python", "launch.py"])