Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -31,11 +31,12 @@ 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 |
-
# 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")
|
@@ -47,6 +48,9 @@ if "IS_SHARED_UI" in os.environ:
|
|
47 |
|
48 |
os.system(f"python launch.py --force-enable-xformers --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")
|
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 |
|
|
|
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 |
|
35 |
if "IS_SHARED_UI" in os.environ:
|
36 |
# os.system(f"rm -rfv /home/user/app/stable-diffusion-webui/scripts/")
|
37 |
+
os.system(f"rm -v /home/user/app/stable-diffusion-webui/scripts/*")
|
38 |
+
# add the custom script `image_reward.py` into SD Web UI
|
39 |
+
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")
|
40 |
|
41 |
os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-config.json -O /home/user/app/shared-config.json")
|
42 |
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 |
|
49 |
os.system(f"python launch.py --force-enable-xformers --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")
|
50 |
else:
|
51 |
+
# add the custom script `image_reward.py` into SD Web UI
|
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 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")
|
55 |
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")
|
56 |
|