AI-Friends icon indicating copy to clipboard operation
AI-Friends copied to clipboard

Issue with Donwloading the model and running generate?

Open Maki9009 opened this issue 2 years ago • 2 comments

It took awhile to download the model, and I'm not even sure where it downloaded.. i think u need to add a button to show where the download folder is, to make sure it did download or not or for sure. And i think you should add the ability for people to find their already downloaded safetensor models, and convert them to diffusers

this is the error i got, after 1.5 supposedly downloaded and me trying to generate a normal image:

C:\Program Files (x86)\StableDiffusionDeluxe\venv\lib\site-packages\setuptools\installer.py:27: SetuptoolsDeprecationWarning: setuptools.installer is deprecated. Requirements should be satisfied by a PEP 517 installer. warnings.warn( C:\Program Files (x86)\StableDiffusionDeluxe\venv\lib\site-packages\setuptools\command\easy_install.py:144: EasyInstallDeprecationWarning: easy_install command is deprecated. Use build and pip and other standards-based tools. warnings.warn( C:\Program Files (x86)\StableDiffusionDeluxe\venv\lib\site-packages\setuptools\command\install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools. warnings.warn( Exception in thread Thread-244 (run_diffusion): Traceback (most recent call last): File "C:\Users\mahmo\AppData\Local\Programs\Python\Python310\lib\threading.py", line 1016, in _bootstrap_inner self.run() File "C:\Users\mahmo\AppData\Local\Programs\Python\Python310\lib\threading.py", line 953, in run self._target(*self._args, **self._kwargs) File "C:\Program Files (x86)\StableDiffusionDeluxe\venv\Stable-Diffusion-Deluxe.py", line 2701, in run_diffusion start_diffusion(page) File "C:\Program Files (x86)\StableDiffusionDeluxe\venv\Stable-Diffusion-Deluxe.py", line 16571, in start_diffusion generator = torch.Generator("cuda").manual_seed(rand_seed) RuntimeError: Device type CUDA is not supported for torch.Generator() api.

Maki9009 avatar Aug 29 '23 13:08 Maki9009

So trying to figure out the best way to resolve this issue.. As I've mentioned before, I haven't tested enough on the local desktop due to my personal GPU being trash, so I appreciate the bug reports,, Now to figure out how to fix.. The error coming from the line running torch.Generator("cuda") is strange since it seems pretty basic. When I looked up that RuntimeError, looks like the cause is from it having an incompatible version of torch or CUDA installed on the venv. I have it setup to install torch if it's not found or version below 2.0 using "pip install -U --force-reinstall torch torchvision torchaudio --index-url https://download.pytorch.org/whl/cu118" which possibly wasn't working on your computer. Wondering if in your console you saw the message "Installing PyTorch 2.0.1 with CUDA 11.8"? When looking into troubleshooting the error, one cause is an older version of the NVidia drivers which isn't compatible with cuda 1.18, so if you run "nvidia-smi" from your terminal, tell me what CUDA Version number you see on the top right. Maybe updating your vid drivers could fix the issue. Also curious what torch version is installed, which you can see running "pip freeze", but you may have to check it after activating the virtual environment in command prompt. Ideally we want to see torch==2.0.1 so I'm thinking on my install line I should explicitly state that version number. This isn't the kind of problem I enjoy troubleshooting, but hopefully my suggestions make sense and we can get it working. Was much easier debugging in Colab since it's consistent and has cuda/torch preinstalled. Lemme know how it goes and hopefully there's something I can correct on my end to prevent others from getting this issue.. Thanks.

Skquark avatar Aug 30 '23 04:08 Skquark

Checking if you got this working on your end... You may want to download latest setup and reinstall it, updated some of the bat files, and even included a debug-venv.bat that lets you open command prompt easily inside the virtual environment to manually run installs and see what the error messages are saying. I hide the console outputs when I install things to make it cleaner, but sometimes if things don't work it's harder to know what's up. Installing Torch & CUDA can be tricky on some systems, but trying to make things universal as long as GPU is supported. Hope it's good now, please let me know.

Skquark avatar Sep 06 '23 00:09 Skquark