vorstcavry commited on
Commit
0a14b1b
1 Parent(s): 4294f8b

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +28 -8
app.py CHANGED
@@ -78,6 +78,8 @@ Gitclone(r"https://tinyurl.com/aspect-ratio-v",user_home / r"stable-diffusion-we
78
  #Gitclone(r"https://github.com/hnmr293/sd-webui-llul",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-llul")
79
  #Gitclone(r"https://github.com/IDEA-Research/DWPose",user_home / r"stable-diffusion-webui" / r"extensions" / r"DWPose")
80
  #Gitclone(r"https://github.com/Bing-su/adetailer",user_home / r"stable-diffusion-webui" / r"extensions" / r"adetailer")
 
 
81
 
82
 
83
  #Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
@@ -196,12 +198,30 @@ DownLoad(r"https://github.com/TencentARC/GFPGAN/releases/download/v1.3.0/GFPGANv
196
  #strt Stable Diffusion Webui
197
  print("Done\nStarting Webui...")
198
  os.chdir(user_home / r"stable-diffusion-webui")
199
- gc.collect()
200
- while True:
201
- ret=subprocess.run([executable ,user_home / r"stable-diffusion-webui" / r"launch.py",r"--precision",r"full",r"--no-half",r"--no-half-vae",r"--enable-insecure-extension-access",r"--medvram",r"--skip-torch-cuda-test",r"--enable-console-prompts",r"--ui-settings-file="+str(pathlib.Path(__file__).parent /r"config.json")])
202
- if(ret.returncode == 0 ):
203
- del ret
204
- gc.collect()
205
- else :
206
- del ret
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
207
  del os ,user_home ,pyexecutable ,subprocess
 
78
  #Gitclone(r"https://github.com/hnmr293/sd-webui-llul",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-llul")
79
  #Gitclone(r"https://github.com/IDEA-Research/DWPose",user_home / r"stable-diffusion-webui" / r"extensions" / r"DWPose")
80
  #Gitclone(r"https://github.com/Bing-su/adetailer",user_home / r"stable-diffusion-webui" / r"extensions" / r"adetailer")
81
+ Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
82
+
83
 
84
 
85
  #Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
 
198
  #strt Stable Diffusion Webui
199
  print("Done\nStarting Webui...")
200
  os.chdir(user_home / r"stable-diffusion-webui")
201
+ import subprocess
202
+ import pathlib
203
+
204
+ user_home = pathlib.Path("/home/user")
205
+
206
+ args = [
207
+ executable,
208
+ user_home / "stable-diffusion-webui" / "launch.py",
209
+ "--precision", "full",
210
+ "--no-half",
211
+ "--no-half-vae",
212
+ "--enable-insecure-extension-access",
213
+ "--medvram",
214
+ "--skip-torch-cuda-test",
215
+ "--enable-console-prompts",
216
+ "--ui-settings-file=" + str(pathlib.Path(__file__).parent / "config.json"),
217
+ "--hf-token-out",
218
+ "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" # Gantilah dengan token yang sesuai
219
+ ]
220
+
221
+ args = [arg.as_posix() if isinstance(arg, pathlib.PosixPath) else arg for arg in args]
222
+
223
+ try:
224
+ ret = subprocess.run(args)
225
+ except Exception as e:
226
+ print("Error:", e)
227
  del os ,user_home ,pyexecutable ,subprocess