stable-diffusion.cpp icon indicating copy to clipboard operation
stable-diffusion.cpp copied to clipboard

Unable to generate

Open BaoHouxun opened this issue 1 year ago • 8 comments

E:\AI\sd-master-697d000-bin-win-cuda12-x64>sd.exe -m E:\lx\lx\lxaimodels\StableDiffusion-v1.5\deliberate_v2.safetensors -p "a cat." ggml_cuda_init: GGML_CUDA_FORCE_MMQ: no ggml_cuda_init: GGML_CUDA_FORCE_CUBLAS: no ggml_cuda_init: found 1 CUDA devices: Device 0: NVIDIA P104-100, compute capability 6.1, VMM: no [INFO ] stable-diffusion.cpp:171 - loading model from 'E:\lx\lx\lxaimodels\StableDiffusion-v1.5\deliberate_v2.safetensors' [INFO ] model.cpp:737 - load E:\lx\lx\lxaimodels\StableDiffusion-v1.5\deliberate_v2.safetensors using safetensors format [INFO ] stable-diffusion.cpp:194 - Stable Diffusion 1.x [INFO ] stable-diffusion.cpp:200 - Stable Diffusion weight type: f16

E:\AI\sd-master-697d000-bin-win-cuda12-x64>echo %errorlevel% -1073741795

BaoHouxun avatar Aug 17 '24 06:08 BaoHouxun

It seems stable diffusion cpp failed on RTX 10xx GPU. I have the similar error with 1080ti

chinshou avatar Aug 27 '24 21:08 chinshou

I compiled the cuda dll with 12.5 , now it can generate the image with 1080ti in 12s without crash. I guess the problem was caused by the incompatible cuda version I compiled with cuda 12.5 without problem. But the dll provided on the stable diffusion cpp website was compiled with 12.1 or 12.3 I guess.

chinshou avatar Sep 02 '24 01:09 chinshou

My guess is that no support for your architecture was built into the ci binary. If you build on your system directly, it might add it or make it the sole architecture. Let me see what I can do about that.

Green-Sky avatar Sep 02 '24 07:09 Green-Sky

actually, it should already support your platform. according to logs it builds Using CUDA architectures: 52;61;70;75 61 should be your 1080ti https://en.wikipedia.org/wiki/CUDA#GPUs_supported

Green-Sky avatar Sep 02 '24 07:09 Green-Sky

I have had this problem for a while. The pre-built binaries never worked and have been getting the same error as mentioned above. Even when compiling locally for my 1060, the Release config also seg faults with the same error but works when I compile to use the Debug config instead of the Release config. (cmake --build . --config Debug) (Windows 10, GTX 1060 6GB)

supersonic13 avatar Sep 02 '24 09:09 supersonic13

Did you use the cudart that is shipped in the release?

Green-Sky avatar Sep 02 '24 10:09 Green-Sky

hello @Green-Sky not sure if that question was meant for me. But, yes. I used the shipped cudart dlls in the same directory as the exe, and the program crashes. I also built with the Release config, and it still crashes. Works when I build with the Debug config. Both local builds used -DSD_CUBLAS=ON flag during Cmake (cmake ../ -DSD_CUBLAS=ON)

supersonic13 avatar Sep 02 '24 16:09 supersonic13

I know the reason now, it's because my CPU does not support AVX2.0. It might have been checked during the compilation process. I tried compiling it on my own machine, and everything runs normally.

BaoHouxun avatar Sep 30 '24 04:09 BaoHouxun