vorstcavry commited on
Commit
d242347
1 Parent(s): 3066522

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +11 -5
app.py CHANGED
@@ -7,7 +7,12 @@ from sys import executable
7
  import subprocess
8
  import pathlib
9
  import gc
10
-
 
 
 
 
 
11
  def Gitclone(URI:str,ClonePath:pathlib.Path ) -> int :
12
  if pathlib.Path.exists(ClonePath):
13
  return 0
@@ -78,9 +83,10 @@ 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")
 
84
  #Gitclone(r"https://github.com/Iyashinouta/sd-model-downloader",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-model-downloader")
85
  #Gitclone(r"https://github.com/AIrjen/OneButtonPrompt",user_home / r"stable-diffusion-webui" / r"extensions" / r"OneButtonPrompt")
86
  #Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-wildcards")
@@ -198,7 +204,7 @@ 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()
 
7
  import subprocess
8
  import pathlib
9
  import gc
10
+ import time
11
+ try:
12
+ start_huggingface
13
+ except:
14
+ start_huggingface= int(time.time())-5
15
+
16
  def Gitclone(URI:str,ClonePath:pathlib.Path ) -> int :
17
  if pathlib.Path.exists(ClonePath):
18
  return 0
 
83
  #Gitclone(r"https://github.com/hnmr293/sd-webui-llul",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-llul")
84
  #Gitclone(r"https://github.com/IDEA-Research/DWPose",user_home / r"stable-diffusion-webui" / r"extensions" / r"DWPose")
85
  #Gitclone(r"https://github.com/Bing-su/adetailer",user_home / r"stable-diffusion-webui" / r"extensions" / r"adetailer")
86
+ Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
87
+ Gitclone(r"https://github.com/NoCrypt/ncpt_colab_timer",user_home / r"stable-diffusion-webui" / r"extensions" / r"ncpt_colab_timer")
88
+ Gitclone(r"https://github.com/vorstcavry/static",user_home / r"stable-diffusion-webui" / r"static")
89
+ !echo -n {start_huggingface} > /home/user/app/stable-diffusion-webui/static/colabTimer.txt
90
  #Gitclone(r"https://github.com/Iyashinouta/sd-model-downloader",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-model-downloader")
91
  #Gitclone(r"https://github.com/AIrjen/OneButtonPrompt",user_home / r"stable-diffusion-webui" / r"extensions" / r"OneButtonPrompt")
92
  #Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui-wildcards",user_home / r"stable-diffusion-webui" / r"extensions" / r"stable-diffusion-webui-wildcards")
 
204
  os.chdir(user_home / r"stable-diffusion-webui")
205
  gc.collect()
206
  while True:
207
+ 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",r"--hf-token-out +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" )])
208
  if(ret.returncode == 0 ):
209
  del ret
210
  gc.collect()