Updating code to soiz1 recommendations
Browse files
app.py
CHANGED
@@ -131,6 +131,7 @@ else:
|
|
131 |
# Building xformers from source
|
132 |
os.system(f'echo "Cloning xformers repo..."')
|
133 |
os.system(f'git clone https://github.com/facebookresearch/xformers.git /home/user/app/xformers')
|
|
|
134 |
|
135 |
os.system(f'echo "Installing xformers from source..."')
|
136 |
os.chdir(f'/home/user/app/xformers')
|
@@ -139,9 +140,10 @@ else:
|
|
139 |
# Final verification
|
140 |
os.system(f'echo "Verifying NumPy, PyTorch, and xformers versions..."')
|
141 |
|
142 |
-
os.system(
|
143 |
-
os.system(
|
|
|
144 |
|
145 |
# Launch WebUI with custom settings
|
146 |
os.system(f'echo "Starting WebUI with custom configurations..."')
|
147 |
-
os.system(f"python launch.py --force-enable-xformers --ui-config-file /home/user/app/shared-ui-config.json --ui-settings-file /home/user/app/shared-config.json --disable-console-progressbars --enable-console-prompts --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding --api --skip-torch-cuda-test")
|
|
|
131 |
# Building xformers from source
|
132 |
os.system(f'echo "Cloning xformers repo..."')
|
133 |
os.system(f'git clone https://github.com/facebookresearch/xformers.git /home/user/app/xformers')
|
134 |
+
os.system("cd /home/user/app/xformers && git submodule update --init --recursive")
|
135 |
|
136 |
os.system(f'echo "Installing xformers from source..."')
|
137 |
os.chdir(f'/home/user/app/xformers')
|
|
|
140 |
# Final verification
|
141 |
os.system(f'echo "Verifying NumPy, PyTorch, and xformers versions..."')
|
142 |
|
143 |
+
os.system("python -c 'import numpy; print(\"NumPy:\", numpy.__version__)'")
|
144 |
+
os.system("python -c 'import torch; print(\"PyTorch:\", torch.__version__)'")
|
145 |
+
os.system("python -c 'import xformers; print(\"xformers:\", xformers.__version__)'")
|
146 |
|
147 |
# Launch WebUI with custom settings
|
148 |
os.system(f'echo "Starting WebUI with custom configurations..."')
|
149 |
+
os.system(f"cd /home/user/app/stable-diffusion-webui && python launch.py --force-enable-xformers --ui-config-file /home/user/app/shared-ui-config.json --ui-settings-file /home/user/app/shared-config.json --disable-console-progressbars --enable-console-prompts --cors-allow-origins huggingface.co,hf.space --no-progressbar-hiding --api --skip-torch-cuda-test")
|