Hello, I'm from Brazil, I'm infinitely grateful for your tutorial, not even on the official AMD website do they teach this, thank you very much for the video, all the best to you!
Excellent tutorial! Very good!!! It worked here, and I can use my 4GB AMD GPU again. Thank you, I appreciate you sharing this knowledge. I left a like and you gained another subscriber! Congratulations on the channel 🙌🙏
For people that don't know how to open a given folder in CMD: click the big bar in top of your folder, then write there "cmd". Then the folder will open in CMD by itself.🎉
Thank you! I updated SD and it stopped working and this fixed my issue! My AMD isn't as fast as Nvidia at this stuff, but it's still way faster than using my CPU.
@@stuffaboutstuff4045 thank you for this guide! followed AMD's guide that gave me same Cuda error, I followed your steps and now my webui works :) it's March, one would think it would've been fixed by now?
@@_TrueDesire_ hey, sorry to bug you, what "AMD's guide" are you referring to? i only find paindull stuff on google, and that sounds as if it could at least help me cover the basics :D
If you get the error: "AttributeError: module 'torch' has no attribute 'dml'"; Return to the commandline virtual environment and run the following: pip install torch-directml
Thanks for the nice feedback! Agreed, people in this community have been stunning in helping out and supplying new input into this topic. Glad you are up and running.
THANK YOU SO MUCH. I was searching for a solution but nothing worked. now everything is working really good. I still had some error, but changing the Arguments to set COMMANDLINE_ARGS=--use-directml --medvram --precision full --no-half --no-half-vae --opt-split-attention-v1 --opt-sub-quad-attention --disable-nan-check worked for my 6700 xt
Thank you very much for this tutorial. I tried several and the error persisted. I found this one and said to myself, this is the last attempt, and it worked, you're the man, Thank You Very Much.
I have taken every step to install automatic 1111 on AMD VGA according to the video on this channel, but when I try to execute the webui-user.bat file using administrator still "torch is not able to use gpu" when I try to skip the gpu check, it can open the automatic window 1111, but still when rendering the image midway still and there is word 'error' torch is not able to use gpu I don't know what's wrong, maybe installing a new torch is not accompanied by uninstalling the old torch... but I can't fix it either. 😪
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
Thank you very much, the problem still exists and after reinstalling repository and making all steps in this video i finally can use Stable Diffusion, after six hours of trying to solve the problem!
Great to hear! Glad the video assisted. what happens when you launch olive support. Let me know if you got this sorted out. Thanks for reaching out and for the feedback.
Thank you for your video man ! Nice explanations and thanks to this videos comments all my problems were fixed, I just don't know if removing the "--onnx" command will change something but now my CPU can breath !
Great to hear! Thanks for the nice feedback, much appreciated! Glad your up and running. Agreed, people in this community have been stunning in helping out and supplying new input into this topic.
Thanks for your help, it's have fixed my issue, Now it works much faster with my 7900GRE but i had to remove the cmd --onnx that create me an other issue
Eres mi nuevo Dios, trabajé perfectamente. Pasé como una semana buscando alguna solución, hasta que encontré tu video. Eres el mejor, muchas gracias amigo. rx 580 8gn nitro
great video. I had some issues and want to add what fixed them for me in case people still have issues. After everything in this video I also had to instal Visual Studio Community and delete the vent folder and let it recreate it on first launch
EDIT: I think I fixed it? See below... Can anyone help please? Performed steps in original video and in this video. My issue is that is seems like my install is ignoring any and all changes that I make to my webui-user.bat. I'm running Windows 11 and have a Ryzen 7 7840 with an 780M GPU. Ultimately, when I run webui.bat, I still get "RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check" - Its maddening I've even tried adding these arguments to my webui-user.bat and it still gives me the same mindless error about "not able to use GPU" X_X: --use-cpu all --precision full --no-half --skip-torch-cuda-test Of course, I first tried only "--use-directml" but it doesnt do anything. Any help would be appreciated. Thank you I eventually updated my webui-user.bat to the following args: set COMMANDLINE_ARGS=--use-directml --opt-sub-quad-attention --no-half --disable-nan-check --autolaunch Then I STILL couldnt run webui.bat, got the same error, so something is definitely wrong with the script somewhere... HOWEVER, I then went into command prompt into my stable diffusion git-cloned directory and from command prompt I simply ran "webui-user.bat" and I waited forever for it to download and install things, and I walked away from my PC and like 10 minutes later, I came back to my PC and the webui was open! I then selected stable diffusion 1.5 from the dropbox, and typed in "a bear" and I saw my GPU being utilized 100% and in under 1 minute I had an Ai-made 'bear' image! Good times! :) In other words, once you have everything installed the first time, DONT use the "webui.bat" to open the Web UI....use the webui-user.bat file, and if you followed the other instructions in this video here, it should open fine after some time. Good luck to everyone else, hope this maybe helps.
I am now running A1111 DIRECTML version using ZLUDA (--use ZLUDA) Setup is hard, but is way more flexible as it uses ROCm as "cuda" cores. Only about 20% slower than using ROCm in Linux
I used the first video to reinstall SD. Then I used this video to fix the issue. Happy to report that after 3 months, Stable Diffusion is using my AMD gpu again!! Thanks for the straight forward video!!
@vikasverma2580 it depends on what gpu you have and how big the image you want to generate is. I have a 6700xt and it takes me about 45-60 seconds to generate a 720x424 image. The only command line argument i use right now is --use-directml
Work for me doing 2 changes: 1) I didn't add --onnx to webui-user.bat 2) I didn't install pip install httpx==0.24.1 (I keep with 0.24.0) Man, I tried for 7 hours to install SD without success. Your video saved me. Thank you very much for the contribution, it has been very helpful. Thank youuu!!!!!!!
This is a godsent, thank you! I followed the guide to the dot and it now completely uses the 7800xt instead of CPU. The only issue I have now that I need to use the administrative cmd in order to open SD, else I'll get a fatal: detected dubious ownership in repository error.
Glad you are up and running on the GPU. SD needs admin mode. I think the code is well vetted and a huge repository being reviewed👨💻 , so "hopefully" is safe. Thanks for reaching out!
For those saying it doesn't work, make sure you git clone the specific git repo linked in this video. Making the changes on the original A1111 repo will not work.
me ayudo, lo estoy haciendo desde una amd rx5500 con 8 gb de ram y ahora si dejo de usar la cpu para correr con la gpu y es una maravilla :D, dejame invitarte un cafe :D
Hi, thank you for the feedback. I am glad the video helped and you are up and running! Always appreciate a good cup of coffee ☕ Thanks for reaching out.
Hi, thanks for the feedback. I am glad you could get this working only by following the screen instructions. Thanks for the nice feedback, appreciated.
Hi, you can open task manager and then performance, when you produce an image you should see your GPU spiking, you should be able to see if is using the GPU to its full potential. Glad you are up and running and thanks for reaching out.
Fix for who has problem with No module named 'keras.__internal__' cmd on sd web ui directories venv\Scripts\activate pip install onnxruntime-directml pip install torch-directml pip install keras pip install tensorflow
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
hello i fully followed the tutorial but it says RuntimeError: Could not allocate tensor with 67108864 bytes. There is not enough GPU video memory available! even i used the --lowvram parameter
Hi, Have a look at the link below github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs *For many AMD GPUs, you must add --precision full --no-half or --upcast-sampling arguments to avoid NaN errors or crashing. If --upcast-sampling works as a fix with your card, you should have 2x speed (fp16) compared to running in full precision. You can also try www.reddit.com/r/StableDiffusion/comments/11hhnkj/error_code_runtimeerror_amd_work_around_or/ --opt-split-attention --lowvram --disable-nan-check --autolaunch (but this will make it slow) Let me know if this helps.
@@stuffaboutstuff4045 thanks for the --opt-split-attention but it didn't fix it, it worked a bit for the prompt "cat" but when i give a bit more complicated prompt like cat with hat, it gives the could not allocate tensor error (rocm and onnx doesn't seem to work when i try) (i already tried the amd fork one)
Hi, Thanks for reaching out. I built SD again today and the file is there and should be under YourProjectFolder\stable-diffusion-webui-directml equirements.txt Let me know if all resolved..
might be a fix for some people: i found out that despite installing the 3.10.6 version of python, it was still using an older version of python I had installed instead so make sure you completely uninstall any older versions you have first
Hi, After I edit the requiremenets_version.txt. and run the install requiremenets, I get this error: ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none) ERROR: No matching distribution found for torch-directml
Hi, did you follow the steps in the original video posted first. Takeaways from the first video rum command prompt in admin mode make sure to use correct Python version. Let me know if you still get this?
Hi, just checking in if you you managed to resolve this. Did you follow both AMD SD videos on the channel? Maybe just try and build again from scratch. You can also try and launch it first time by adding --skip-torch-cuda-test to COMMANDLINE_ARGS. Check if you just get it up first and working then revert back to getting your AMD card and the SW up and running.
HELLO, error after all steps: ERROR: Invalid requirement: 'torch=directml': Expected end or semicolon (after name and no valid version specifier) torch=directml ^ (from line 40 of requirements_versions.txt) Hint: = is not a valid operator. Did you mean == ?
Hi, just checking in if you were able to resolve, just check the notation here. You need to add torch-directml to the end of requirements_versions.txt you have the = operator. Let me know if you came right. Thanks for reaching out.
Hi, Agreed AMD is a struggle to get working on most AI apps. Just want to check, you followed all the basics. Run all commands in admin mode. Use correct version of Python. Did you follow all the steps in the original video including required SW. ruclips.net/video/POtAB5uXO-w/видео.html
I added exactly the same command lines on the proper files and the error still persists: Traceback (most recent call last): File "G:\StableDiff\stable-diffusion-webui\launch.py", line 48, in main() File "G:\StableDiff\stable-diffusion-webui\launch.py", line 39, in main prepare_environment() File "G:\StableDiff\stable-diffusion-webui\modules\launch_utils.py", line 384, in prepare_environment raise RuntimeError( RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Hi, Just want to check, you followed all the basics. Run all commands in admin mode. Use correct version of Python. Did you follow all the steps in the original video including required SW. ruclips.net/video/POtAB5uXO-w/видео.html Let me know...
I followed the steps as is but I have two problems, if I put --onnx in the bat it tells me that it does not recognize the --onnx command, if I put COMMANDLINE_ARGS=--use-directml --medvram --precision full --no-half --no-half-vae --opt-split-attention-v1 --opt-sub-quad-attention --disable-nan-check as I found in the comments it shows that module torch has no attribute dml
Hi, let me know if you managed to resolve this. Just to confirm you are on Windows. You can try: venv\Scripts\activate pip install onnxruntime-directml pip install torch-directml pip install keras pip install tensorflow Otherwise: delete venv Try and launch SD using skip cuda test arg. Let it build and open. Then use -use-directml in the args. Let me know if that helps, hope you are up and running soon.
Hi, let me know if you managed to resolve this. Just to confirm you are on Windows. You can try: venv\Scripts\activate pip install onnxruntime-directml pip install torch-directml pip install keras pip install tensorflow Otherwise: delete venv Try and launch SD using skip cuda test arg. Let it build and open. Then use -use-directml in the args. Let me know if that helps, hope you are up and running soon
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
Hi, I did everything as in the video and I get a new error "ModuleNotFoundError: No module named 'pillow_avif', I installed the library with "pip install diskcache" and "pip install Pillow-avif-plugin" and the installation was successful, but the error persisted. Can you tell me how to fix it?
Hi, did you manage to resolve this. Did you followed the steps in both videos. Also ensure all the required SW etc. Let me know if you are up and running..
@@stuffaboutstuff4045 Thanks for the answer. Yes, I managed to solve the issue. I had to reinstall all the libraries and I accidentally deleted the .bat😅
Hi, no everything should work fine. I was trying to communicate that this problem will be fixed somewhere on the Repo so if you need to reinstall just first check if bug is resolved using the usual process first.
I followed the directions and I get an error ImportError: DLL load failed while importing onnxruntime_pybind11_state: A dynamic link library (DLL) initialization routine failed. Press any key to continue . . . How do i fix it?
Hi, just checking if you are up and running and if it was due to required software not installed. Thanks for reaching out. Let me know if you are up and running.
I did all the steps and it worked I got the webui I couldn't connect it to the sillytavern then I reset the PC but then Stable diffusion started to give me the same error as last time.
Hi. I followed every step 3 times, but it didn't help. I have an AMD processor with an integrated GPU, however I also have an RTX series GPU. Maybe stable diffusion doesn't see my external GPU and only sees CPU's GPU?
Hi, just checking if you came right with your problem. Did you try and disable the onboard in the BIOS. SD should use your default GPU in Windows. You can check in PowerShell or DX what it is defaulting to. Let me know if you are up and running.
@@stuffaboutstuff4045 Hi. Thanks for the reply. So, first of all, I tried to disable "integrated GPU" in Windows 10, but it didn't work. Secondly, I tried to disable in BIOS "integrated GPU" and this didn't help either. Any ideas?)
all worked except requirements.txt why would that fail? i typed pip install -r requirements.txt Also note there is already a requirements.txt file in SD folder so do I have to do this step? Does the command ONLY add something to the existing requirements.txt? if so what does it add?
Hi, the command install the contents of the file. When installing carefully check the type of prompt windows I am in. Make sure you execute the command from the folder where the file resides. Let me know if you got everything up and running. Thanks for reaching out.
I followed this video about fix, and still getting error: launch.py: error: unrecognized arguments: --onnx --onnx is not an option in launch.py At least for me :( How to get onnx tap?
bro i think i found a fix. I deleted the venv Folder, deleted the --onnx in my webui-user.bat. so only: "set COMMANDLINE_ARGS=--use-directml" then I ran the webui-user.bat and let it do its thing. I downloaded everything it needed and voila everything works finde. SD is now using my RX6700 XT correctly
@@cerb92 Thanks ! I had the same error and it works fine and finally on my GPU now, my CPU can breath ! The only downside is that I can only star SD from the cmd and not just by clicking on webui-user.bat in my SD folder, but I can manage it's worth my time !
Hi, apologies for the late reply. The video uses local install not using a "full" Anaconda environment. If you installed SD in an Anaconda Environment then you will use Anaconda Terminal and complete the steps. The videos is normal local install using Admin command prompt. Let me know if you are up and running.
Hi, thanks for reaching out.. Initial scan might correlate to delete venv folder and try again. github.com/lshqqytiger/stable-diffusion-webui-directml/discussions/368 Just want to check, you followed all the basics. Run all commands in admin mode. Use correct version of Python. Did you follow all the steps in the original video including required SW. ruclips.net/video/POtAB5uXO-w/видео.html Let me know...
after u ran pip install requirements, where it says successfully uninstalled torchvision, on mine it says "successfully uninstalled numpy-2.0.0". is this the reason this fix is not working for me, and how do i fix this?
Hi, did you come right with this. I think its trying to rollback to Numpy 1.xx which is fine. Does that happen? Also confirm your Python version and just carefully retrace steps. Worst come to worst build it again quickly in a new Anaconda environment and check if you end up with the same issue. Can you confirm steps in both the Videos on the channel were followed. Let me know and thanks for reaching out.
Hi, did you add it to requirements file. Check the step 1:10 in the video. Just want to check, you followed all the basics. Run all commands in admin mode. Use correct version of Python. Did you follow all the steps in the original video including required SW. ruclips.net/video/POtAB5uXO-w/видео.html Let me know...
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
Hi, just checking if you resolved this issue. If not have a look at the link below. Let me know if you are up and running. stable-diffusion-art.com/sdxl-model/
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
Thank you for this tip. SD programs can now use AMD GPUs as before, but a new problem has arisen. The picture that came out was not the picture I wanted. It came out like a group of melted paint blobs on a canvas that didn't have the shape of things or people. I'd like to know how to fix this because I'm really at a loss and give up right now hahaha.
@@piyaphumL. I believe i can help, if youm search up memory optimizations stable diffusion in google itll show a git page called optimizations . AUTOMATIC1111 that will have a library of optimizations, the one that made mine work was insterting --opt-sdp-no-mem-attention into the webui-user.bat text on the line for set COMMANDLINE_ARGS. So all in all it should look like: set COMMANDLINE_ARGS= --use-directml --opt-sdp-no-mem-attention . This works on my really high performance amd card so if you have a similar kind of card it should work. If its not as powerful the other arguments on the page may work.
Hi, you need to add your arguments according to the memory and spec of your AMD GPU. If you have 4-6gb vram, try adding these flags to webui-user.bat like so: COMMANDLINE_ARGS=--opt-sub-quad-attention --lowvram --disable-nan-check For many AMD GPUs, you must add --precision full --no-half or --upcast-sampling arguments to avoid NaN errors or crashing. If --upcast-sampling works as a fix with your card, you should have 2x speed (fp16) compared to running in full precision. Have a look at this page for the options. github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs
Hi, thanks for reaching out. Are you on the correct version of Python? Did you follow the steps in the original video? Let me know if problem persists...
Hello, I'm from Brazil, I'm infinitely grateful for your tutorial, not even on the official AMD website do they teach this, thank you very much for the video, all the best to you!
Hi, thanks for reaching out. Glad the video assisted.
also from brazuca baby
Excellent tutorial! Very good!!! It worked here, and I can use my 4GB AMD GPU again. Thank you, I appreciate you sharing this knowledge. I left a like and you gained another subscriber!
Congratulations on the channel
🙌🙏
Hi, thank you so much for the generous feedback. Appreciated! Glad you are up and running again.
For people that don't know how to open a given folder in CMD: click the big bar in top of your folder, then write there "cmd". Then the folder will open in CMD by itself.🎉
Thanks 😊
Thanku😂
literally i was stucked at the same point so long searching for it
it does not open as administrator
Thank you! I updated SD and it stopped working and this fixed my issue! My AMD isn't as fast as Nvidia at this stuff, but it's still way faster than using my CPU.
Great to hear! Glad you are sorted.
what gpu u using ?
@@stuffaboutstuff4045 thank you for this guide! followed AMD's guide that gave me same Cuda error, I followed your steps and now my webui works :) it's March, one would think it would've been fixed by now?
@@_TrueDesire_ hey, sorry to bug you, what "AMD's guide" are you referring to? i only find paindull stuff on google, and that sounds as if it could at least help me cover the basics :D
If you get the error: "AttributeError: module 'torch' has no attribute 'dml'"; Return to the commandline virtual environment and run the following: pip install torch-directml
Thanks for sharing.
THANK YOU. You're a genius and an absolute credit to this community. Can't thank you enough for your amazing help, wish you the best!
Thanks for the nice feedback! Agreed, people in this community have been stunning in helping out and supplying new input into this topic. Glad you are up and running.
Absolute legend! I've watched about 20 different videos on this issue and yours worked! Thank you!!!
Hi, Thanks for the feedback! Much appreciated.
THANK YOU SO MUCH. I was searching for a solution but nothing worked. now everything is working really good. I still had some error, but changing the Arguments to set COMMANDLINE_ARGS=--use-directml --medvram --precision full --no-half --no-half-vae --opt-split-attention-v1 --opt-sub-quad-attention --disable-nan-check worked for my 6700 xt
Great to hear! Glad you are up and running again. Thanks for the feedback..
Thank you very much for this tutorial.
I tried several and the error persisted. I found this one and said to myself, this is the last attempt, and it worked, you're the man, Thank You Very Much.
You're welcome! Thanks for the feedback much appreciated. I am glad the video could assist you.
I have taken every step to install automatic 1111 on AMD VGA according to the video on this channel, but when I try to execute the webui-user.bat file using administrator still "torch is not able to use gpu" when I try to skip the gpu check, it can open the automatic window 1111, but still when rendering the image midway still and there is word 'error' torch is not able to use gpu I don't know what's wrong, maybe installing a new torch is not accompanied by uninstalling the old torch... but I can't fix it either. 😪
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
You Sir, are a godsend. Fixed the issue after 3 hours of different shitty videos explaining it poorly. Thank you so much.
Pleasure, glad the video assisted.
Thank you very much, the problem still exists and after reinstalling repository and making all steps in this video i finally can use Stable Diffusion, after six hours of trying to solve the problem!
Glad it helped and that you are up and running. Thanks for the feedback, much appreciated.
thank you very much! at first i thought my system is trolling me but i just had a typo in the requirements file and now its working :D
Glad to hear that you are up and running. Thanks for the feedback.
Thank you so much! after so many videos and blog posts this worked for me, running RX 7800 xt, however still not able to run olive
Great to hear! Glad the video assisted. what happens when you launch olive support. Let me know if you got this sorted out. Thanks for reaching out and for the feedback.
im trying with the same gpu but still getting the same error. any tips?
hey thank you very much. took forever till I realized my graphics card is the problem. After hours this video finally gave me a solution.
Thanks. Appreciate the feedback.
Ty i struggled for like 3h, gave up then some day later found your video and its working
No problem 👍 Glad the video got you up and running. Thanks for the feedback.
Thank you for your video man ! Nice explanations and thanks to this videos comments all my problems were fixed, I just don't know if removing the "--onnx" command will change something but now my CPU can breath !
Great to hear! Thanks for the nice feedback, much appreciated! Glad your up and running. Agreed, people in this community have been stunning in helping out and supplying new input into this topic.
Thanks for your help, it's have fixed my issue, Now it works much faster with my 7900GRE but i had to remove the cmd --onnx that create me an other issue
Glad it helped, thanks for the feedback.
Huge ups, brother! Thank you so much! Also, I love the accent. Have a great day!
Pleasure! Glad the video assisted. Thanks for the feedback!
Eres mi nuevo Dios, trabajé perfectamente. Pasé como una semana buscando alguna solución, hasta que encontré tu video. Eres el mejor, muchas gracias amigo. rx 580 8gn nitro
Thanks for the feedback! Glad to hear this video could help you out after your week of searching.😉 Again, thanks for the nice comments!
great video. I had some issues and want to add what fixed them for me in case people still have issues. After everything in this video I also had to instal Visual Studio Community and delete the vent folder and let it recreate it on first launch
Hi, Glad you are up and running. Thanks for sharing this procedure and for reaching out.
Funcionou perfeitamente meus parabéns nota 10
Glad to hear you are up and running and everything works. Thanks for the feedback.
I have an error : ERROR: Could not open requirements file: [Errno 2] No such file or directory: 'requirements.txt'
Hi, can you see the file when you browse to it using Windows explorer?
EDIT: I think I fixed it? See below... Can anyone help please? Performed steps in original video and in this video. My issue is that is seems like my install is ignoring any and all changes that I make to my webui-user.bat. I'm running Windows 11 and have a Ryzen 7 7840 with an 780M GPU.
Ultimately, when I run webui.bat, I still get "RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check" - Its maddening
I've even tried adding these arguments to my webui-user.bat and it still gives me the same mindless error about "not able to use GPU" X_X:
--use-cpu all --precision full --no-half --skip-torch-cuda-test
Of course, I first tried only "--use-directml" but it doesnt do anything.
Any help would be appreciated. Thank you
I eventually updated my webui-user.bat to the following args: set COMMANDLINE_ARGS=--use-directml --opt-sub-quad-attention --no-half --disable-nan-check --autolaunch
Then I STILL couldnt run webui.bat, got the same error, so something is definitely wrong with the script somewhere...
HOWEVER, I then went into command prompt into my stable diffusion git-cloned directory and from command prompt I simply ran "webui-user.bat" and I waited forever for it to download and install things, and I walked away from my PC and like 10 minutes later, I came back to my PC and the webui was open! I then selected stable diffusion 1.5 from the dropbox, and typed in "a bear" and I saw my GPU being utilized 100% and in under 1 minute I had an Ai-made 'bear' image! Good times! :)
In other words, once you have everything installed the first time, DONT use the "webui.bat" to open the Web UI....use the webui-user.bat file, and if you followed the other instructions in this video here, it should open fine after some time.
Good luck to everyone else, hope this maybe helps.
Hi, glad to hear you are up and running!
Sir u dont khow how much u have helped me ive been running errors for 4 day and u solved every problem with the codes
Hi, thanks! Great to hear you sorted out and back on track..
I am now running A1111 DIRECTML version using ZLUDA (--use ZLUDA)
Setup is hard, but is way more flexible as it uses ROCm as "cuda" cores.
Only about 20% slower than using ROCm in Linux
how?
Hi, glad to hear you up and running.
I used the first video to reinstall SD. Then I used this video to fix the issue. Happy to report that after 3 months, Stable Diffusion is using my AMD gpu again!! Thanks for the straight forward video!!
how much time does it take to generate 1 image on amd
@vikasverma2580 it depends on what gpu you have and how big the image you want to generate is. I have a 6700xt and it takes me about 45-60 seconds to generate a 720x424 image. The only command line argument i use right now is --use-directml
Thanks for the feedback, glad to hear the video helped out..
Fixed my issue, thanks for the video!
You're welcome! Thanks for the feedback, much appreciated.
I spent hours looking for a solution, thank you!
Hi, glad to hear the video helped. Thanks for the feedback.
may you be blessed with eternal health :) why make it complicated when you can always show it as easy as you do, thank you :)
Thanks! Appreciated..
Works nicely with my 6700 XT :) just need to spend time fine-tuning with different settings etc.
Glad to hear you are up and running! Thanks for the feedback.
Work for me doing 2 changes:
1) I didn't add --onnx to webui-user.bat
2) I didn't install pip install httpx==0.24.1 (I keep with 0.24.0)
Man, I tried for 7 hours to install SD without success. Your video saved me. Thank you very much for the contribution, it has been very helpful. Thank youuu!!!!!!!
Thanks for sharing feedback, glad the video helped out. Much appreciated!
This is a godsent, thank you! I followed the guide to the dot and it now completely uses the 7800xt instead of CPU.
The only issue I have now that I need to use the administrative cmd in order to open SD, else I'll get a fatal: detected dubious ownership in repository error.
Glad you are up and running on the GPU. SD needs admin mode. I think the code is well vetted and a huge repository being reviewed👨💻 , so "hopefully" is safe. Thanks for reaching out!
For those saying it doesn't work, make sure you git clone the specific git repo linked in this video. Making the changes on the original A1111 repo will not work.
Thanks for noting this. Yep will only work on the AMD fork of the project. Thanks for the feedback.
me ayudo, lo estoy haciendo desde una amd rx5500 con 8 gb de ram y ahora si dejo de usar la cpu para correr con la gpu y es una maravilla :D, dejame invitarte un cafe :D
I HAVE A RX 5500 XT MODEL GPU CARD CAN YOU HELP ME? I CANNOT SET IT UP AND IT ALWAYS GIVES ERROR
Hi, thank you for the feedback. I am glad the video helped and you are up and running! Always appreciate a good cup of coffee ☕ Thanks for reaching out.
Hablo español, pero lo explico de manera tan grafica que hice paso a paso lo que dijo y funciono. Muchas gracias
Hi, thanks for the feedback. I am glad you could get this working only by following the screen instructions. Thanks for the nice feedback, appreciated.
en el archivo webui-user.bat quite el --onnx y funciono ...gracias mil!
Pleasure, glad you are up and running. Thanks for the feedback.
dankie man dis nie julle mal die selfte probleem as wat ek het nie maar dit het my n paar goeie tips gegee
Hi, glad it could help! Dankie vir die terugvoer!
i like you!, goes to show with your skill and to the point explanation your better than tubers that got 300k subs
make sure to add a " " (space) before --use-directml
Thanks for sharing.
Thanks !! Worked like a charm !
You're welcome! Glad it helped. Thanks for the feedback.
Tutorial was almost perfect! You didn’t really explain how to get the the command arg you just appeared there..
Hi, Thanks for the feedback. Much appreciated. Noted RE the command line args. Hope everything is working as expected on your end.
thank you gatão
Thanks for the feedback! Glad you up and running!
oi chelly
yes, this worked, ty so much. using amd rx6600
Good to hear, thanks for the feedback. Much appreciated.
I did this and it seems fixed but in the terminal it says it's running with torch 2.0.0+cpu. Does this mean my GPU is not being used?
Hi, you can open task manager and then performance, when you produce an image you should see your GPU spiking, you should be able to see if is using the GPU to its full potential. Glad you are up and running and thanks for reaching out.
Thx man, that helped out!
No problem! Glad you are up and running and the video could assist. Thanks so much for reaching out.
Fix for who has problem with No module named 'keras.__internal__'
cmd on sd web ui directories
venv\Scripts\activate
pip install onnxruntime-directml
pip install torch-directml
pip install keras
pip install tensorflow
Thanks!
I followed all the steps but when i run the bat file it still shows me the same error
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
I have the same issue, did you find the problem ?
try to add a " " (space) before --use-directml
or try to add " --lowvram --precision full --no-half --skip-torch-cuda-test" instead
hello i fully followed the tutorial but it says RuntimeError: Could not allocate tensor with 67108864 bytes. There is not enough GPU video memory available! even i used the --lowvram parameter
I am getting the same problem
Hi, Have a look at the link below
github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs
*For many AMD GPUs, you must add --precision full --no-half or --upcast-sampling arguments to avoid NaN errors or crashing. If --upcast-sampling works as a fix with your card, you should have 2x speed (fp16) compared to running in full precision.
You can also try
www.reddit.com/r/StableDiffusion/comments/11hhnkj/error_code_runtimeerror_amd_work_around_or/
--opt-split-attention --lowvram --disable-nan-check --autolaunch (but this will make it slow)
Let me know if this helps.
@@stuffaboutstuff4045 thanks for the --opt-split-attention but it didn't fix it, it worked a bit for the prompt "cat" but when i give a bit more complicated prompt like cat with hat, it gives the could not allocate tensor error (rocm and onnx doesn't seem to work when i try) (i already tried the amd fork one)
If you're using Stability Matrix like me, literally just update the SD package. I tried everything but that for hours but that alone works
Thanks! Noted on this side as well.
How do i open an Administration Command Prompt- webui-iser.bat?? You skipt it in the video and now I can't continue, please help!!
Hi, You need to click on the Windows Search, search for "command prompt" right click on it select Run in Admin mode. Let me know if you came right..
There's no file named *requirements.txt* in the *Scripts* directory
Hi, Thanks for reaching out. I built SD again today and the file is there and should be under YourProjectFolder\stable-diffusion-webui-directml
equirements.txt Let me know if all resolved..
Thank you very much for this tutorial
Pleasure! Thank you for the feedback! Much appreciated.
might be a fix for some people: i found out that despite installing the 3.10.6 version of python, it was still using an older version of python I had installed instead so make sure you completely uninstall any older versions you have first
Thanks for sharing the feedback! Noted on this side.
three months later and still not fixed.
Hi, I built this today again. All steps in the video still applies. Yes agreed they have still not fixed this upstream.
you are a gOD! fixed my problem
Hi, glad the video helped! Thanks for the feedback much appreciated.
Hi, After I edit the requiremenets_version.txt. and run the install requiremenets, I get this error: ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none)
ERROR: No matching distribution found for torch-directml
Hi, did you follow the steps in the original video posted first. Takeaways from the first video rum command prompt in admin mode make sure to use correct Python version. Let me know if you still get this?
Hey i love your video and uncle ho as well
Thanks! Glad to hear you are up and running. Thanks for the feedback!
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Hi, just checking in if you you managed to resolve this. Did you follow both AMD SD videos on the channel? Maybe just try and build again from scratch. You can also try and launch it first time by adding --skip-torch-cuda-test to COMMANDLINE_ARGS. Check if you just get it up first and working then revert back to getting your AMD card and the SW up and running.
worked thx!
You're welcome! Glad you are up and running. Appreciate the feedback.
Thanks so much! This fixed my problem I really thought my AMD card was not supported this fixed it
You are welcome! Thanks for the feedback.
Doesn't work - 'Not recognized as an internal command operable program or command"
Hi, at what point do you get this issue? Let me know, thanks for reaching out.
2:08 How to change directory in prompt ? I don't quite understand
Hi,
Did you manage to resolve this. You can navigate your folder structure in a command prompt using CD command set.
pls put the commands in the description...
Thanks! I am making an updated video and will stick the new commands accordingly. Will post on the thread when on channel. Thanks for reaching out.
HELLO, error after all steps:
ERROR: Invalid requirement: 'torch=directml': Expected end or semicolon (after name and no valid version specifier)
torch=directml
^ (from line 40 of requirements_versions.txt)
Hint: = is not a valid operator. Did you mean == ?
Hi, just checking in if you were able to resolve, just check the notation here. You need to add torch-directml to the end of requirements_versions.txt you have the = operator. Let me know if you came right. Thanks for reaching out.
THIS UNIRONICALLY WORKED BRUH!!!!!! YOOOOOOOOOOOO
Pleasure, Glad it helped!
This video saved me so much time thx
Pleasure! 👍Thanks for the feedback..
Now, after trying out for about 10 hours, I know that I made a mistake when I bought AMD GPU instead of NVidia. I keep learning.
Hi, Agreed AMD is a struggle to get working on most AI apps. Just want to check, you followed all the basics. Run all commands in admin mode. Use correct version of Python. Did you follow all the steps in the original video including required SW. ruclips.net/video/POtAB5uXO-w/видео.html
You fuckin legend.
Edit: worked with my 6700xt
Thanks!
can you fix it in ubuntu 22.04?
Apologies, missed this comment. Thanks for reaching out. lol something to test..
I added exactly the same command lines on the proper files and the error still persists:
Traceback (most recent call last):
File "G:\StableDiff\stable-diffusion-webui\launch.py", line 48, in
main()
File "G:\StableDiff\stable-diffusion-webui\launch.py", line 39, in main
prepare_environment()
File "G:\StableDiff\stable-diffusion-webui\modules\launch_utils.py", line 384, in prepare_environment
raise RuntimeError(
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Hi, Just want to check, you followed all the basics. Run all commands in admin mode. Use correct version of Python. Did you follow all the steps in the original video including required SW. ruclips.net/video/POtAB5uXO-w/видео.html Let me know...
I followed the steps as is but I have two problems, if I put --onnx in the bat it tells me that it does not recognize the --onnx command, if I put COMMANDLINE_ARGS=--use-directml --medvram --precision full --no-half --no-half-vae --opt-split-attention-v1 --opt-sub-quad-attention --disable-nan-check as I found in the comments it shows that module torch has no attribute dml
Hi, let me know if you managed to resolve this. Just to confirm you are on Windows.
You can try:
venv\Scripts\activate
pip install onnxruntime-directml
pip install torch-directml
pip install keras
pip install tensorflow
Otherwise:
delete venv
Try and launch SD using skip cuda test arg. Let it build and open.
Then use -use-directml in the args.
Let me know if that helps, hope you are up and running soon.
Hi, let me know if you managed to resolve this. Just to confirm you are on Windows.
You can try:
venv\Scripts\activate
pip install onnxruntime-directml
pip install torch-directml
pip install keras
pip install tensorflow
Otherwise:
delete venv
Try and launch SD using skip cuda test arg. Let it build and open.
Then use -use-directml in the args.
Let me know if that helps, hope you are up and running soon
@@stuffaboutstuff4045 Worked for me (with the several pip install)! Many thanks
You really saved my day.
Thanks! Glad to hear your up and running..
Thank you for your help.
You're welcome!
Still
RuntimeError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
Excellent tutorial! Worked, THX !!!!
You're welcome! Thanks for the feedback, much appreciated!
Hi, I did everything as in the video and I get a new error "ModuleNotFoundError: No module named 'pillow_avif', I installed the library with "pip install diskcache" and
"pip install Pillow-avif-plugin" and the installation was successful, but the error persisted. Can you tell me how to fix it?
Hi, did you manage to resolve this. Did you followed the steps in both videos. Also ensure all the required SW etc. Let me know if you are up and running..
@@stuffaboutstuff4045 Thanks for the answer. Yes, I managed to solve the issue. I had to reinstall all the libraries and I accidentally deleted the .bat😅
Why do you say it is a temporary solution? The problem continues to affect operation in some way
Hi, no everything should work fine. I was trying to communicate that this problem will be fixed somewhere on the Repo so if you need to reinstall just first check if bug is resolved using the usual process first.
@@stuffaboutstuff4045 thanks for answering
I followed the directions and I get an error
ImportError: DLL load failed while importing onnxruntime_pybind11_state: A dynamic link library (DLL) initialization routine failed.
Press any key to continue . . .
How do i fix it?
install Visual Studio 2022
it comes with the stuff you need to build things, but it works for me
Hi, just checking if you are up and running and if it was due to required software not installed. Thanks for reaching out. Let me know if you are up and running.
@@stuffaboutstuff4045 No still getting the error.
thanks to you my pc goes brrrrrr for 4 weeks now haha
Good to hear! Hope all stays up and running. I take it the brrr is a good one 😉
@@stuffaboutstuff4045 oh yeah absolutely:D
I did all the steps and it worked I got the webui I couldn't connect it to the sillytavern then I reset the PC but then Stable diffusion started to give me the same error as last time.
Hi, just checking in to see if you are up and running again...
I has to come back to thank you
Hi, pleasure. Thanks for the feedback.
thank you. worked flawlessly, hopefully the github repo is updated soon.
Hi, thank for the feedback! Glad you are sorted. Agreed, hopefully the repo will be corrected soon.
Hi. I followed every step 3 times, but it didn't help. I have an AMD processor with an integrated GPU, however I also have an RTX series GPU. Maybe stable diffusion doesn't see my external GPU and only sees CPU's GPU?
Hi, just checking if you came right with your problem. Did you try and disable the onboard in the BIOS. SD should use your default GPU in Windows. You can check in PowerShell or DX what it is defaulting to. Let me know if you are up and running.
@@stuffaboutstuff4045 Hi. Thanks for the reply. So, first of all, I tried to disable "integrated GPU" in Windows 10, but it didn't work. Secondly, I tried to disable in BIOS "integrated GPU" and this didn't help either. Any ideas?)
all worked except requirements.txt why would that fail? i typed pip install -r requirements.txt Also note there is already a requirements.txt file in SD folder so do I have to do this step? Does the command ONLY add something to the existing requirements.txt? if so what does it add?
Hi, the command install the contents of the file. When installing carefully check the type of prompt windows I am in. Make sure you execute the command from the folder where the file resides. Let me know if you got everything up and running. Thanks for reaching out.
I followed this video about fix, and still getting error:
launch.py: error: unrecognized arguments: --onnx
--onnx is not an option in launch.py
At least for me :(
How to get onnx tap?
same for me :(
bro i think i found a fix. I deleted the venv Folder, deleted the --onnx in my webui-user.bat. so only: "set COMMANDLINE_ARGS=--use-directml"
then I ran the webui-user.bat and let it do its thing. I downloaded everything it needed and voila everything works finde. SD is now using my RX6700 XT correctly
Glad to hear you are sorted. Will make a note about deleting the venv folder.
@@cerb92 Thanks ! I had the same error and it works fine and finally on my GPU now, my CPU can breath ! The only downside is that I can only star SD from the cmd and not just by clicking on webui-user.bat in my SD folder, but I can manage it's worth my time !
So am I using administrator command prompt instead of anaconda prompt?
Hi, apologies for the late reply. The video uses local install not using a "full" Anaconda environment. If you installed SD in an Anaconda Environment then you will use Anaconda Terminal and complete the steps. The videos is normal local install using Admin command prompt. Let me know if you are up and running.
bro thank you u love u
i love u*
Pleasure! Glad you sorted out...
I now run into a new problem "AttributeError: module 'modules.devices' has no attribute 'inference_context'". Any ideas?
Hi, thanks for reaching out.. Initial scan might correlate to delete venv folder and try again. github.com/lshqqytiger/stable-diffusion-webui-directml/discussions/368 Just want to check, you followed all the basics. Run all commands in admin mode. Use correct version of Python. Did you follow all the steps in the original video including required SW. ruclips.net/video/POtAB5uXO-w/видео.html Let me know...
I could't make work with --onnx, so I remove it and now is working well
Hi, glad you are up and running! Thanks for reaching out.
after u ran pip install requirements, where it says successfully uninstalled torchvision, on mine it says "successfully uninstalled numpy-2.0.0". is this the reason this fix is not working for me, and how do i fix this?
Hi, did you come right with this. I think its trying to rollback to Numpy 1.xx which is fine. Does that happen? Also confirm your Python version and just carefully retrace steps. Worst come to worst build it again quickly in a new Anaconda environment and check if you end up with the same issue. Can you confirm steps in both the Videos on the channel were followed. Let me know and thanks for reaching out.
I have problem AttributeError: module 'torch' has no attribute 'dml', how fix that?
Hi, did you add it to requirements file. Check the step 1:10 in the video. Just want to check, you followed all the basics. Run all commands in admin mode. Use correct version of Python. Did you follow all the steps in the original video including required SW. ruclips.net/video/POtAB5uXO-w/видео.html Let me know...
I also followed all the steps but when i run the bat file it still shows me the same error
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
Hey I have an issue, It only let's me use the base model not sdxl
Hi, just checking if you resolved this issue. If not have a look at the link below. Let me know if you are up and running.
stable-diffusion-art.com/sdxl-model/
@@stuffaboutstuff4045 yea now none of the models work... It's due to a memory leak BC it tries to pull 90gb of vram
every command worked up until 3:29 which is telling me Torch is still not able to use GPU, any tips?
Nvm, I solved it
Hi, glad to hear you are up and running!
Thank you so much!!!!!!
You're welcome! Thanks for reaching out. Glad the video helped.
it is not work for me , can help me ?
Hi, I built this today again, steps in this video still applies and seems to be valid. Did you ensure --use-directml in config. I am sure you have but maybe just double check all steps in the video again. If you still get the Skip Cuda Test issue then try to start SD with --skip-torch-cuda-test as the only argument. Let is start and check if it builds. Then you will have to follow all steps in this video again.
Thank you for this tip. SD programs can now use AMD GPUs as before, but a new problem has arisen. The picture that came out was not the picture I wanted. It came out like a group of melted paint blobs on a canvas that didn't have the shape of things or people. I'd like to know how to fix this because I'm really at a loss and give up right now hahaha.
Hi, you still need to insert your memory arguments after you have it up and running according to your GPU. Let me know if that resolves the issue.
@@stuffaboutstuff4045 can i ask you how to insert memory argument in SD because i am newbie and don't know how to do it please?
@@piyaphumL. I believe i can help, if youm search up memory optimizations stable diffusion in google itll show a git page called optimizations . AUTOMATIC1111 that will have a library of optimizations, the one that made mine work was insterting --opt-sdp-no-mem-attention into the webui-user.bat text on the line for set COMMANDLINE_ARGS. So all in all it should look like: set COMMANDLINE_ARGS= --use-directml --opt-sdp-no-mem-attention . This works on my really high performance amd card so if you have a similar kind of card it should work. If its not as powerful the other arguments on the page may work.
Hi, you need to add your arguments according to the memory and spec of your AMD GPU. If you have 4-6gb vram, try adding these flags to webui-user.bat like so: COMMANDLINE_ARGS=--opt-sub-quad-attention --lowvram --disable-nan-check
For many AMD GPUs, you must add --precision full --no-half or --upcast-sampling arguments to avoid NaN errors or crashing. If --upcast-sampling works as a fix with your card, you should have 2x speed (fp16) compared to running in full precision.
Have a look at this page for the options.
github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-AMD-GPUs
ERROR: Could not find a version that satisfies the requirement torch-directml (from versions: none)
Hi, thanks for reaching out. Are you on the correct version of Python? Did you follow the steps in the original video? Let me know if problem persists...
im in correct version of python and it is working but have also different problems here .d do you have discord server?@@stuffaboutstuff4045
It worked ty so much!
Hi, did you manage to get your install up and running.