luongphamit commited on
Commit
f7c8662
1 Parent(s): 85f8919
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -10,7 +10,7 @@ elif("T4" in gpu_info):
10
  os.system(f"git clone -b v2.1 https://github.com/camenduru/stable-diffusion-webui /home/user/app/stable-diffusion-webui")
11
  os.chdir("/home/user/app/stable-diffusion-webui")
12
 
13
- os.system(f"wget -q https://github.com/camenduru/webui/raw/main/env_patch.py -O /home/user/app/env_patch.py")
14
  os.system(f"sed -i -e '/import image_from_url_text/r /home/user/app/env_patch.py' /home/user/app/stable-diffusion-webui/modules/ui.py")
15
  os.system(f"sed -i -e '/(modelmerger_interface, \"Checkpoint Merger\", \"modelmerger\"),/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
16
  os.system(f"sed -i -e '/(train_interface, \"Train\", \"ti\"),/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
@@ -23,15 +23,15 @@ os.system(f"sed -i -e 's/ outputs=\[/queue=False, &/g' /home/user/app/stable-dif
23
  os.system(f"sed -i -e 's/ queue=False, / /g' /home/user/app/stable-diffusion-webui/modules/ui.py")
24
 
25
  # ----------------------------Please duplicate this space and delete this block if you don't want to see the extra header----------------------------
26
- os.system(f"wget -q https://github.com/camenduru/webui/raw/main/header_patch.py -O /home/user/app/header_patch.py")
27
  os.system(f"sed -i -e '/demo:/r /home/user/app/header_patch.py' /home/user/app/stable-diffusion-webui/modules/ui.py")
28
  # ---------------------------------------------------------------------------------------------------------------------------------------------------
29
 
30
  if "IS_SHARED_UI" in os.environ:
31
  os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
32
 
33
- os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-config.json -O /home/user/app/shared-config.json")
34
- os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-ui-config.json -O /home/user/app/shared-ui-config.json")
35
 
36
  os.system(f"python launch.py --precision full --no-half --use-cpu SD BSRGAN ESRGAN SCUNet CodeFormer --all --disable-console-progressbars --enable-console-prompts --ui-config-file /home/user/app/shared-ui-config.json --ui-settings-file /home/user/app/shared-config.json --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding")
37
  else:
 
10
  os.system(f"git clone -b v2.1 https://github.com/camenduru/stable-diffusion-webui /home/user/app/stable-diffusion-webui")
11
  os.chdir("/home/user/app/stable-diffusion-webui")
12
 
13
+ os.system(f"wget -q https://github.com/luongpham89/webui/raw/main/env_patch.py -O /home/user/app/env_patch.py")
14
  os.system(f"sed -i -e '/import image_from_url_text/r /home/user/app/env_patch.py' /home/user/app/stable-diffusion-webui/modules/ui.py")
15
  os.system(f"sed -i -e '/(modelmerger_interface, \"Checkpoint Merger\", \"modelmerger\"),/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
16
  os.system(f"sed -i -e '/(train_interface, \"Train\", \"ti\"),/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
 
23
  os.system(f"sed -i -e 's/ queue=False, / /g' /home/user/app/stable-diffusion-webui/modules/ui.py")
24
 
25
  # ----------------------------Please duplicate this space and delete this block if you don't want to see the extra header----------------------------
26
+ os.system(f"wget -q https://github.com/luongpham89/webui/raw/main/header_patch.py -O /home/user/app/header_patch.py")
27
  os.system(f"sed -i -e '/demo:/r /home/user/app/header_patch.py' /home/user/app/stable-diffusion-webui/modules/ui.py")
28
  # ---------------------------------------------------------------------------------------------------------------------------------------------------
29
 
30
  if "IS_SHARED_UI" in os.environ:
31
  os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
32
 
33
+ os.system(f"wget -q https://github.com/luongpham89/webui/raw/main/shared-config.json -O /home/user/app/shared-config.json")
34
+ os.system(f"wget -q https://github.com/luongpham89/webui/raw/main/shared-ui-config.json -O /home/user/app/shared-ui-config.json")
35
 
36
  os.system(f"python launch.py --precision full --no-half --use-cpu SD BSRGAN ESRGAN SCUNet CodeFormer --all --disable-console-progressbars --enable-console-prompts --ui-config-file /home/user/app/shared-ui-config.json --ui-settings-file /home/user/app/shared-config.json --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding")
37
  else: