Skip to content
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

[Bug]: ImportError: cannot import name 'auto' from 'tqdm' (G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\tqdm\__init__.py) #216

Closed
2 tasks done
KaiJia2017 opened this issue Jul 28, 2023 · 8 comments
Labels
bug Something isn't working

Comments

@KaiJia2017
Copy link

Is there an existing issue for this?

  • I have searched the existing issues and checked the recent builds/commits of both this extension and the webui

Are you using the latest version of the extension?

  • I have the modelscope text2video extension updated to the lastest version and I still have the issue.

What happened?

ImportError: cannot import name 'auto' from 'tqdm' (G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\tqdm_init_.py)

Steps to reproduce the problem

When starting WebUI, an error is reported after loading the ROOP plugin

What should have happened?

No response

WebUI and Deforum extension Commit IDs

webui commit id - 68f336bd994bed5442ad95bad6b6ad5564a5409a
txt2vid commit id - 8f0af8c

Torch version

Version: torch-2.0.1+cu118

What GPU were you using for launching?

NVIDIA3060

On which platform are you launching the webui backend with the extension?

Local PC setup (Windows)

Settings

windows 10
python 3.10.10

Console logs

G:\GitFork\stable-diffusion-webui-new>G:\GitFork\stable-diffusion-webui-new\webui.bat
venv "G:\GitFork\stable-diffusion-webui-new\venv\Scripts\Python.exe"
Python 3.10.10 | packaged by Anaconda, Inc. | (main, Mar 21 2023, 18:39:17) [MSC v.1916 64 bit (AMD64)]
Version: v1.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a

