lllyasviel / lllyasviel/stable-diffusion-webui-forge
[Bug]: ImportError: cannot import name 'packaging' from 'pkg_resources'
Nobody has claimed this yet.
- Dominant language
- Python
- Stars
- 13k
- Forks
- 1.7k
- PR merge metrics
- No merged PRs in 30d
Description
### Checklist
- [ ] The issue exists after disabling all extensions
- [x] The issue exists on a clean installation of webui
- [ ] The issue is caused by an extension, but I believe it is caused by a bug in the webui
- [X] The issue exists in the current version of the webui
- [ ] The issue has not been reported before recently
- [ ] The issue has been reported before but has not been fixed yet
### What happened?
first run of webui
### Steps to reproduce the problem
download from git
and run
### What should have happened?
webui loaded
### What browsers do you use to access the UI ?
Mozilla Firefox
### Sysinfo
[sysinfo-2024-05-12-04-25.json](https://github.com/user-attachments/files/15943318/sysinfo-2024-05-12-04-25.json)
### Console logs
```Shell
Python 3.10.11 (tags/v3.10.11:7d4cc5a, Apr 5 2023, 00:38:17) [MSC v.1929 64 bit (AMD64)]
Version: f0.0.17v1.8.0rc-latest-287-g77bdb920
Commit hash: 77bdb9208d019e562f9f629647356dca2b2d5ef1
D:\App\Data\Packages\Stable Diffusion WebUI Forge\extensions-builtin\forge_legacy_preprocessors\install.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Installing forge_legacy_preprocessor requirement: changing opencv-python version from 4.10.0.84 to 4.8.0
D:\App\Data\Packages\Stable Diffusion WebUI Forge\extensions-builtin\sd_forge_controlnet\install.py:2: DeprecationWarning: pkg_resources is deprecated as an API. See https://setuptools.pypa.io/en/latest/pkg_resources.html
import pkg_resources
Installing sd-forge-controlnet requirement: changing opencv-python version from 4.10.0.84 to 4.8.0
Launching Web UI with arguments: --directml --skip-torch-cuda-test --gradio-allowed-path D:\App\Data\Images
Using directml with device:
Total VRAM 1024 MB, total RAM 28417 MB
Trying to enable lowvram mode because your GPU seems to have 4GB or less. If you don't want this use: --always-normal-vram
Set vram state to: LOW_VRAM
Device: privateuseone
VAE dtype: torch.float32
CUDA Stream Activated: False
Warning: caught exception 'Torch not compiled with CUDA enabled', memory monitor disabled
Using sub quadratic optimization for cross attention, if you have memory or speed issues try using: --attention-split
Traceback (most recent call last):
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\launch.py", line 51, in
main()
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\launch.py", line 47, in main
start()
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\modules\launch_utils.py", line 541, in start
import webui
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\webui.py", line 19, in
initialize.imports()
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\modules\initialize.py", line 53, in imports
from modules import processing, gradio_extensons, ui # noqa: F401
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\modules\processing.py", line 18, in
import modules.sd_hijack
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\modules\sd_hijack.py", line 5, in
from modules import devices, sd_hijack_optimizations, shared, script_callbacks, errors, sd_unet, patches
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\modules\sd_hijack_optimizations.py", line 13, in
from modules.hypernetworks import hypernetwork
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\modules\hypernetworks\hypernetwork.py", line 13, in
from modules import devices, sd_models, shared, sd_samplers, hashes, sd_hijack_checkpoint, errors
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\modules\sd_samplers.py", line 1, in
from modules import sd_samplers_kdiffusion, sd_samplers_timesteps, sd_samplers_lcm, shared
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\modules\sd_samplers_kdiffusion.py", line 3, in
import k_diffusion.sampling
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\repositories\k-diffusion\k_diffusion\__init__.py", line 1, in
from . import augmentation, config, evaluation, external, gns, layers, models, sampling, utils
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\repositories\k-diffusion\k_diffusion\evaluation.py", line 6, in
import clip
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\venv\lib\site-packages\clip\__init__.py", line 1, in
from .clip import *
File "D:\App\Data\Packages\Stable Diffusion WebUI Forge\venv\lib\site-packages\clip\clip.py", line 6, in
from pkg_resources import packaging
ImportError: cannot import name 'packaging' from 'pkg_resources' (D:\App\Data\Packages\Stable Diffusion WebUI Forge\venv\lib\site-packages\pkg_resources\__init__.py)
```
### Additional information
installed using stability matrix
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with launch.py and modules/initialize.py, then follow the traceback through modules/sd_samplers_kdiffusion.py and repositories/k-diffusion/k_diffusion/evaluation.py to the installed clip package. Reproduce the first-run launch in the reported Python 3.10.11 environment and confirm that the web UI loads without the ImportError.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100