kohya-ss/sd-webui-additional-networks

Error: TypeError: Got unsupported ScalarType BFloat16

zark119 opened this issue · 6 comments

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.

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

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...

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

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

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.

Thank you for reporting. I will fix this today.