sd-webui-deoldify
sd-webui-deoldify copied to clipboard
Fix install.py for compatibility with modern Python, pip, and SD environments
Summary of Changes:
- Rewrote install.py to eliminate deprecated and unstable dependency logic
- Replaced pkg_resources checks (deprecated in setuptools ≥70) with direct pip subprocess installs
- Removed unused dependency: wandb (telemetry, not required by this extension)
- Simplified and stabilized dependency list (fastai, tensorboardX, ffmpeg-python, yt-dlp, opencv-python, Pillow)
- Improved error handling during dependency installs (continues even if one fails)
- Ensured model download logic remains intact and safer with clear progress display
- Prevented recursive dependency resolver conflicts (NumPy, Pydantic, Thinc issues)
- Modernized code style and docstrings for clarity and maintainability
Why This Fix Is Needed
- The old script breaks on Python ≥ 3.10 and pip ≥ 24 due to deprecated pkg_resources calls
- Causes AttributeError: _DistInfoDistribution__dep_map and FileNotFoundError for numpy.dist-info
- Leads to repeated dependency downgrade loops that break Stable Diffusion Forge/A1111 environments
- This version ensures smooth, conflict-free setup under CUDA and modern SD builds
Tested Environment
- Python 3.10 (Conda)
- CUDA 11.8 / Torch 2.0.1
- Stable Diffusion A1111 v1.5.1 and Forge (latest)
- Ubuntu 22.04 LTS (WSL2)