Spaces:
Running
Running
fix setuptools constraints
Browse files
app.py
CHANGED
|
@@ -7,6 +7,7 @@ user_home = r"/home/user/app"
|
|
| 7 |
constraint_file_path = os.path.join(user_home, "constraints.txt")
|
| 8 |
with open(constraint_file_path, "w") as f:
|
| 9 |
f.write("numpy<2.0.0\n")
|
|
|
|
| 10 |
|
| 11 |
# 2. Set environment variables
|
| 12 |
# PIP_CONSTRAINT tells pip to use our file for ALL installations.
|
|
@@ -27,6 +28,7 @@ os.chdir(user_home)
|
|
| 27 |
# We install numpy<2.0.0 now, and the PIP_CONSTRAINT env var ensures it stays that way.
|
| 28 |
print("Forcing installation of NumPy < 2.0.0...")
|
| 29 |
os.system("pip install 'numpy<2.0.0'")
|
|
|
|
| 30 |
|
| 31 |
# Clone stable-diffusion-webui repo
|
| 32 |
print("cloning stable-diffusion-webui repo")
|
|
@@ -111,8 +113,6 @@ print("downloading model")
|
|
| 111 |
os.system(f"wget -q https://huggingface.co/FredZhang7/paint-journey-v2/resolve/main/paint_journey_v2_cpu_only.ckpt -O {user_home}/stable-diffusion-webui/models/Stable-diffusion/paint_journey_v2_cpu_only.ckpt")
|
| 112 |
os.system(f"wget -q https://huggingface.co/FredZhang7/paint-journey-v2/resolve/main/paint_journey_v2.vae.pt -O {user_home}/stable-diffusion-webui/models/Stable-diffusion/paint_journey_v2_cpu_only.vae.pt")
|
| 113 |
|
| 114 |
-
os.system("pip install --force-reinstall 'setuptools==80.10.2'")
|
| 115 |
-
|
| 116 |
# start webui
|
| 117 |
print("Done\nStarting Webui...")
|
| 118 |
os.system(r"python3 launch.py --precision full --ui-config-file /home/user/app/ui-config.json --ui-settings-file /home/user/app/config.json --no-half --no-half-vae --enable-insecure-extension-access --medvram --skip-torch-cuda-test")
|
|
|
|
| 7 |
constraint_file_path = os.path.join(user_home, "constraints.txt")
|
| 8 |
with open(constraint_file_path, "w") as f:
|
| 9 |
f.write("numpy<2.0.0\n")
|
| 10 |
+
f.write("setuptools<82.0.0\n")
|
| 11 |
|
| 12 |
# 2. Set environment variables
|
| 13 |
# PIP_CONSTRAINT tells pip to use our file for ALL installations.
|
|
|
|
| 28 |
# We install numpy<2.0.0 now, and the PIP_CONSTRAINT env var ensures it stays that way.
|
| 29 |
print("Forcing installation of NumPy < 2.0.0...")
|
| 30 |
os.system("pip install 'numpy<2.0.0'")
|
| 31 |
+
os.system("pip install 'setuptools<82.0.0'")
|
| 32 |
|
| 33 |
# Clone stable-diffusion-webui repo
|
| 34 |
print("cloning stable-diffusion-webui repo")
|
|
|
|
| 113 |
os.system(f"wget -q https://huggingface.co/FredZhang7/paint-journey-v2/resolve/main/paint_journey_v2_cpu_only.ckpt -O {user_home}/stable-diffusion-webui/models/Stable-diffusion/paint_journey_v2_cpu_only.ckpt")
|
| 114 |
os.system(f"wget -q https://huggingface.co/FredZhang7/paint-journey-v2/resolve/main/paint_journey_v2.vae.pt -O {user_home}/stable-diffusion-webui/models/Stable-diffusion/paint_journey_v2_cpu_only.vae.pt")
|
| 115 |
|
|
|
|
|
|
|
| 116 |
# start webui
|
| 117 |
print("Done\nStarting Webui...")
|
| 118 |
os.system(r"python3 launch.py --precision full --ui-config-file /home/user/app/ui-config.json --ui-settings-file /home/user/app/config.json --no-half --no-half-vae --enable-insecure-extension-access --medvram --skip-torch-cuda-test")
|