darkstorm2150 commited on
Commit
2183b74
·
verified ·
1 Parent(s): 72c0685

lowering PyTorch Version and adding Diagnostic checks.

Browse files
Files changed (1) hide show
  1. app.py +9 -0
app.py CHANGED
@@ -90,9 +90,18 @@ else:
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
  # Install xformers for attention optimization
94
  os.system(f'echo "Installing xformers for attention optimization..."')
95
  os.system(f"pip install xformers==0.0.25")
 
 
 
 
 
96
 
97
  # Launch WebUI with custom settings
98
  os.system(f'echo "Starting WebUI with custom configurations..."')
 
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
+ # Install compatible PyTorch version (2.2.1 works with xformers 0.0.25)
94
+ os.system(f'echo "Installing compatible PyTorch 2.2.1..."')
95
+ os.system(f"pip install torch==2.2.1+cu121 torchvision==0.16.2+cu121 --extra-index-url https://download.pytorch.org/whl/cu121 ")
96
+
97
  # Install xformers for attention optimization
98
  os.system(f'echo "Installing xformers for attention optimization..."')
99
  os.system(f"pip install xformers==0.0.25")
100
+
101
+ # diagnostic checks to confirm versions
102
+ os.system(f'echo "Verifying PyTorch and xformers versions..."')
103
+ os.system(f"python -c 'import torch; print(torch.__version__)'")
104
+ os.system(f"python -c 'import xformers; print(xformers.__version__)'")
105
 
106
  # Launch WebUI with custom settings
107
  os.system(f'echo "Starting WebUI with custom configurations..."')