camenduru commited on
Commit
5f48fcf
1 Parent(s): 5782ea0

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -1
app.py CHANGED
@@ -16,9 +16,12 @@ os.system(f"wget -q https://huggingface.co/camenduru/i15/resolve/main/sd-v1-5-in
16
  os.system(f"wget -q https://huggingface.co/camenduru/sd14/resolve/main/sd-v1-4.ckpt -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/sd-v1-4.ckpt")
17
  os.system(f"wget -q https://huggingface.co/hakurei/waifu-diffusion-v1-3/resolve/main/wd-v1-3-float32.ckpt -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/wd-v1-3-float32.ckpt")
18
  os.chdir("/home/user/app/stable-diffusion-webui")
 
19
  os.system(f"sed -i -e '/(modelmerger_interface, \"Checkpoint Merger\", \"modelmerger\"),/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
20
  os.system(f"sed -i -e '/(train_interface, \"Train\", \"ti\"),/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
21
  os.system(f"sed -i -e '/settings_interface, \"Settings\", \"settings\"/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
22
  os.system(f"sed -i -e '/extensions_interface, \"Extensions\", \"extensions\"/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
23
- os.system(f"sed -i -e 's/\"filter_nsfw\": OptionInfo(False, \"Filter NSFW content\"),/\"filter_nsfw\": OptionInfo(True, \"Filter NSFW content\"),/g' /home/user/app/stable-diffusion-webui/modules/shared.py")
 
 
24
  os.system(f"python launch.py --force-enable-xformers")
 
16
  os.system(f"wget -q https://huggingface.co/camenduru/sd14/resolve/main/sd-v1-4.ckpt -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/sd-v1-4.ckpt")
17
  os.system(f"wget -q https://huggingface.co/hakurei/waifu-diffusion-v1-3/resolve/main/wd-v1-3-float32.ckpt -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/wd-v1-3-float32.ckpt")
18
  os.chdir("/home/user/app/stable-diffusion-webui")
19
+ # ----------------------------Duplicate this space and delete this block for Checkpoint Merger, Train, Settings, Extensions Tabs---------------------
20
  os.system(f"sed -i -e '/(modelmerger_interface, \"Checkpoint Merger\", \"modelmerger\"),/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
21
  os.system(f"sed -i -e '/(train_interface, \"Train\", \"ti\"),/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
22
  os.system(f"sed -i -e '/settings_interface, \"Settings\", \"settings\"/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
23
  os.system(f"sed -i -e '/extensions_interface, \"Extensions\", \"extensions\"/d' /home/user/app/stable-diffusion-webui/modules/ui.py")
24
+ # ---------------------------------------------------------------------------------------------------------------------------------------------------
25
+ os.system(f"cp /home/user/app/config.json /home/user/app/stable-diffusion-webui/")
26
+ os.system(f"cp /home/user/app/ui-config.json /home/user/app/stable-diffusion-webui/")
27
  os.system(f"python launch.py --force-enable-xformers")