second rev towards launching xformers
Browse files
app.py
CHANGED
|
@@ -133,17 +133,22 @@ else:
|
|
| 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 |
-
|
| 137 |
-
os.chdir(
|
| 138 |
-
os.system(
|
| 139 |
|
| 140 |
# Final verification
|
| 141 |
-
os.system(f'echo "Verifying NumPy
|
| 142 |
|
| 143 |
os.system("python -c 'import numpy; print(\"NumPy:\", numpy.__version__)'")
|
| 144 |
os.system("python -c 'import torch; print(\"PyTorch:\", torch.__version__)'")
|
| 145 |
-
|
|
|
|
|
|
|
| 146 |
|
| 147 |
# Launch WebUI with custom settings
|
| 148 |
-
os.system(f'echo "Starting WebUI
|
| 149 |
-
|
|
|
|
|
|
|
|
|
|
|
|
| 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 |
+
# Change directory to xformers and install
|
| 137 |
+
os.chdir('/home/user/app/xformers')
|
| 138 |
+
os.system('pip install --no-cache-dir -e .')
|
| 139 |
|
| 140 |
# Final verification
|
| 141 |
+
os.system(f'echo "Verifying NumPy and PyTorch..."')
|
| 142 |
|
| 143 |
os.system("python -c 'import numpy; print(\"NumPy:\", numpy.__version__)'")
|
| 144 |
os.system("python -c 'import torch; print(\"PyTorch:\", torch.__version__)'")
|
| 145 |
+
|
| 146 |
+
# Explicitly verify xformers import
|
| 147 |
+
os.system("python -c 'import xformers; print(\"xformers version:\", xformers.__version__)'")
|
| 148 |
|
| 149 |
# Launch WebUI with custom settings
|
| 150 |
+
os.system(f'echo "Starting WebUI..."')
|
| 151 |
+
|
| 152 |
+
# starting xformers with WebUI...
|
| 153 |
+
os.chdir('/home/user/app/stable-diffusion-webui')
|
| 154 |
+
os.system("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")
|