-
Notifications
You must be signed in to change notification settings - Fork 27.5k
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]: Press any key../Hard Fault - Unable to generate SDXL #16186
Comments
Hello, I made an account to speak about this issue. It is very frustrating, but I've at least found out a bit about it. It's a 0xc0000005 error, which is related to seg faults in Windows and is caused by Rolling back to torch 2.0.1+cu118 currently solves the issue, at least for me. This should imply that some change has been made to torch since then, perhaps in the c10 library that causes a segfault. Unfortunately I don't have the familiarity with pytorch or ai programming to suggest what change this actually is. If someone has any insight what causes this sort of crash in the generation process and create a tangible issue on the Pytorch Github, I would be grateful if you did so. |
In case anyone doesn't know the actual commands to do so, I just ran this in the root dir of my webui install.
|
Followed the above commands. Not sure how to roll back cuda versions though.
|
I haven't seen that one before.
If it didn't work try using |
Thank you for this solution, it works well! |
Thank you for mentioning that 2.3.0 still works on ComfyUI! In that case, it's still possible to be related to sd-webui's image generation implementation, perhaps specifically for SDXL. I am curious why changing the torch version would cause a segfault, because every error should have a sanitized exception. Nonetheless there might be a workaround on sd-webui's end that can be done to mitigate this. |
Installed the cuda kit as instructed. Still getting faults, but at least it's showing c10.dll again? Also managed to get it to hard fault, once necessitating a full restart. The error still and always occurs at 100% completion before the image is decoded/saved/displayed or whatever happens there. If that helps narrow anything down.
|
#15175 |
You can also try disabling system memory fallback for later nvidia drivers which seems to have some extreme disagreements with pytorch and stable diffusion. Not sure if RAM can handle anything without it though. |
Did a clean driver reinstall. And disabled memory fallback. Then it segfaulted on c10.dll again. |
I was getting this error with all variants of this model (Ratatoskr) https://civitai.com/models/192854/ratatoskr-animal-creature-and-furry. Same exception code/location and faulting module. After mucking about with other fixes people suggested, it has been completely solved when I realised that I had a swap of 0MB set (because I'm using ssds and have 32gb of ram). I set a min swap of 8192mb and max of 32768mb and it's now working just fine. Haven't tried with lower values yet. |
This could be infact an Nvidia issue, but oddly enough this doesn't happen in ComfyUI. I did notice it happening when VRAM memory is near or maxed out (Even on a 3090) I'd thought I post this up in case someone has time to try it on a clean install. I did downgrade pyTorch to 2.0.1 and use cu118 as @Allwhey mentioned, but still crashed, didn't work for me. I seem to get a different fault from the start from everyone else, though. Check your windows event log in case you get that random "press key to continue..." error with no error. Exception 0xc0000005 is an Access Violation Exception.
|
I have been having this issue with multiple gpu rig 3090, 2080ti, 3060, p102-100. Windows 11. 32GB of Ram. I've got 5 GPUs + 2 CPUs (x99 motherboard, dual Xeon e5-2630 v4s 20 core 40 thread 2.2GHz). I can get a pretty consistent crash. I'm using a discord bot and two instances on my 2080tis in --api --nowebui. When I queue up multiple generations it crashes. When I queue one image at a time and give it some time between queues it doesn't crash. Python, DWM, and Nvidia driver all show errors around the time of crash. I've played with --lowram, --medvram. I never seem to run out of vram or ram. Using about half of vram. Maybe 29 of 32 GB of ram utilization when I queue a ton up. I run a third instance on my 3090 in webui and it crashes, just not as often. I don't know if my rambling helps narrow it down at all. I can provide logs and junk and a more detailed systeminfo if needed. edit: probably should have mentioned it happens when I hit 100% on the current generation and says "Press any key to continue" unless it crashes the DWM, in which case I can't see. |
same |
Hey guys, I ran into this problem using an AMD GPU with ZLUDA, windows 11 pro, 32gb ram, 7900GRE and r7 7800x3d. To my understanding whether its CUDA or ZLUDA does not matter to A1111 or torch, so the problem I had and the fix I used should be pretty similar. I scoured the web to find a fix and it's actually kind of stupid. Noticed that my system RAM usage (not vram) was going up and hitting 30gb as the model I was using was being loaded - and then it crashed. I set the windows pagefile (virtual memory) to 5gb and it fixed the issue. Hope this helps any future people |
My rig does have 192GB of ram. I forgot to mention that. |
Checklist
What happened?
Whilst trying to generate any image via any model in SDXL I am met with with either a "Press any key to continue..." error. Or a hard memory access fault for python.exe.
It'll also take out several other background applications when it crashes like this.
A post in this thread suggested checking event viewer on these crashes.
Faulting application name: python.exe, version: 3.10.11150.1013, time stamp: 0x642cc427 Faulting module name: c10.dll, version: 0.0.0.0, time stamp: 0x6578c6fe Exception code: 0xc0000005 Fault offset: 0x0000000000055474 Faulting process id: 0x39bc Faulting application start time: 0x01dad2c9928bde49 Faulting application path: I:\Python\Python3-10-6\python.exe Faulting module path: I:\Stable Diffusion\venv\lib\site-packages\torch\lib\c10.dll Report Id: fac5843a-d536-4688-b8ca-2ce2e46d2d27 Faulting package full name: Faulting package-relative application ID:
Steps to reproduce the problem
Load any SDXL model.
Hit generate. Doesn't even need a prompt.
What should have happened?
Make images.
Shouldn't nuke Discord, Steam, and DWM.exe all at once.
What browsers do you use to access the UI ?
Mozilla Firefox
Sysinfo
sysinfo-2024-07-10-13-24.json
Console logs
Additional information
No response
The text was updated successfully, but these errors were encountered: