[Bug]: CUDA error: an illegal memory access was encountered
Is there an existing issue for this?
- [X] I have searched the existing issues and checked the recent builds/commits
What happened?
Recieving CUDA error: an illegal memory access was encountered when trying to generate more than 1 image.
Before November 15th everything worked fine. Stable Diffusion can generate 1 picture, trying to generate the second one and get the error. Comfyui, Topaz Video AI also do not work. Tried to reinstall Windows, reinstall Stable Diffusion, drivers as well - that did not solve the issue.
Steps to reproduce the problem
- Start Stable Diffusion
- Generate more than one image
- Encounter Error:(
What should have happened?
Before multiple batches of images generated with no problem.
Sysinfo
Windows 10. Python 3.10.11. Torch 2.0.1 + cu118. The Videocard is 16GB MSI GeForce RTX 4060 Ti Gaming X Aktiv. RAM is 48GB DDR4 3200mhz.
What browsers do you use to access the UI ?
Mozilla Firefox, Google Chrome
Console logs
Traceback (most recent call last):
File "C:\Python\lib\[threading.py](http://threading.py/)", line 1016, in _bootstrap_inner
[self.run](http://self.run/)()
File "D:\stable-diffusion-webui\modules\[memmon.py](http://memmon.py/)", line 53, in run
free, total = self.cuda_mem_get_info()
File "D:\stable-diffusion-webui\modules\[memmon.py](http://memmon.py/)", line 34, in cuda_mem_get_info
return torch.cuda.mem_get_info(index)
File "D:\stable-diffusion-webui\venv\lib\site-packages\torch\cuda\[memory.py](http://memory.py/)", line 618, in mem_get_info
return torch.cuda.cudart().cudaMemGetInfo(device)
RuntimeError: CUDA error: an illegal memory access was encountered
Compile with TORCH_USE_CUDA_DSA to enable device-side assertions.
Additional information
Can the Videocard be faulty? Maybe something broke inside? The cards is relatively new, just got it 2 months ago.
I had once a similar error, check if this article can solve it. https://nvidia.custhelp.com/app/answers/detail/a_id/5490
I had once a similar error, check if this article can solve it. https://nvidia.custhelp.com/app/answers/detail/a_id/5490
Tried it. Did not work. Tried even putting the card into another PC - SD, Topaz still did not work
I'm getting this issue too across multiple commits. Is it a graphics card driver issue? I heard NVidia made some changes and I'm wondering if that's causing this.
I'm getting this issue too across multiple commits. Is it a graphics card driver issue? I heard NVidia made some changes and I'm wondering if that's causing this.
No idea. Returned the card to the Shop. Got a new one that works so far
For what it's worth to anyone but I got it working by installing a previous version of the NVIDIA GeForce Gaming Driver.
Windows 11 Clean install of A1111 NVIDIA GeForce RTX 4080 SUPER NVIDIA Driver version 560.70, Release Date: 2024.7.16
Hope it helps.