Skip to content
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

Error: TypeError: Got unsupported ScalarType BFloat16 #127

Closed
zark119 opened this issue Mar 8, 2023 · 6 comments
Closed

Error: TypeError: Got unsupported ScalarType BFloat16 #127

zark119 opened this issue Mar 8, 2023 · 6 comments
Labels
bug Something isn't working

Comments

@zark119
Copy link

zark119 commented Mar 8, 2023

Error running process_batch: C:\Users\zach1\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py
Traceback (most recent call last):
File "C:\Users\zach1\stable-diffusion-webui\modules\scripts.py", line 395, in process_batch
script.process_batch(p, *script_args, **kwargs)
File "C:\Users\zach1\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\additional_networks.py", line 216, in process_batch
network, info = lora_compvis.create_network_and_apply_compvis(du_state_dict, weight_tenc, weight_unet, text_encoder, unet)
File "C:\Users\zach1\stable-diffusion-webui\extensions\sd-webui-additional-networks\scripts\lora_compvis.py", line 131, in create_network_and_apply_compvis
modules_alpha[lora_name] = float(value.detach().cpu().numpy())
TypeError: Got unsupported ScalarType BFloat16

The lora models works in the a1111 webui.

@KenfoxDS
Copy link

KenfoxDS commented Mar 8, 2023

I had the same problem. I reinstalled everything I could, nothing helped. I just found the solution in another thread:
#80

@zark119
Copy link
Author

zark119 commented Mar 9, 2023

I had the same problem. I reinstalled everything I could, nothing helped. I just found the solution in another thread: #80

thanks, the dev2 really fixed the problem. What is wrong with the new version...

@Mudereded401
Copy link

Mudereded401 commented Mar 9, 2023

Google actually updated Colab's python, so most of the programs written on it have to update their codes. Nothing is bad with this extension, the problem is in Colab. Try using this command and it should work:

!pip install "fastapi[all]"
!pip install "gradio[all]"
!pip install "lpips[all]"
!pip install "basicsr[all]"
!pip install GitPython
!pip install safetensors
!pip install omegaconf
!pip install transformers
!pip install open_clip
!pip install diffusers
!pip install triton
!pip install bitsandbytes
!pip install wget
!pip install -r /content/gdrive/MyDrive/sd/stable-diffusion-webui/requirements_versions.txt
!pip install open_clip_torch
!pip install git+https://github.com/openai/CLIP.git
!pip install xformers

@zark119
Copy link
Author

zark119 commented Mar 9, 2023

I am using the webui local, but still got the problem.

@tranzmatt
Copy link

tranzmatt commented Mar 10, 2023

I recommend rolling back to commit 822f2136fa6d63b85663597b03ef3edafab01187 (tag: v0.4.1) There were a number of merges done on 3/8 and it looks like something got borked. It behaves normally once it's rolled back.

@kohya-ss
Copy link
Owner

Thank you for reporting. I will fix this today.

@kohya-ss kohya-ss added the bug Something isn't working label Mar 10, 2023
kohya-ss added a commit that referenced this issue Mar 10, 2023
fix bf16 model , conv2d 3x3, >320 dim close #127
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants