SD auto 1111 No module named 'tqdm.auto'

Hi

I got this problem: Launching Web UI with arguments: --xformers
Traceback (most recent call last):
File “E:\Stablediffdel3\stable-diffusion-webui\launch.py”, line 39, in
main()
File “E:\Stablediffdel3\stable-diffusion-webui\launch.py”, line 35, in main
start()
File “E:\Stablediffdel3\stable-diffusion-webui\modules\launch_utils.py”, line 390, in start
import webui
File “E:\Stablediffdel3\stable-diffusion-webui\webui.py”, line 44, in
import gradio # noqa: F401
File “E:\Stablediffdel3\stable-diffusion-webui\venv\lib\site-packages\gradio_init_.py”, line 3, in
import gradio.components as components
File “E:\Stablediffdel3\stable-diffusion-webui\venv\lib\site-packages\gradio\components.py”, line 34, in
from gradio_client import media_data
File “E:\Stablediffdel3\stable-diffusion-webui\venv\lib\site-packages\gradio_client_init_.py”, line 1, in
from gradio_client.client import Client
File “E:\Stablediffdel3\stable-diffusion-webui\venv\lib\site-packages\gradio_client\client.py”, line 24, in
from huggingface_hub import CommitOperationAdd, SpaceHardware, SpaceStage
File “E:\Stablediffdel3\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub_init_.py”, line 322, in getattr
submod = importlib.import_module(submod_path)
File “C:\Users\tvers\AppData\Local\Programs\Python\Python310\lib\importlib_init_.py”, line 126, in import_module
return _bootstrap.gcd_import(name[level:], package, level)
File “E:\Stablediffdel3\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub\hf_api.py”, line 35, in
from huggingface_hub.utils import (
File "E:\Stablediffdel3\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub\utils_init
.py", line 18, in
from . import tqdm as _tqdm # _tqdm is the module
File “E:\Stablediffdel3\stable-diffusion-webui\venv\lib\site-packages\huggingface_hub\utils\tqdm.py”, line 63, in
from tqdm.auto import tqdm as old_tqdm
ModuleNotFoundError: No module named ‘tqdm.auto’
Press any key to continue . . .

I tried to reinstall everything, but still the same problem. Also did a pip3 install tqdm" or “pip install tqdm --upgrade”
Got: Requirement already satisfied: tqdm in c:\users\tvers\appdata\local\programs\python\python310\lib\site-packages (4.65.1.dev3+gd13dfbf)
Requirement already satisfied: colorama in c:\users\tvers\appdata\local\programs\python\python310\lib\site-packages (from tqdm) (0.4.6)

Can anyone help?

2 Likes

I’ve exactly the same issue, after a fresh install of stable Diffusion/Automatic 1111.
Everything was working until I added the extensions Canvas Zoom and TempoalNet.
I’ve got all the right Python/pip/tqdm packages installed as far as I can see.
Very frustrating!

2 Likes

Hello GwarAI,

I had the same issue and was struggling for hours to fix this.

I did fix it with recreating the virtual environment for python following this procedure:
https://mothergeo-py.readthedocs.io/en/latest/development/how-to/venv-win.html

Problem with “ModuleNotFoundError: No module named ‘tqdm.auto’” was solved after that.

Kind regards, Rod

1 Like

Hi

Thanks for answering, I manage to fix it, but has not installed all the extetions. I suspect the error is in one of them. (and controll net is not function right yet)

stable-diffusion-webui can copy python environment
you need in E:\Stablediffdel3\stable-diffusion-webui install tqdm

1 Like

Can you please explain a little bit how to do this ? I have the same issue as OP and I can’t seem to fix it :frowning: it happened after installing an extension.

Did put the python path in the webui.bat

@echo off

set PYTHON=“C:\Users\yourname\AppData\Local\Programs\Python\Python310\python.exe”
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS= --xformers

call webui.bat

Hey guys,

the main problem is the version of tqdm that is automatically installed in the installation process. Here is how I solved the issue under Windows. For Linux just google how to activate the venv in the terminal.

For Win do the following:

Fire up your cmd, browse to your automatic folder and start the activate.bat in your “venv” folder, for me it’s here:

C:\Stable_Diffusion\automatic1111\venv\Scripts\activate.bat

Now you should see (venv) infront of your cmd path.

(venv) C:\Stable_Diffusion\automatic1111>py
Python 3.10.6 (tags/v3.10.6:9c7b4bd, Aug  1 2022, 21:53:49) ......
Type "help", "copyright", "credits" or "license" for more information.
>>> import tqdm
>>> tqdm.__version__
'4.57.0' #<--- This is the one I installed to fix the problem

Now you should see your Version number. If it is lower than than ‘4.57.0’ try the following

(venv) P:\Stable_Diffusion\automatic1111>pip install tqdm==4.57.0

There is a dependecie issue with “moviepy” wich is the root of the issue I guess. When you install the 4.57.0 version It’s possible that you get some Errors from the moviepy installation, but now automatic1111 should launch again. Hope it helps.

14 Likes

Thank you @bento234 its worked for me.

1 Like

I’ve installed TemportalKit again recently, but have the problem with “no module named tqdm.auto”, so I couldn’t open A1111 anymore. With your solution “pip install tqdm==4.57.0” I was able to open and work again with A1111, for that thanks a lot, but the problem is that I’m having more errors and I can’t use TemporalKit like months ago.

BTW if someone gets errors related with ffmpeg after installing tqdm==4.57.0, just install ffmpeg from https://www.gyan.dev/ffmpeg/builds/ffmpeg-git-full.7z, extract it to "C:\ffmpeg" and add to your variables PATH "C:\ffmpeg\bin".

Only way I can think of is to install another version of tqdm into a different directory and change the import statements in temporal net accordingly.

It is definitely a “dirty” method. The best way is to check which module uses the older version of tqdm and open a ticket in the corresponding git repo. But now, for the hacky people out there. Here’s how you can achieve this on Windows:

  1. Setting up Directories:
    First, create two directories where you’d like to install the different versions of tqdm. You can use the Command Prompt for this:
mkdir C:\path\to\Automatic\venv\tqdm_version1
mkdir C:\path\to\Automatic\venv\tqdm_version2

Replace C:\path\to\ with your preferred directory path.

  1. Installing Different Versions:
    To install different versions of tqdm into these directories, you can use pip with the --target option:
pip install tqdm==<Version1> --target=C:\path\to\Automatic\venv\tqdm_version1
pip install tqdm==<Version2> --target=C:\path\to\Automatic\venv\tqdm_version2

Replace <Version1> and <Version2> with the actual version numbers you’d like to install.

  1. Using the Required Version in Your Code:
    Instead of manipulating sys.path, you can directly import the required version of tqdm using its absolute path. Here’s how you can do it:
from C:\path\to\Automatic\venv\tqdm_version1\tqdm import tqdm

Make sure to use double backslashes (\\) in the path since a single backslash is an escape character in Python strings.

That’s it! By directly importing from the absolute path, you can ensure that you’re using the exact version of tqdm that you want, without any ambiguity.


Hope this helps!
If anyone has a more elegant solution or feedback, I’d love to hear it.

1 Like

YALL DO THIS IN WINDOWS Command Line:

C:\Users\ (YOURUSERNAME)\Desktop\stable-diffusion-webui\venv\Scripts\activate.bat

pip install moviepy --upgrade


OR IN POWERSHELL:

C:\Users\ (YOURUSERNAME)\Desktop\stable-diffusion-webui\venv\Scripts\activate.ps1

pip install moviepy --upgrade

RESTART A1111 and BAM! ALL BUENO!

Got this issue when installing TemporalKit. Thank you for taking the time to post the solution. Worked for me. I did an upgrade using the following command:

python.exe -m pip install --upgrade tqdm

2 Likes

XDDDDDDDDDDDDD no need to coding
just add git pull to auto update and repair
like this:
@echo off

set PYTHON=“C:\Users.…\Python310\python.exe”
set GIT=
set VENV_DIR=
set COMMANDLINE_ARGS= --xformers
git pull
call webui.bat

1 Like

Can you please explain a little bit how to do this ? I have the same issue and I can’t seem to fix it :frowning: , pleaaaaaaaaaaaaaaaaas

easy solution
1- Delete corrupted extensions from the extension folder
2- delete venv folder
3- restart SD
it will download some files and will work

7 Likes

issue with tqdm has been resolved with the help of Bento234! It’s wonderful when the open-source community comes together to assist one another.

Can anyone show me how to fix errors when installing Tempora Kit on Jupiter Lab? Same mistake

Can anyone show me how to fix errors when installing Tempora Kit on Jupiter Lab? Same mistake

Thank you very much for the solution you provided. I am running webUI on a mac system. I have tried various possible solutions for several hours to no avail. Your solution allowed me to successfully open the SD.