vorstcavry commited on
Commit
af185bb
1 Parent(s): ae76b93

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -33
app.py CHANGED
@@ -1,8 +1,4 @@
1
- """
2
- Stable Diffusion Webui Version 1.6
3
- https://github.com/AUTOMATIC1111/stable-diffusion-webui/releases/tag/v1.6.0
4
- """
5
- #commit_id=r"5ef669de080814067961f28357256e8fe27544f4" #Version 1.6.0
6
  import os
7
  from sys import executable
8
  import subprocess
@@ -42,29 +38,10 @@ print("cloning stable-diffusion-webui repo")
42
  Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git",user_home / r"stable-diffusion-webui")
43
  #os.chdir(str(user_home / r"stable-diffusion-webui"))
44
  #os.system("git reset --hard "+commit_id)
45
- os.chdir(user_home / r"stable-diffusion-webui")
46
- Gitclone(r"https://github.com/vorstcavry/ncpt_colab_timer",user_home / r"stable-diffusion-webui" / r"extensions" / r"ncpt_colab_timer")
47
- Gitclone(r"https://github.com/vorstcavry/static",user_home / r"stable-diffusion-webui" / r"static")
48
-
49
- def run_echo_command():
50
- try:
51
- start_huggingface
52
- except NameError:
53
- start_huggingface = int(time.time()) - 5
54
-
55
- cmd = f"echo -n {start_huggingface} > /home/user/app/stable-diffusion-webui/static/colabTimer.txt"
56
- subprocess.run(cmd, shell=True)
57
 
58
- # Contoh pemanggilan fungsi run_echo_command:
59
- run_echo_command()
60
  os.chdir(user_home / r"stable-diffusion-webui")
61
  #install extensions
62
  print("installing extensions")
