darkstorm2150 commited on
Commit
aa10c15
·
verified ·
1 Parent(s): 1f67de6

second rev towards launching xformers

Browse files
Files changed (1) hide show
  1. app.py +12 -7
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
- os.system(f'echo "Installing xformers from source..."')
137
- os.chdir(f'/home/user/app/xformers')
138
- os.system(f'pip install --no-cache-dir -e .')
139
 
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")
 
 
 
 
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")