Compare commits

...

4 Commits

Author SHA1 Message Date
w-e-w 1937682a20 Merge pull request #17313 from WhizZest/fix-setuptools-version
Fix the issue of `pip install 'setuptools<70'` failing in cmd
2026-03-02 16:00:53 +09:00
home-MSI fd0f475aaf Fix the issue of pip install 'setuptools<70' failing in cmd; cmd doesn't support single quotes. 2026-03-02 13:46:16 +08:00
WhizZest 76759a1853 Fix CLIP installation failures(issue#17201, #17284, #17287, Discussion #17283,#17275) (#17293) 2026-02-27 19:52:10 -05:00
w-e-w fd68e0c384 update stable_diffusion_repo url (#17207) 2025-12-18 09:41:31 -05:00
+18 -2
View File
@@ -378,7 +378,7 @@ def prepare_environment():
openclip_package = os.environ.get('OPENCLIP_PACKAGE', "https://github.com/mlfoundations/open_clip/archive/bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b.zip")
assets_repo = os.environ.get('ASSETS_REPO', "https://github.com/AUTOMATIC1111/stable-diffusion-webui-assets.git")
stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://github.com/Stability-AI/stablediffusion.git")
stable_diffusion_repo = os.environ.get('STABLE_DIFFUSION_REPO', "https://github.com/w-e-w/stablediffusion.git")
stable_diffusion_xl_repo = os.environ.get('STABLE_DIFFUSION_XL_REPO', "https://github.com/Stability-AI/generative-models.git")
k_diffusion_repo = os.environ.get('K_DIFFUSION_REPO', 'https://github.com/crowsonkb/k-diffusion.git')
blip_repo = os.environ.get('BLIP_REPO', 'https://github.com/salesforce/BLIP.git')
@@ -422,8 +422,24 @@ def prepare_environment():
)
startup_timer.record("torch GPU test")
# Ensure build dependencies are installed before any package that might need them
def ensure_build_dependencies():
"""Ensure essential build tools are available"""
if not is_installed("wheel"):
run_pip("install wheel", "wheel")
# Check setuptools version compatibility
try:
setuptools_version = run(f'"{python}" -c "import setuptools; print(setuptools.__version__)"', None, None).strip()
if setuptools_version >= "70":
run_pip("install setuptools==69.5.1", "setuptools")
except Exception:
# If setuptools check fails, install compatible version
run_pip("install setuptools==69.5.1", "setuptools")
# Install build dependencies early
ensure_build_dependencies()
if not is_installed("clip"):
run_pip(f"install {clip_package}", "clip")
run_pip(f"install --no-build-isolation {clip_package}", "clip")
startup_timer.record("install clip")
if not is_installed("open_clip"):