Launching Web UI with arguments:
Traceback (most recent call last):
  File "G:\GitFork\stable-diffusion-webui-new\launch.py", line 39, in <module>
    main()
  File "G:\GitFork\stable-diffusion-webui-new\launch.py", line 35, in main
    start()
  File "G:\GitFork\stable-diffusion-webui-new\modules\launch_utils.py", line 390, in start
    import webui
  File "G:\GitFork\stable-diffusion-webui-new\webui.py", line 39, in <module>
    import pytorch_lightning   # noqa: F401 # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\pytorch_lightning\__init__.py", line 35, in <module>
    from pytorch_lightning.callbacks import Callback  # noqa: E402
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\pytorch_lightning\callbacks\__init__.py", line 14, in <module>
    from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\pytorch_lightning\callbacks\batch_size_finder.py", line 24, in <module>
    from pytorch_lightning.callbacks.callback import Callback
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\pytorch_lightning\callbacks\callback.py", line 25, in <module>
    from pytorch_lightning.utilities.types import STEP_OUTPUT
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\pytorch_lightning\utilities\types.py", line 27, in <module>
    from torchmetrics import Metric
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\torchmetrics\__init__.py", line 14, in <module>
    from torchmetrics import functional  # noqa: E402
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\torchmetrics\functional\__init__.py", line 121, in <module>
    from torchmetrics.functional.text._deprecated import _bleu_score as bleu_score
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\torchmetrics\functional\text\__init__.py", line 31, in <module>
    from torchmetrics.functional.text.bert import bert_score
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\torchmetrics\functional\text\bert.py", line 25, in <module>
    from torchmetrics.functional.text.helper_embedding_metric import (
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\torchmetrics\functional\text\helper_embedding_metric.py", line 27, in <module>
    from transformers import AutoModelForMaskedLM, AutoTokenizer, PreTrainedModel, PreTrainedTokenizerBase
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\transformers\__init__.py", line 30, in <module>
    from . import dependency_versions_check
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\transformers\dependency_versions_check.py", line 17, in <module>
    from .utils.versions import require_version, require_version_core
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\transformers\utils\__init__.py", line 34, in <module>
    from .generic import (
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\transformers\utils\generic.py", line 29, in <module>
    from .import_utils import is_flax_available, is_tf_available, is_torch_available, is_torch_fx_proxy
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\transformers\utils\import_utils.py", line 34, in <module>
    from . import logging
  File "G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\transformers\utils\logging.py", line 31, in <module>
    from tqdm import auto as tqdm_lib
ImportError: cannot import name 'auto' from 'tqdm' (G:\GitFork\stable-diffusion-webui-new\venv\lib\site-packages\tqdm\__init__.py)

Additional information

No response

@KaiJia2017 KaiJia2017 added the bug Something isn't working label Jul 28, 2023
@jrknox1977
Copy link

jrknox1977 commented Jul 28, 2023

I am receiving the same error. With surprisingly almost the same specs as the user above.

@FONGKA2
Copy link

FONGKA2 commented Jul 29, 2023

Same here, and killed my SD
i tried to change some stuff version which inside of my SD like transformer but it's doesnt work
so i install a whole new SD with text2vid extension with hope a fresh start will work
but the same, new SD setup also killed by text2vid

Python 3.10.6+2080TI+WIN10

`Already up to date.

venv "D:\SD\stable-diffusion-webui\venv\Scripts\Python.exe"
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug 1 2022, 21:53:49) [MSC v.1932 64 bit (AMD64)]
Version: v1.5.1
Commit hash: 68f336bd994bed5442ad95bad6b6ad5564a5409a
Launching Web UI with arguments: --no-half-vae --no-half --medvram --xformers --force-enable-xformers
Traceback (most recent call last):
File "D:\SD\stable-diffusion-webui\launch.py", line 39, in
main()
File "D:\SD\stable-diffusion-webui\launch.py", line 35, in main
start()
File "D:\SD\stable-diffusion-webui\modules\launch_utils.py", line 390, in start
import webui
File "D:\SD\stable-diffusion-webui\webui.py", line 39, in
import pytorch_lightning # noqa: F401 # pytorch_lightning should be imported after torch, but it re-enables warnings on import so import once to disable them
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\pytorch_lightning_init_.py", line 35, in
from pytorch_lightning.callbacks import Callback # noqa: E402
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\pytorch_lightning\callbacks_init_.py", line 14, in
from pytorch_lightning.callbacks.batch_size_finder import BatchSizeFinder
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\pytorch_lightning\callbacks\batch_size_finder.py", line 24, in
from pytorch_lightning.callbacks.callback import Callback
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\pytorch_lightning\callbacks\callback.py", line 25, in
from pytorch_lightning.utilities.types import STEP_OUTPUT
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\pytorch_lightning\utilities\types.py", line 27, in
from torchmetrics import Metric
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\torchmetrics_init_.py", line 14, in
from torchmetrics import functional # noqa: E402
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\torchmetrics\functional_init_.py", line 121, in
from torchmetrics.functional.text.deprecated import bleu_score as bleu_score
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\torchmetrics\functional\text_init
.py", line 31, in
from torchmetrics.functional.text.bert import bert_score
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\torchmetrics\functional\text\bert.py", line 25, in
from torchmetrics.functional.text.helper_embedding_metric import (
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\torchmetrics\functional\text\helper_embedding_metric.py", line 27, in
from transformers import AutoModelForMaskedLM, AutoTokenizer, PreTrainedModel, PreTrainedTokenizerBase
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\transformers_init
.py", line 30, in
from . import dependency_versions_check
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\transformers\dependency_versions_check.py", line 17, in
from .utils.versions import require_version, require_version_core
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\transformers\utils_init_.py", line 34, in
from .generic import (
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\transformers\utils\generic.py", line 29, in
from .import_utils import is_flax_available, is_tf_available, is_torch_available, is_torch_fx_proxy
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\transformers\utils\import_utils.py", line 34, in
from . import logging
File "D:\SD\stable-diffusion-webui\venv\lib\site-packages\transformers\utils\logging.py", line 31, in
from tqdm import auto as tqdm_lib
ImportError: cannot import name 'auto' from 'tqdm' (D:\SD\stable-diffusion-webui\venv\lib\site-packages\tqdm_init_.py)`

@Rfra1971
Copy link

I solved the problem by backing up the 'tqdm' and 'tqdm-4.65.0.dist-info' folders in 'env/lib/site-packages' of the stable diffusion before installing the extension. After installation, I removed the 2 folders named 'tqdm' and 'tqdm-4.11.2.dist-info' from the 'site-packages' folder and replaced them with the ones from the backup, as the extension removed the new version and installed a lower version of 'tqdm'.

@FONGKA2
Copy link

FONGKA2 commented Jul 30, 2023

I solved the problem by backing up the 'tqdm' and 'tqdm-4.65.0.dist-info' folders in 'env/lib/site-packages' of the stable diffusion before installing the extension. After installation, I removed the 2 folders named 'tqdm' and 'tqdm-4.11.2.dist-info' from the 'site-packages' folder and replaced them with the ones from the backup, as the extension removed the new version and installed a lower version of 'tqdm'.

It's work!

@KaiJia2017
Copy link
Author

I removed the 2 folders named 'venv' and 'extensions/text2video',restart webui.bat,problem solved!

@miwneva1994
Copy link

I solved the problem by backing up the 'tqdm' and 'tqdm-4.65.0.dist-info' folders in 'env/lib/site-packages' of the stable diffusion before installing the extension. After installation, I removed the 2 folders named 'tqdm' and 'tqdm-4.11.2.dist-info' from the 'site-packages' folder and replaced them with the ones from the backup, as the extension removed the new version and installed a lower version of 'tqdm'.

Solved by running
pip install tqdm==4.65.0

@kabachuha
Copy link
Owner

Not related to this extension 🙃

@kabachuha kabachuha closed this as not planned Won't fix, can't repro, duplicate, stale Sep 3, 2023
@skittixch
Copy link

Not related to this extension 🙃

I don't think that's the case...when I install this extension, my automatic1111 install breaks entirely. I'm trying to do miwneva1994's suggestion, but I'm running in docker, and it's hard to go in and change things when my container won't even run after I install. you might take another look at this...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

7 participants