Closed viik420 closed 11 months ago
--medvram --xformers --no-half --precision full
You have an NVIDIA GPU since you get CUDA errors and use xformers, yet you set --no-half and --precision full. Why? Get rid of those arguments and see if you don't get better performance and use less VRAM.
--medvram --xformers --no-half --precision full
You have an NVIDIA GPU since you get CUDA errors and use xformers, yet you set --no-half and --precision full. Why? Get rid of those arguments and see if you don't get better performance and use less VRAM.
I use --no-half because it asked me to do so. My GPU doesn't support half-precision. If i run without --no-half I get this error:
NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. Try setting the "Upcast cross attention layer to float32" option in Settings > Stable Diffusion or using the --no-half commandline argument to fix this. Use --disable-nan-check commandline argument to disable this check.
What type of GPU do you have? (That's something you probably should have mentioned in the original post. If not then, at least in your reply to me.)
What type of GPU do you have? (That's something you probably should have mentioned in the original post. If not then, at least in your reply to me.) I have a NVIDIA GeForce GTX 1650 with 4GB VRAM.
I have already found the problem. I found out the cause of this. It is because of the Sysmem Memory Fallback for Stable Diffusion in Nvidia Cards. Stable diffusion is using RAM when it runs out of VRAM on windows. But this features is not available in Linux or maybe I can't find it. https://nvidia.custhelp.com/app/answers/detail/a_id/5490/~/system-memory-fallback-for-stable-diffusion
Have the same problem running Stable Diffusion on Ubuntu distribution. Neither --medvram nor --lowvram flags help. Would highly appreciate the solution for this one
What type of GPU do you have? (That's something you probably should have mentioned in the original post. If not then, at least in your reply to me.)
hi, can you help me have a analysis,i also have a problem with not support half precision, my GPU is RTX4070Ti 12GB,search nvidia official websit, this GPT is support fp16,in vscode,i test code"tensor = torch.randn(3, 3);device = torch.device("cuda");tensor = tensor.to(device).half()" with stable-diffusion-webui's system enviroment,it's kernel path "D:\ProgramFiles\sd.webui\system\python\python.exe", actually python310 ,it can run without error, i install stable-diffusion-webui last week with the new version, however when i test img2img in ui, it tell me "NansException: A tensor with all NaNs was produced in Unet. This could be either because there's not enough precision to represent the picture, or because your video card does not support half type. "
I encountered a comparable issue (as far as I recall) on a Windows system and resolved it by increasing the virtual RAM (which designates a portion of the hard drive for use as additional RAM) to 30GB. Maybe give it a try.
if someone runs SD workloads on aws check g5 instance family, they have 24 Gb of VRAM. Works better now
I'm having a hard time understanding why this issue was closed. The solution is to "just use windows"?
I'm having a hard time understanding why this issue was closed. The solution is to "just use windows"?
There is no option for Sysmem Fallback memory in Linux version of Nvidia Control Panel. So no one knows what to do until Nvidia provides the option.
Is there an existing issue for this?
Update
I found out the cause of this. It is because of the Sysmem Memory Fallback for Stable Diffusion in Nvidia Cards. Stable diffusion is using RAM when it runs out of VRAM on windows. But this features is not available in Linux or maybe I can't find it. https://nvidia.custhelp.com/app/answers/detail/a_id/5490/~/system-memory-fallback-for-stable-diffusion
What happened?
I have installed stable diffusion webui or arch linux, and i run it with --medvram --xformers --no-half --precision full. when trying to generate images above 512x512 or using HighresFix upscale 2X, i get CUDA out of memory error. But I can generate images upto 1024x1024 on the same device in Windows 11 using same settings. It should work on linux too. I have already tried export PYTORCH_CUDA_ALLOC_CONF=max_split_size_mb:512 and lowering it down to 64 but stilll got the error.
Steps to reproduce the problem
What should have happened?
It should be able to generate images above 512x512 resolution. Just like it does on windows on the same device with same sd webui settings. As you can see in the screenshot below, I have successfully generated images with a resolution of 1024x1024 with the same parameters without getting the CUDA out of memory error.
Sysinfo
sysinfo-2023-11-21-15-49.txt
What browsers do you use to access the UI ?
No response
Console logs
Additional information
No response