Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

I Run stable diffusion,It`s wrong RuntimeError: "LayerNormKernelImpl" not implemented for 'Half',

I Run stable diffusion,It`s wrong RuntimeError: "LayerNormKernelImpl" not implemented for 'Half',help me,how i do?

I have no idea for it

like image 935
吾发克 Avatar asked Sep 09 '25 16:09

吾发克


2 Answers

'LayerNorm' is one of the layers in the Model. Looks like you're trying to load the diffusion model in float16(Half) format on CPU which is not supported. For float16 format, GPU needs to be used. For CPU run the model in float32 format.

Reference: https://github.com/pytorch/pytorch/issues/52291

like image 180
Manoj Mohan Avatar answered Sep 13 '25 12:09

Manoj Mohan


I solved it in the following way, modify the launch.py file in the following way, add the following line of code:

commandline_args = os.environ.get('COMMANDLINE_ARGS', "--skip-torch-cuda-test --no-half")

launch.py file and the modified line of code just as stated above

like image 35
salvador rios Avatar answered Sep 13 '25 13:09

salvador rios