-
Notifications
You must be signed in to change notification settings - Fork 179
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]: Stable Diffusion uses CPU instead of GPU (RX580 8gb) #433
Comments
|
Now PC crashes on generation
|
change you argument: after torch reinstall close SD and remove that "reinstall-torch" from startup argument. |
I already did. When running When running this webui-user:
I get this message back:
It basically forces me to use torch 2.0.0+cpu. |
you do not need --skip-torch-cuda-test when installation done correctly and using use-directml argument. Remove --skip-torch-cuda-test from COMMANDLINE_ARGS. Add --reinstall-torch argument to COMMANDLINE_ARGS. Remove that "pip install torch" and "pip uninstall torch-directml" from start of the file because that --reinstall-torch will call pip install and if you using wrong torch depending other startup arguments it will install correct torch-version after torch reinstall and SD starts remove reinstall argument. Try this (example):
you also using old AMD card so precision full and no-half + no-half-vae neccessary if you are using upscalers. if you still face some error text try to open CMD from stable-diffusion-directml folder (right click inside a folder "run control panel" or type CMD directly to file direction field. After CMD opens type:
after requirements are installed or there was nothing to install and still SD not open. Copy/paste error here again. |
Re
@Shefu88 Thank you so much. 🙏🏼 I just realized I forgot (Thanks for the tips about torch installer) |
@Shefu88 It broke again. Was doing good, about 30sec. per generation while running: So to try I've put in the arguments you suggested, never worked again since. Tried running the old argumens, deleteting the /venv folder, re-did - This session below was recorded before the system crashed at generation: Webui-user.bat:
Running instance:
I'm running out of ideas. |
Hmmm, So it worked first but after restart it didn't? This is just a wild guess but try this: Open cmd inside stable-diffusion-directml folder. After pip is upgraded to ver 24 type: Webui.bat --use-directml --reinstall-torch. You can also try to delete whole venv folder and start webui-user.bat by using only --use-directml and --reinstall-torch. Do not use other arguments. Try that. If it is booting addone by one those performance arguments so you can keep up what is causing startup errors. |
Ok running: .\venv\scripts\activate surely made some progress. 👍🏼
Now an old issue popped out again that I think @lshqqytiger should be made aware of. What solved the problem was removing I wouldn't know how to debug it as the argument just crashes everything, so I wouldn't know how to pull a crash report from it. It's not that big of a deal but kinda is, as it is required to run Inpainting. I can live without it but for others it's certainly a feature that's missing. |
Try to use --precision full --no-half --medvram --no-half-vae --use-directml Is there any difference? Btw. How much RAM you have in your PC. I was thinking is this even a GPU/SD releated problem. |
Unfortunately not. System really doesn't like having I'm running 16 gigs ddr3 (It's quite an old machine but still works fine). |
Is there any progress @erixwd with this issue? If not, check these: You do not have any other than 3.10.6 python installed in your computer. If you don't have other python version on your PC: Check from device manager that your external GPU have no issues. Double check you have newest and correct AMD drivers to your system and GPU. After these checks. Try to start SD from terminal using only --use-directml argument. Like this: If you can boot to UI stage post screenshot or post information from footer section(bottom of your webui where is torchversions and etc). Before trying to generate something USE only SD1.5 base model. If you can't boot up to webUI and terminal says you do not have proper GPU. Answers needed:
|
@erixwd Also using AMD RX580 8GB. The only way I got it working is by deleting venv folder, add these args to webui-user.bat: --use-directml --opt-sub-quad-attention --disable-nan-check --opt-split-attention, then run webui-user.bat The RX580 works great using Euler a sampler. Would recommend do not upscale too much - crashes drivers. Use 512x512 by sampler and don't upscale past 930x930. Do not update to V1.9.0 at this moment. Not sure if it does not like the rx580 but it just breaks everything. Stay on V1.8 Edit: Also I highly recommend undervolting your card , temps get insane if you don't. |
@erixwd I have an RX 580 as well. I tried to run through Zluda and Directml but it never works. But I was able to run with Directml, you need to reinstall Python 10.6 and add it to the PATH (select the checkbox when installing). Install AMD HIP SDK and restart the PC. Next, download Stable Diffusion: git clone https://github.com/lshqqytiger/stable-diffusion-webui-directml. Paste it to the path C:\Users\your user. Before launching it (EXACTLY BEFORE), change the arguments in “webui user.bat” to set “COMMANDLINE_ARGS= --use-directml --opt-sub-quad-attention --no-half --disable-nan-check --autolaunch”. Only then run “webui user.bat”. |
Checklist
What happened?
It's been months since I started diving into this problem and it's driving me crazy. Up until some version (it's been a while I'm not sure whitch one) my GPU just kissed goodbye to processing and I cannot figure out how to resolve this issiue.
I tried basically everything in my basic knowledge of compatibility issiues: drivers both PRO and Adrenalin, every version of python and torch-directml, every version of onnx-directml but it still doesn't give any sign of life.
It takes more than 20 minutes for a 512x786 on my poor i5 4460 so I really would like to get to the other side of this.
Steps to reproduce the problem
What should have happened?
GPU should accept processing of the image.
What browsers do you use to access the UI ?
Google Chrome
Sysinfo
sysinfo-2024-03-30-22-29.json
Console logs
Additional information
I'm running on a Msi RX580 8gb Armor with Adrenalin 24.3.1 up to date | Windows 10 | Chrome Browser | No extensions
The text was updated successfully, but these errors were encountered: