kabachuha / sd-webui-text2video

Auto1111 extension implementing text2video diffusion models (like ModelScope or VideoCrafter) using only Auto1111 webui dependencies
Other
1.28k stars 108 forks source link

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

Closed KaiJia2017 closed 11 months ago

KaiJia2017 commented 1 year ago

Is there an existing issue for this?

Are you using the latest version of the extension?

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 - 8f0af8c95a3c3a3af09c63cbdbdacc34b7a45f8d

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

jrknox1977 commented 1 year ago

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

FONGKA2 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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 commented 1 year ago

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

miwneva1994 commented 12 months ago

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 commented 11 months ago

Not related to this extension 🙃

skittixch commented 10 months ago

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...