Spaces:
Runtime error
Runtime error
vorstcavry
commited on
Commit
•
d4c905a
1
Parent(s):
7f0507b
Update app.py
Browse files
app.py
CHANGED
@@ -213,12 +213,31 @@ DownLoad(r"https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv
|
|
213 |
#strt Stable Diffusion Webui
|
214 |
print("Done\nStarting Webui...")
|
215 |
os.chdir(user_home / r"stable-diffusion-webui")
|
216 |
-
|
217 |
-
|
218 |
-
|
219 |
-
|
220 |
-
|
221 |
-
|
222 |
-
|
223 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
224 |
del os ,user_home ,pyexecutable ,subprocess
|
|
|
213 |
#strt Stable Diffusion Webui
|
214 |
print("Done\nStarting Webui...")
|
215 |
os.chdir(user_home / r"stable-diffusion-webui")
|
216 |
+
import subprocess
|
217 |
+
import pathlib
|
218 |
+
|
219 |
+
executable = "/path/to/your/executable" # Gantilah dengan path yang sesuai
|
220 |
+
user_home = pathlib.Path("/home/user") # Gantilah dengan path yang sesuai
|
221 |
+
|
222 |
+
args = [
|
223 |
+
executable,
|
224 |
+
user_home / "stable-diffusion-webui" / "launch.py",
|
225 |
+
"--precision", "full",
|
226 |
+
"--no-half",
|
227 |
+
"--no-half-vae",
|
228 |
+
"--enable-insecure-extension-access",
|
229 |
+
"--medvram",
|
230 |
+
"--skip-torch-cuda-test",
|
231 |
+
"--enable-console-prompts",
|
232 |
+
"--ui-settings-file=" + str(pathlib.Path(__file__).parent / "config.json"),
|
233 |
+
"--hf-token-out",
|
234 |
+
"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" # Gantilah dengan token yang sesuai
|
235 |
+
]
|
236 |
+
|
237 |
+
args = [arg.as_posix() if isinstance(arg, pathlib.PosixPath) else arg for arg in args]
|
238 |
+
|
239 |
+
try:
|
240 |
+
ret = subprocess.run(args)
|
241 |
+
except Exception as e:
|
242 |
+
print("Error:", e)
|
243 |
del os ,user_home ,pyexecutable ,subprocess
|