-
Notifications
You must be signed in to change notification settings - Fork 1.2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports' #595
Comments
Yup just faced the exact same issue with the Invoke profile. Changed to auto profile for now - which works. |
Same here. Steps to reproduce:
Using a Amazon g5.xlarge instance (NVIDIA A10G Tensor-Core-GPU) with an EC2 Deep Learning Base GPU AMI (Ubuntu 20.04) 20231026 (ami-0d134e01570c1e7b4)
I've also tried
|
Hmm, if I understand this correctly, this error should not be happening anymore, right? Well, I just ran into it with a fresh install today. |
Same here with invoke |
Ditto here on a local install following instructions. And the exact same procedure described above to reproduce it |
Anyone still getting this error - you can modify the dockerfile at \stable-diffusion-webui-docker\services\invoke\Dockerfile by adding a line:
RUN --mount=type=cache,target=/root/.cache/pip |
Brilliant - thanks! But now I'm facing another error: cannot import name 'ModelSearchArguments' from 'huggingface_hub' |
same here, did you solve it? |
Hi, I wonder if the already downloaded files will be removed automaticlly whenI switch "invoke" to "auto", because it is kinda waste of space since I would never use "invoke" again. Or how should I removed the files that related to the "invoke" mode. THX |
Describe the bug [+] Running 1/1
✔ Container webui-docker-invoke-1 Created 0.1s
Attaching to invoke-1
invoke-1 | mkdir: created directory '/data/.cache/invoke'
invoke-1 | mkdir: created directory '/data/.cache/invoke/ldm/'
invoke-1 | Mounted ldm
invoke-1 | Mounted .cache
invoke-1 | Mounted RealESRGAN
invoke-1 | mkdir: created directory '/data/models/Codeformer/'
invoke-1 | Mounted Codeformer
invoke-1 | Mounted GFPGAN
invoke-1 | Mounted GFPGANv1.4.pth
invoke-1 | Loading Python libraries...
invoke-1 |
invoke-1 | Traceback (most recent call last):
invoke-1 | File "/opt/conda/bin/invokeai-configure", line 5, in <module>
invoke-1 | from ldm.invoke.config.invokeai_configure import main
invoke-1 | File "/InvokeAI/ldm/invoke/config/invokeai_configure.py", line 40, in <module>
invoke-1 | from ..args import PRECISION_CHOICES, Args
invoke-1 | File "/InvokeAI/ldm/invoke/args.py", line 100, in <module>
invoke-1 | from ldm.invoke.conditioning import split_weighted_subprompts
invoke-1 | File "/InvokeAI/ldm/invoke/conditioning.py", line 18, in <module>
invoke-1 | from .generator.diffusers_pipeline import StableDiffusionGeneratorPipeline
invoke-1 | File "/InvokeAI/ldm/invoke/generator/__init__.py", line 4, in <module>
invoke-1 | from .base import Generator
invoke-1 | File "/InvokeAI/ldm/invoke/generator/base.py", line 21, in <module>
invoke-1 | from pytorch_lightning import seed_everything
invoke-1 | File "/opt/conda/lib/python3.10/site-packages/pytorch_lightning/__init__.py", line 34, in <module>
invoke-1 | from pytorch_lightning.callbacks import Callback # noqa: E402
invoke-1 | File "/opt/conda/lib/python3.10/site-packages/pytorch_lightning/callbacks/__init__.py", line 25, in <module>
invoke-1 | from pytorch_lightning.callbacks.progress import ProgressBarBase, RichProgressBar, TQDMProgressBar
invoke-1 | File "/opt/conda/lib/python3.10/site-packages/pytorch_lightning/callbacks/progress/__init__.py", line 22, in <module>
invoke-1 | from pytorch_lightning.callbacks.progress.rich_progress import RichProgressBar # noqa: F401
invoke-1 | File "/opt/conda/lib/python3.10/site-packages/pytorch_lightning/callbacks/progress/rich_progress.py", line 20, in <module>
invoke-1 | from torchmetrics.utilities.imports import _compare_version
invoke-1 | ImportError: cannot import name '_compare_version' from 'torchmetrics.utilities.imports' (/opt/conda/lib/python3.10/site-packages/torchmetrics/utilities/imports.py)
invoke-1 exited with code 1 Which UI invoke Hardware / Software
Steps to Reproduce
Additional context
|
huggingface_hub removed 'ModelSearchArguments' from version v0.19, you can remove the current version and re-install v0.18.0 or below, please note that you also need to lower the version of transformers to v4.35. Otherwise you will get "AttributeError: module 'huggingface_hub.constants' has no attribute 'HF_HUB_CACHE'" error again. I solved this issue by adding :
|
Welp @mynameiskeen , your changes seems to almost solve the problem in my case 😅 now I got this:
|
Try add this: |
Has this issue been opened before?
Describe the bug
I think this is just me. But running into an issue and hoping someone else knows how to fix it. Can't find the issue online. Anyway. Stable diffusion web-ui has been working perfectly on my machine for ages, but recently tried to start it again and am getting stuck with this error:
Which UI
invoke
Hardware / Software
6a34739135eb112667f00943c1fac98ab294716a
Steps to Reproduce
docker compose --profile download up --build
docker compose --profile invoke up --build
Additional context
I already made a fresh clone and cleaned my docker containers (
docker system prune -a
). So this is a completely fresh build.Anyone run into this? Any pointers?
Over at invoke ai I found something about installing torchmetrics v0.11.4 (invoke-ai/InvokeAI#3658). Is this something I can configure with an env var?
The text was updated successfully, but these errors were encountered: