Getting error while loading brighntess model
#1
by serhii-nechyporchuk - opened
Hey there! Thanks for sharing this model!
I have a problem when I load it though. I have installed it in automatic111 models/controlnet folder, but when I use it within UI I see this error in the console
2023-06-13 01:39:34,742 - ControlNet - INFO - Loading model: control_v1p_sd15_brightness [5f6aa6ed]
Error running process: /content/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py
Traceback (most recent call last):
File "/content/stable-diffusion-webui/modules/scripts.py", line 409, in process
script.process(p, *script_args)
File "/content/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 686, in process
model_net = Script.load_control_model(p, unet, unit.model, unit.low_vram)
File "/content/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 268, in load_control_model
model_net = Script.build_control_model(p, unet, model, lowvram)
File "/content/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/controlnet.py", line 296, in build_control_model
state_dict = load_state_dict(model_path)
File "/content/stable-diffusion-webui/extensions/sd-webui-controlnet/scripts/utils.py", line 17, in load_state_dict
state_dict = safetensors.torch.load_file(ckpt_path, device=location)
File "/usr/local/lib/python3.10/dist-packages/safetensors/torch.py", line 100, in load_file
result[k] = f.get_tensor(k)
RuntimeError: self.size(-1) must be divisible by 4 to view Byte as Float (different element sizes), but got 37049666
and controlnet is not applied to image.
Any guidance how to resolve this problem? Thanks!
Found the solution. I was using automatic1111 through Google Colab and when I was uploading this model manually through UI it ended up corrupted for some reasons. What I did is I provided brightness model as additional model in the automatic1111 setup form and then just moved model into the extensions/controlnet/models
serhii-nechyporchuk changed discussion status to closed