Closed dege1000 closed 5 months ago
I tried your solution but it didn't work for me. I also tried manually upgrading xformers with pip but then it gave me another error:
RuntimeError: Torch is not able to use GPU
Okay I was able to fix it by installing this specific file from the venv:
Other versions located here:
Unfortunately, it still appears to be training as slowly as ever. With the older version of dreambooth, from before the redesigned UI, I get about 3 it/s. With the newer version, I'm getting about 2.2 it/s, even with the correct xformers installed. Either it's not using xformers properly, or there's something else in the recent updates that's causing a performance degradation.
That seems to be a completely different issue. But something that comes to mind is that windows update will always try to replace the graphics driver and it usually is a much older version or a bugged one, and maybe dreambooth or torch needs a newer one. In terms of performance, I can't really tell you anything since this is the first time I installed Dreambooth and haven't trained anything yet. My issue was purely a issue with PIP not having the correct flags or my installed version of PIP bugging out.
That seems to be a completely different issue. But something that comes to mind is that windows update will always try to replace the graphics driver and it usually is a much older version or a bugged one, and maybe dreambooth or torch needs a newer one. In terms of performance, I can't really tell you anything since this is the first time I installed Dreambooth and haven't trained anything yet. My issue was purely a issue with PIP not having the correct flags or my installed version of PIP bugging out.
I'm using the latest driver as per Geforce Experience, and using the same driver version on both the older and newer versions of dreambooth. I tested them both today.
I figured it have been relevant because I was having this same level of performance when I was using xformers 0.0.20, and the current version of the extension wasn't allowing me to choose xformers in the UI. Once I was able to install 0.0.21, I was able to choose xformers in the UI, but performance was still the same slower level it was before.
Ah, as far as I know the difference between versions is not in performance but rather in precision and/or available features
So, there are several things going on here, I think, that are mostly out of my control:
The xformers version you can use is dependent on OS, Torch version, and a few other things, but as long as it's >= 0.0.20, it should be fine.
AUTO, in his infinite wisdom, decided to make it really REALLY hard to use any other xformers version. Apparently, you maybe can try setting --skip-version-check, which, according to the docs, enables "Do not check versions of torch and xformers".
As such, I'll probably just roll back to 0.0.20. Also, you need to have --xformers specified in your commandline args, else auto will completely break it, everywhere.
This issue is stale because it has been open 5 days with no activity. Remove stale label or comment or this will be closed in 5 days
Is there an existing issue for this?
What happened?
The install script fails to install the needed version of xformers and falls back using the one provided by WebUi due to a couple of issues. I'm running on arch and my WebUi is: version: v1.7.0 • python: 3.11.6 • torch: 2.0.1+cu118 • xformers: 0.0.20 • gradio: 3.41.2 • checkpoint: 6f80073c93 First it fails with
no such option: --index-url https://download.pytorch.org/whl/cu118
, which can be fixed by replacing in postisntall.py line 191--index-url
with-i
After that is resolved it fails with:Error occurred: Looking in indexes: https://download.pytorch.org/whl/cu118 WARNING: Location ' https://download.pytorch.org/whl/cu118/xformers/' is ignored: it is either a non-existing path or lacks a specific scheme. ERROR: Could not find a version that satisfies the requirement xformers==0.0.21 (from versions: none) ERROR: No matching distribution found for xformers==0.0.21 WARNING: There was an error checking the latest version of pip.
. Entering the url in a browser shows that xformers is only available from version 0.0.22 and up.Steps to reproduce the problem
Commit and libraries
Dreambooth revision: 22e5440e15eea1be6c8f8ce407d2d8c273b2cc9c Checking bitsandbytes... Checking bitsandbytes (Linux) Checking Dreambooth requirements... [Dreambooth] accelerate v0.21.0 is already installed. [Dreambooth] dadaptation v3.1 is already installed. [Dreambooth] diffusers v0.23.1 is already installed. [Dreambooth] discord-webhook v1.3.0 is already installed. [Dreambooth] fastapi is already installed. [Dreambooth] gitpython v3.1.40 is already installed. [Dreambooth] pytorch_optimizer v2.12.0 is already installed. [Dreambooth] Pillow is already installed. [Dreambooth] tqdm is already installed. [Dreambooth] tomesd v0.1.2 is already installed. [Dreambooth] tensorboard v2.13.0 is already installed. [!] xformers version 0.0.20 installed. [+] torch version 2.0.1+cu118 installed. [+] torchvision version 0.15.2+cu118 installed. [+] accelerate version 0.21.0 installed. [+] diffusers version 0.24.0 installed. [+] bitsandbytes version 0.41.2.post2 installed.
Command Line Arguments
Console logs
Additional information
Correction: I just found out a solution: Using
-f
or--find-links
instead of--index-url
in postinstall.py will fix both issues and the script will install the required xformers version.