63
- Gitclone(r"https://github.com/vorstcavry/embeddings",user_home / r"stable-diffusion-webui" / r"embeddings" / r"negative")
64
- Gitclone(r"https://github.com/vorstcavry/lora",user_home / r"stable-diffusion-webui" / r"models" / r"Lora" / r"positive")
65
- Gitclone(r"https://github.com/vorstcavry/Checkpoint-Model",user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion" / r"Checkpoint")
66
-
67
- DownLoad(r"https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth",user_home / r"stable-diffusion-webui" / r"models" / r"ESRGAN" ,r"4x-UltraSharp.pth")
68
  while (True):
69
  i=subprocess.run([r"wget",r"https://raw.githubusercontent.com/camenduru/stable-diffusion-webui-scripts/main/run_n_times.py",r"-O",str(user_home / r"stable-diffusion-webui" / r"scripts" / r"run_n_times.py")])
70
  if(i.returncode == 0 ):
@@ -96,8 +73,6 @@ Gitclone(r"https://tinyurl.com/aspect-ratio-v",user_home / r"stable-diffusion-we
96
  Gitclone(r"https://github.com/hnmr293/sd-webui-llul",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-llul")
97
  Gitclone(r"https://github.com/IDEA-Research/DWPose",user_home / r"stable-diffusion-webui" / r"extensions" / r"DWPose")
98
  Gitclone(r"https://github.com/Bing-su/adetailer",user_home / r"stable-diffusion-webui" / r"extensions" / r"adetailer")
99
- Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
100
-
101
 
102
  #Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
103
  #Gitclone(r"https://github.com/Iyashinouta/sd-model-downloader",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-model-downloader")
@@ -124,10 +99,6 @@ print("ControlNet models download done.\ndownloading model")
124
  DownLoad(r"https://huggingface.co/vorstcavry/mymodel/resolve/main/Cavry_V2.safetensors",user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion" / r"Checkpoint",r"Cavry_V2.safetensors")
125
  #downloadvae
126
  DownLoad(r"https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors",user_home / r"stable-diffusion-webui" / r"models" / r"VAE",r"vae-ft-mse-840000-ema-pruned.safetensors")
127
- DownLoad(r"https://huggingface.co/vorstcavry/loraasia1/resolve/main/japaneseDollLikeness_v15.safetensors",user_home / r"stable-diffusion-webui" / r"models"/ r"lora",r"japaneseDollLikeness_v15.safetensors")
128
- DownLoad(r"https://huggingface.co/vorstcavry/loraasia1/resolve/main/koreanDollLikeness_v20.safetensors",user_home / r"stable-diffusion-webui" / r"models"/ r"lora",r"koreanDollLikeness_v20.safetensors")
129
- DownLoad(r"https://huggingface.co/vorstcavry/loraasia1/resolve/main/taiwanDollLikeness_v15.safetensors",user_home / r"stable-diffusion-webui" / r"models"/ r"lora",r"taiwanDollLikeness_v15.safetensors")
130
-
131
 
132
 
133
 
@@ -156,9 +127,7 @@ args = [
156
  "--medvram",
157
  "--skip-torch-cuda-test",
158
  "--enable-console-prompts",
159
- "--ui-settings-file=" + str(pathlib.Path(__file__).parent / "config.json"),
160
- # "--hf-token-out",
161
- # "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" # Gantilah dengan token yang sesuai
162
  ]
163
 
164
  args = [arg.as_posix() if isinstance(arg, pathlib.PosixPath) else arg for arg in args]
 
1
+
 
 
 
 
2
  import os
3
  from sys import executable
4
  import subprocess
 
38
  Gitclone(r"https://github.com/AUTOMATIC1111/stable-diffusion-webui.git",user_home / r"stable-diffusion-webui")
39
  #os.chdir(str(user_home / r"stable-diffusion-webui"))
40
  #os.system("git reset --hard "+commit_id)
 
 
 
 
 
 
 
 
 
 
 
 
41
 
 
 
42
  os.chdir(user_home / r"stable-diffusion-webui")
43
  #install extensions
44
  print("installing extensions")
 
 
 
 
 
45
  while (True):
46
  i=subprocess.run([r"wget",r"https://raw.githubusercontent.com/camenduru/stable-diffusion-webui-scripts/main/run_n_times.py",r"-O",str(user_home / r"stable-diffusion-webui" / r"scripts" / r"run_n_times.py")])
47
  if(i.returncode == 0 ):
 
73
  Gitclone(r"https://github.com/hnmr293/sd-webui-llul",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-webui-llul")
74
  Gitclone(r"https://github.com/IDEA-Research/DWPose",user_home / r"stable-diffusion-webui" / r"extensions" / r"DWPose")
75
  Gitclone(r"https://github.com/Bing-su/adetailer",user_home / r"stable-diffusion-webui" / r"extensions" / r"adetailer")
 
 
76
 
77
  #Gitclone(r"https://github.com/NoCrypt/sd_hf_out",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd_hf_out")
78
  #Gitclone(r"https://github.com/Iyashinouta/sd-model-downloader",user_home / r"stable-diffusion-webui" / r"extensions" / r"sd-model-downloader")
 
99
  DownLoad(r"https://huggingface.co/vorstcavry/mymodel/resolve/main/Cavry_V2.safetensors",user_home / r"stable-diffusion-webui" / r"models" / r"Stable-diffusion" / r"Checkpoint",r"Cavry_V2.safetensors")
100
  #downloadvae
101
  DownLoad(r"https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors",user_home / r"stable-diffusion-webui" / r"models" / r"VAE",r"vae-ft-mse-840000-ema-pruned.safetensors")
 
 
 
 
102
 
103
 
104
 
 
127
  "--medvram",
128
  "--skip-torch-cuda-test",
129
  "--enable-console-prompts",
130
+ "--ui-settings-file=" + str(pathlib.Path(__file__).parent / "config.json")
 
 
131
  ]
132
 
133
  args = [arg.as_posix() if isinstance(arg, pathlib.PosixPath) else arg for arg in args]