Spaces:
Runtime error
Runtime error
Tweak app.py
Browse files
app.py
CHANGED
@@ -31,10 +31,11 @@ os.system(f"wget -q https://raw.githubusercontent.com/tongyx361/ImageReward-in-S
|
|
31 |
os.system(f"sed -i -e '/demo:/r /home/user/app/header_patch.py' /home/user/app/stable-diffusion-webui/modules/ui.py")
|
32 |
# ---------------------------------------------------------------------------------------------------------------------------------------------------
|
33 |
|
|
|
|
|
|
|
34 |
if "IS_SHARED_UI" in os.environ:
|
35 |
-
os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
|
36 |
-
# add the custom script `image_reward.py` into SD Web UI
|
37 |
-
os.system(f"wget -q https://raw.githubusercontent.com/THUDM/ImageReward/main/demo/sdwebui/image_reward.py -O /home/user/app/stable-diffusion-webui/scripts/image_reward.py")
|
38 |
|
39 |
os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-config.json -O /home/user/app/shared-config.json")
|
40 |
os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-ui-config.json -O /home/user/app/shared-ui-config.json")
|
@@ -48,9 +49,7 @@ if "IS_SHARED_UI" in os.environ:
|
|
48 |
else:
|
49 |
# Please duplicate this space and delete # character in front of the custom script you want to use or add here more custom scripts with same structure os.system(f"wget -q https://CUSTOM_SCRIPT_URL -O /home/user/app/stable-diffusion-webui/scripts/CUSTOM_SCRIPT_NAME.py")
|
50 |
os.system(f"wget -q https://gist.github.com/camenduru/9ec5f8141db9902e375967e93250860f/raw/d0bcf01786f20107c329c03f8968584ee67be12a/run_n_times.py -O /home/user/app/stable-diffusion-webui/scripts/run_n_times.py")
|
51 |
-
|
52 |
-
os.system(f"wget -q https://raw.githubusercontent.com/THUDM/ImageReward/main/demo/sdwebui/image_reward.py -O /home/user/app/stable-diffusion-webui/scripts/image_reward.py")
|
53 |
-
|
54 |
# Please duplicate this space and delete # character in front of the extension you want to use or add here more extensions with same structure os.system(f"git clone https://EXTENSION_GIT_URL /home/user/app/stable-diffusion-webui/extensions/EXTENSION_NAME")
|
55 |
#os.system(f"git clone https://github.com/camenduru/stable-diffusion-webui-artists-to-study /home/user/app/stable-diffusion-webui/extensions/stable-diffusion-webui-artists-to-study")
|
56 |
os.system(f"git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /home/user/app/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser")
|
|
|
31 |
os.system(f"sed -i -e '/demo:/r /home/user/app/header_patch.py' /home/user/app/stable-diffusion-webui/modules/ui.py")
|
32 |
# ---------------------------------------------------------------------------------------------------------------------------------------------------
|
33 |
|
34 |
+
# add the custom script `image_reward.py` into SD Web UI
|
35 |
+
os.system(f"wget -q https://raw.githubusercontent.com/THUDM/ImageReward/main/demo/sdwebui/image_reward.py -O /home/user/app/stable-diffusion-webui/scripts/image_reward.py")
|
36 |
+
|
37 |
if "IS_SHARED_UI" in os.environ:
|
38 |
+
# os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
|
|
|
|
|
39 |
|
40 |
os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-config.json -O /home/user/app/shared-config.json")
|
41 |
os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-ui-config.json -O /home/user/app/shared-ui-config.json")
|
|
|
49 |
else:
|
50 |
# Please duplicate this space and delete # character in front of the custom script you want to use or add here more custom scripts with same structure os.system(f"wget -q https://CUSTOM_SCRIPT_URL -O /home/user/app/stable-diffusion-webui/scripts/CUSTOM_SCRIPT_NAME.py")
|
51 |
os.system(f"wget -q https://gist.github.com/camenduru/9ec5f8141db9902e375967e93250860f/raw/d0bcf01786f20107c329c03f8968584ee67be12a/run_n_times.py -O /home/user/app/stable-diffusion-webui/scripts/run_n_times.py")
|
52 |
+
|
|
|
|
|
53 |
# Please duplicate this space and delete # character in front of the extension you want to use or add here more extensions with same structure os.system(f"git clone https://EXTENSION_GIT_URL /home/user/app/stable-diffusion-webui/extensions/EXTENSION_NAME")
|
54 |
#os.system(f"git clone https://github.com/camenduru/stable-diffusion-webui-artists-to-study /home/user/app/stable-diffusion-webui/extensions/stable-diffusion-webui-artists-to-study")
|
55 |
os.system(f"git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /home/user/app/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser")
|