SD Auto1111

#1
by Pomad - opened

Hi, How can i use this in stable Diffusion Auto1111?

is there any .safetensor or ckpt file?

Yes, there is a .safetensor file available at Vincent-luo/controlnet-hands. This model was actually trained on TPU using the diffusers flax version, and the safetensor file was converted from flax model weights. You can try loading it to see if it works. And because this model was trained in a limited time (when I participated in the JAX/Diffusers community sprint), it may not be very good XD. We also have a space you can play around with: https://huggingface.co/spaces/vllab/controlnet-hands

@Vincent-luo
Thank you so much for the reply, where can i finf the .yaml file for that to add inside controlnet models?

Best regards

This comment has been hidden

Here is the ERROR i GOT:

Loading model: hands.fp16 [c7702d21]
2023-08-01 21:32:55,897 - ControlNet - INFO - Loaded state_dict from [D:\sl\SignL\extensions\sd-webui-controlnet\models\hands.fp16.safetensors]
ERROR: ControlNet cannot find model config [D:\extensions\sd-webui-controlnet\models\hands.fp16.yaml]
ERROR: ControlNet will use a WRONG config [D:\extensions\sd-webui-controlnet\models\cldm_v15.yaml] to load your model.
ERROR: The WRONG config may not match your model. The generated results can be bad.
ERROR: You are using a ControlNet model [hands.fp16] without
correct YAML config file.
ERROR: The performance of this model may be worse than your expectation.
ERROR: If this model cannot get good results, the reason is that you do not have a YAML file for the model.
Solution: Please download YAML file, or ask your model provider to provide [D:\extensions\sd-webui-controlnet\models\hands.fp16.yaml] for you to download.
Hint: You can take a look at [D:\extensions\sd-webui-controlnet\models] to find many existing YAML files.

2023-08-01 21:32:55,913 - ControlNet - INFO - Loading config: D:\sl\SignL\extensions\sd-webui-controlnet\models\cldm_v15.yaml
*** Error running process: D:\sl\SignL\extensions\sd-webui-controlnet\scripts\controlnet.py
Traceback (most recent call last):
File "D:\modules\scripts.py", line 519, in process
script.process(p, *script_args)
File "D:\extensions\sd-webui-controlnet\scripts\controlnet.py", line 736, in process
model_net = Script.load_control_model(p, unet, unit.model, unit.low_vram)
File "D:\extensions\sd-webui-controlnet\scripts\controlnet.py", line 292, in load_control_model
model_net = Script.build_control_model(p, unet, model, lowvram)
File "D:\extensions\sd-webui-controlnet\scripts\controlnet.py", line 375, in build_control_model
network = network_module(
File "D:\extensions\sd-webui-controlnet\scripts\cldm.py", line 91, in init
self.control_model.load_state_dict(state_dict)
File "D:\venv\lib\site-packages\torch\nn\modules\module.py", line 2041, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(
RuntimeError: Error(s) in loading state_dict for ControlNet:
Missing key(s) in state_dict: "time_embed.0.weight",
"time_embed.0.bias", "time_embed.2.weight", "time_embed.2.bias", "input_blocks.0.0.weight", "input_blocks.0.0.bias", "input_blocks.1.0.in_layers.0.weight", "input_blocks.1.0.in_layers.0.bias", "input_blocks.1.0.in_layers.2.weight", "input_blocks.1.0.in_layers.2.bias", "input_blocks.1.0.emb_layers.1.weight", "input_blocks.1.0.emb_layers.1.bias"

Pomad changed discussion status to closed
Pomad changed discussion status to open

I think it's most likely due to the fact that the .safetensor files we gave are in diffusers format, but the automatic1111 webui uses the original CompVis format, resulting in a mismatch between the names of some parameters while loading the weights. I found a conversion script that you can check out and try: https://github.com/huggingface/diffusers/issues/3015#issuecomment-1500917937

So would you please check it if is can be converted? ( or put it the converted file into the hub)

Sign up or log in to comment