darkstorm2150 commited on
Commit
263ec6a
·
verified ·
1 Parent(s): 9c7db13

removed -q flag from wget, more verbosity.

Browse files
Files changed (1) hide show
  1. app.py +6 -6
app.py CHANGED
@@ -14,7 +14,7 @@ os.system(f'echo "Setting working directory to stable-diffusion-webui root folde
14
  os.chdir("/home/user/app/stable-diffusion-webui")
15
 
16
  os.system(f'echo "Downloading environment patch script from camenduru/webui..."')
17
- os.system(f"wget -q https://github.com/camenduru/webui/raw/main/env_patch.py -O /home/user/app/env_patch.py")
18
 
19
  os.system(f'echo "Patching modules/ui.py to import image_from_url_text from env_patch.py..."')
20
  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")
@@ -50,7 +50,7 @@ os.system(f"sed -i -e 's/outputs=\\[token_counter\\]/outputs=[token_counter], qu
50
 
51
  # ----------------------------Patch UI Header for Hugging Face Spaces----------------------------
52
  os.system(f'echo "Downloading header_patch.py to customize UI header banners..."')
53
- os.system(f"wget -q https://github.com/camenduru/webui/raw/main/header_patch.py -O /home/user/app/header_patch.py")
54
 
55
  os.system(f'echo "Injecting header_patch.py content into modules/ui.py under the demo section..."')
56
  os.system(f"sed -i -e '/demo:/r /home/user/app/header_patch.py' /home/user/app/stable-diffusion-webui/modules/ui.py")
@@ -64,10 +64,10 @@ if "IS_SHARED_UI" in os.environ:
64
 
65
  # Download shared UI configuration files
66
  os.system(f"echo 'Downloading shared-config.json for UI settings...'")
67
- os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-config.json -O /home/user/app/shared-config.json")
68
 
69
  os.system(f"echo 'Downloading shared-ui-config.json for layout preferences...'")
70
- os.system(f"wget -q https://github.com/camenduru/webui/raw/main/shared-ui-config.json -O /home/user/app/shared-ui-config.json")
71
 
72
  # Launch WebUI with shared settings
73
  os.system(f'echo "Starting WebUI with shared configurations..."')
@@ -77,7 +77,7 @@ else:
77
 
78
  # Download custom scripts
79
  os.system(f'echo "Installing run_n_times.py script for batch processing..."')
80
- 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")
81
 
82
  # Install extensions (commented lines can be activated by removing #)
83
  os.system(f'echo "Installing image browser extension for managing outputs..."')
@@ -88,7 +88,7 @@ else:
88
 
89
  # Load Protogen model (example custom model)
90
  os.system(f'echo "Downloading Protogen X3.4 Stable Diffusion model..."')
91
- os.system(f"wget -q https://huggingface.co/darkstorm2150/Protogen_x3.4_Official_Release/resolve/main/ProtoGen_X3.4.safetensors -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/ProtoGen_X3.4.safetensors")
92
 
93
  # Launch WebUI with custom settings
94
  os.system(f'echo "Starting WebUI with custom configurations..."')
 
14
  os.chdir("/home/user/app/stable-diffusion-webui")
15
 
16
  os.system(f'echo "Downloading environment patch script from camenduru/webui..."')
17
+ os.system(f"wget https://github.com/camenduru/webui/raw/main/env_patch.py -O /home/user/app/env_patch.py")
18
 
19
  os.system(f'echo "Patching modules/ui.py to import image_from_url_text from env_patch.py..."')
20
  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")
 
50
 
51
  # ----------------------------Patch UI Header for Hugging Face Spaces----------------------------
52
  os.system(f'echo "Downloading header_patch.py to customize UI header banners..."')
53
+ os.system(f"wget https://github.com/camenduru/webui/raw/main/header_patch.py -O /home/user/app/header_patch.py")
54
 
55
  os.system(f'echo "Injecting header_patch.py content into modules/ui.py under the demo section..."')
56
  os.system(f"sed -i -e '/demo:/r /home/user/app/header_patch.py' /home/user/app/stable-diffusion-webui/modules/ui.py")
 
64
 
65
  # Download shared UI configuration files
66
  os.system(f"echo 'Downloading shared-config.json for UI settings...'")
67
+ os.system(f"wget https://github.com/camenduru/webui/raw/main/shared-config.json -O /home/user/app/shared-config.json")
68
 
69
  os.system(f"echo 'Downloading shared-ui-config.json for layout preferences...'")
70
+ os.system(f"wget https://github.com/camenduru/webui/raw/main/shared-ui-config.json -O /home/user/app/shared-ui-config.json")
71
 
72
  # Launch WebUI with shared settings
73
  os.system(f'echo "Starting WebUI with shared configurations..."')
 
77
 
78
  # Download custom scripts
79
  os.system(f'echo "Installing run_n_times.py script for batch processing..."')
80
+ os.system(f"wget https://gist.github.com/camenduru/9ec5f8141db9902e375967e93250860f/raw/d0bcf01786f20107c329c03f8968584ee67be12a/run_n_times.py -O /home/user/app/stable-diffusion-webui/scripts/run_n_times.py")
81
 
82
  # Install extensions (commented lines can be activated by removing #)
83
  os.system(f'echo "Installing image browser extension for managing outputs..."')
 
88
 
89
  # Load Protogen model (example custom model)
90
  os.system(f'echo "Downloading Protogen X3.4 Stable Diffusion model..."')
91
+ os.system(f"wget https://huggingface.co/darkstorm2150/Protogen_x3.4_Official_Release/resolve/main/ProtoGen_X3.4.safetensors -O /home/user/app/stable-diffusion-webui/models/Stable-diffusion/ProtoGen_X3.4.safetensors")
92
 
93
  # Launch WebUI with custom settings
94
  os.system(f'echo "Starting WebUI with custom configurations..."')