Nathyboy commited on
Commit
5efd450
·
1 Parent(s): d37bf4f

Upload 3 files

Browse files
Files changed (3) hide show
  1. app.py +18 -0
  2. requierments.txt +6 -0
  3. start.sh +3 -0
app.py ADDED
@@ -0,0 +1,18 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ import os
2
+ import subprocess
3
+ import gradio as gr
4
+
5
+ # Start Automatic1111 WebUI in background
6
+ if not os.path.exists("stable-diffusion-webui"):
7
+ subprocess.run([
8
+ "git", "clone", "--depth", "1",
9
+ "https://github.com/AUTOMATIC1111/stable-diffusion-webui.git"
10
+ ])
11
+ os.chdir("stable-diffusion-webui")
12
+
13
+ # Install dependencies (will be picked up by requirements.txt too)
14
+ subprocess.run(["pip", "install", "-r", "requirements.txt"])
15
+
16
+ # Launch WebUI
17
+ os.environ["COMMANDLINE_ARGS"] = "--listen --disable-safe-unpickle --skip-torch-cuda-test"
18
+ subprocess.run(["python", "launch.py"])
requierments.txt ADDED
@@ -0,0 +1,6 @@
 
 
 
 
 
 
 
1
+ torch
2
+ torchvision
3
+ torchaudio
4
+ transformers
5
+ diffusers
6
+ gradio
start.sh ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ #!/bin/bash
2
+ cd stable-diffusion-webui
3
+ python launch.py --listen --disable-safe-unpickle --skip-torch-cuda-test