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

Updating code to soiz1 recommendations

Browse files
Files changed (1) hide show
  1. app.py +5 -3
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(f"python -c 'import torch; print(torch.__version__)'")
143
- os.system(f"python -c 'import xformers; print(xformers.__version__)")
 
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")