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
RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' #1349
Comments
hi, |
nikaskn=my username My specs nikaskn@hdhnl:~$ neofetch |
vine boom |
In the |
Full precision dramatically drops performance. What have I done:
Gotten from https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Install-and-Run-on-NVidia-GPUs After follow https://pytorch.org/get-started/locally/ I tested on Win11 and error was gone with good performance. full precision does not required |
thx,I tried then it works! |
same question,i cannot run it on my amd cpu |
RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' --precision full --no-half |
The reason is likely to be no GPU in your computer. I also encountered this problem, maybe it's better to download a GPU |
Can you copy the whole string? I tried to insert it in different ways, but it doesn't work. Maybe I'm writing the wrong way |
so, I am on an AMD system, which I am aware is not the best for this, but I've been trying to get it to work regardless, however, even with all the suggested solutions(commlandline_args set to full precision and no-half, and some other stuff) I still get the same error RuntimeError: "LayerNormKernelImpl" not implemented for 'Half' does anyone have any other ideas on how to get it to work? |
nvm that, for some reason it was not reading it from the webui-user file, upon adding it to the launch.py file it works now |
(WSL2 on Windows 10)
|
@Sphinxxxx Thank you, this solved my problem. |
The last Two Lines should look like this. set COMMANDLINE_ARGS= --skip-torch-cuda-test --precision full --no-half call webui.bat |
Thanks, @Sphinxxxx! It works for me, I'm using Ubuntu 22.04. |
Hey @Ps43ffrFro , just run with this command, it doesn't need to be added to the config file. use |
it on work ,mac 2020, thanks! |
"./webui.sh --skip-torch-cuda-test --precision full --no-half" Where exactly does this go? |
@millbank14 - It's what you type when you start the application: |
Thank you, it Worked! Really appreciate!👍🏼 |
it works on my case.
|
确实要在命令行加参数,直接在脚本里加参数如果不懂代码原理,很难加对 |
Propose: close this issue? or should this be detected and automatically use --no-half ? |
您好,您的邮件我已收到我将尽快查收并回复
|
Really appreciate! I worked for my case, where there's mac m1. |
您好,您的邮件我已收到我将尽快查收并回复
|
can someone show me or post a video on how to do this? because I think I'm doing it wrong and I keep trying but it's not working |
Hi @vonnie21, try the below command when startup.
|
great that worked! thank you |
i use it on colab so how should i fix it? |
您好,您的邮件我已收到我将尽快查收并回复
|
Is it possible to do it without using cpu, but gpu? Cause it's a bit slow though it works |
您好,您的邮件我已收到我将尽快查收并回复
|
Thank you, this worked but ruined the performance. it generates more than 15 minutes :( "./webui.sh --skip-torch-cuda-test --precision full --no-half" |
Describe the bug
When I try to run any prompt in the webui, it shows me this message: "RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'"
To Reproduce
Steps to reproduce the behavior:
1.Run webui-user.bat.
2.Get webui link.
3.Type prompt in txt2img and click generate.
4.See error.
Expected behavior
Images are generated.
Screenshots
ERRORLOG:
txt2img: A big turtle.
D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\amp\autocast_mode.py:198: UserWarning: User provided device_type of 'cuda', but CUDA is not available. Disabling
warnings.warn('User provided device_type of 'cuda', but CUDA is not available. Disabling')
Error completing request
Arguments: ('A big turtle.', '', 'None', 'None', 20, 0, False, False, 1, 1, 7, -1.0, -1.0, 0, 0, 0, False, 512, 512, False, False, 0.7, 0, False, None, '', False, 1, '', 4, '', True, False) {}
Traceback (most recent call last):
File "D:\SD 2.0\stable-diffusion-webui\modules\ui.py", line 142, in f
res = list(func(*args, **kwargs))
File "D:\SD 2.0\stable-diffusion-webui\webui.py", line 60, in f
res = func(*args, **kwargs)
File "D:\SD 2.0\stable-diffusion-webui\modules\txt2img.py", line 41, in txt2img
processed = process_images(p)
File "D:\SD 2.0\stable-diffusion-webui\modules\processing.py", line 351, in process_images
uc = prompt_parser.get_learned_conditioning(len(prompts) * [p.negative_prompt], p.steps)
File "D:\SD 2.0\stable-diffusion-webui\modules\prompt_parser.py", line 104, in get_learned_conditioning
conds = shared.sd_model.get_learned_conditioning(texts)
File "D:\SD 2.0\stable-diffusion-webui\repositories\stable-diffusion\ldm\models\diffusion\ddpm.py", line 558, in get_learned_conditioning
c = self.cond_stage_model(c)
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\SD 2.0\stable-diffusion-webui\modules\sd_hijack.py", line 387, in forward
outputs = self.wrapped.transformer(input_ids=tokens)
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\transformers\models\clip\modeling_clip.py", line 722, in forward
return self.text_model(
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\transformers\models\clip\modeling_clip.py", line 643, in forward
encoder_outputs = self.encoder(
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\transformers\models\clip\modeling_clip.py", line 574, in forward
layer_outputs = encoder_layer(
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\transformers\models\clip\modeling_clip.py", line 316, in forward
hidden_states = self.layer_norm1(hidden_states)
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\module.py", line 1130, in _call_impl
return forward_call(*input, **kwargs)
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\nn\modules\normalization.py", line 189, in forward
return F.layer_norm(
File "D:\SD 2.0\stable-diffusion-webui\venv\lib\site-packages\torch\nn\functional.py", line 2503, in layer_norm
return torch.layer_norm(input, normalized_shape, weight, bias, eps, torch.backends.cudnn.enabled)
RuntimeError: "LayerNormKernelImpl" not implemented for 'Half'
The text was updated successfully, but these errors were encountered: