Compare commits
4 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 1937682a20 | |||
| fd0f475aaf | |||
| 76759a1853 | |||
| fd68e0c384 |
+18
-2
@@ -378,7 +378,7 @@ def prepare_environment():
|
|||||||
openclip_package = os.environ.get('OPENCLIP_PACKAGE', "https://github.com/mlfoundations/open_clip/archive/bb6e834e9c70d9c27d0dc3ecedeebeaeb1ffad6b.zip")
|
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")
|
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")
|
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')
|
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')
|
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")
|
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"):
|
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")
|
startup_timer.record("install clip")
|
||||||
|
|
||||||
if not is_installed("open_clip"):
|
if not is_installed("open_clip"):
|
||||||
|
|||||||
Reference in New Issue
Block a user