Using NumPy 1.26.4
Browse files
app.py
CHANGED
@@ -90,16 +90,21 @@ 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 |
-
#
|
94 |
-
os.system(f'echo "
|
95 |
-
os.system(f"pip install
|
96 |
|
97 |
-
# Install
|
|
|
|
|
|
|
|
|
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 |
|
|
|
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 |
+
# Downgrade NumPy
|
94 |
+
os.system(f'echo "Downgrading NumPy to 1.26.4 for compatibility..."')
|
95 |
+
os.system(f"pip install numpy==1.26.4")
|
96 |
|
97 |
+
# Install compatible PyTorch version (2.1.2 works with NumPy 1.26.4)
|
98 |
+
os.system(f'echo "Installing PyTorch 2.1.2..."')
|
99 |
+
os.system(f"pip install torch==2.1.2+cu121 torchvision==0.16.2+cu121 --extra-index-url https://download.pytorch.org/whl/cu121 ")
|
100 |
+
|
101 |
+
# Install xformers
|
102 |
os.system(f'echo "Installing xformers for attention optimization..."')
|
103 |
os.system(f"pip install xformers==0.0.25")
|
104 |
|
105 |
# diagnostic checks to confirm versions
|
106 |
+
os.system(f'echo "Verifying NumPy, PyTorch, and xformers versions..."')
|
107 |
+
os.system(f"python -c 'import numpy; print(numpy.__version__)'")
|
108 |
os.system(f"python -c 'import torch; print(torch.__version__)'")
|
109 |
os.system(f"python -c 'import xformers; print(xformers.__version__)'")
|
110 |
|