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

RuntimeError: Error(s) in loading state_dict for BiRefNet #18

Open
nofont77 opened this issue Aug 18, 2024 · 3 comments
Open

RuntimeError: Error(s) in loading state_dict for BiRefNet #18

nofont77 opened this issue Aug 18, 2024 · 3 comments

Comments

@nofont77
Copy link

微信图片_20240818180516
想问下这个报错怎么解决?

python version 3.10.8
pytorch version 2.0.1

Error occurred when executing BiRefNet_ModelLoader_Zho:

Error(s) in loading state_dict for BiRefNet:
Missing key(s) in state_dict: "bb.patch_embed.proj.weight", "bb.patch_embed.proj.bias", "bb.patch_embed.norm.weight", "bb.patch_embed.norm.bias", "bb.layers.0.blocks.0.norm1.weight", "bb.layers.0.blocks.0.norm1.bias", "bb.layers.0.blocks.0.attn.relative_position_bias_table", "bb.layers.0.blocks.0.attn.relative_position_index", "bb.layers.0.blocks.0.attn.qkv.weight", "bb.layers.0.blocks.0.attn.qkv.bias", "bb.layers.0.blocks.0.attn.proj.weight", "bb.layers.0.blocks.0.attn.proj.bias", "bb.layers.0.blocks.0.norm2.weight", "bb.layers.0.blocks.0.norm2.bias", "bb.layers.0.blocks.0.mlp.fc1.weight", "bb.layers.0.blocks.0.mlp.fc1.bias", "bb.layers.0.blocks.0.mlp.fc2.weight", "bb.layers.0.blocks.0.mlp.fc2.bias", "bb.layers.0.blocks.1.norm1.weight", "bb.layers.0.blocks.1.norm1.bias", "bb.layers.0.blocks.1.attn.relative_position_bias_table", "bb.layers.0.blocks.1.attn.relative_position_index", "bb.layers.0.blocks.1.attn.qkv.weight", "bb.layers.0.blocks.1.attn.qkv.bias", "bb.layers.0.blocks.1.attn.proj.weight", "bb.layers.0.blocks.1.attn.proj.bias", "bb.layers.0.blocks.1.norm2.weight", "bb.layers.0.blocks.1.norm2.bias", "bb.layers.0.blocks.1.mlp.fc1.weight", "bb.layers.0.blocks.1.mlp.fc1.bias", "bb.layers.0.blocks.1.mlp.fc2.weight", "bb.layers.0.blocks.1.mlp.fc2.bias", "bb.layers.0.downsample.reduction.weight", "bb.layers.0.downsample.norm.weight", "bb.layers.0.downsample.norm.bias", "bb.layers.1.blocks.0.norm1.weight", "bb.layers.1.blocks.0.norm1.bias", "bb.layers.1.blocks.0.attn.relative_position_bias_table", "bb.layers.1.blocks.0.attn.relative_position_index", "bb.layers.1.blocks.0.attn.qkv.weight", "bb.layers.1.blocks.0.attn.qkv.bias", "bb.layers.1.blocks.0.attn.proj.weight", "bb.layers.1.blocks.0.attn.proj.bias", "bb.layers.1.blocks.0.norm2.weight", "bb.layers.1.blocks.0.norm2.bias", "bb.layers.1.blocks.0.mlp.fc1.weight", "bb.layers.1.blocks.0.mlp.fc1.bias", "bb.layers.1.blocks.0.mlp.fc2.weight", "bb.layers.1.blocks.0.mlp.fc2.bias", "bb.layers.1.blocks.1.norm1.weight", "bb.layers.1.blocks.1.norm1.bias", "bb.layers.1.blocks.1.attn.relative_position_bias_table", "bb.layers.1.blocks.1.attn.relative_position_index", "bb.layers.1.blocks.1.attn.qkv.weight", "bb.layers.1.blocks.1.attn.qkv.bias", "bb.layers.1.blocks.1.attn.proj.weight", "bb.layers.1.blocks.1.attn.proj.bias", "bb.layers.1.blocks.1.norm2.weight", "bb.layers.1.blocks.1.norm2.bias", "bb.layers.1.blocks.1.mlp.fc1.weight", "bb.layers.1.blocks.1.mlp.fc1.bias", "bb.layers.1.blocks.1.mlp.fc2.weight", "bb.layers.1.blocks.1.mlp.fc2.bias", "bb.layers.1.downsample.reduction.weight", "bb.layers.1.downsample.norm.weight", "bb.layers.1.downsample.norm.bias", "bb.layers.2.blocks.0.norm1.weight", "bb.layers.2.blocks.0.norm1.bias", "bb.layers.2.blocks.0.attn.relative_position_bias_table", "bb.layers.2.blocks.0.attn.relative_position_index", "bb.layers.2.blocks.0.attn.qkv.weight", "bb.layers.2.blocks.0.attn.qkv.bias", "bb.layers.2.blocks.0.attn.proj.weight", "bb.layers.2.blocks.0.attn.proj.bias", "bb.layers.2.blocks.0.norm2.weight", "bb.layers.2.blocks.0.norm2.bias", "bb.layers.2.blocks.0.mlp.fc1.weight", "bb.layers.2.blocks.0.mlp.fc1.bias", "bb.layers.2.blocks.0.mlp.fc2.weight", "bb.layers.2.blocks.0.mlp.fc2.bias", "bb.layers.2.blocks.1.norm1.weight", "bb.layers.2.blocks.1.norm1.bias", "bb.layers.2.blocks.1.attn.relative_position_bias_table", "bb.layers.2.blocks.1.attn.relative_position_index", "bb.layers.2.blocks.1.attn.qkv.weight", "bb.layers.2.blocks.1.attn.qkv.bias", "bb.layers.2.blocks.1.attn.proj.weight", "bb.layers.2.blocks.1.attn.proj.bias", "bb.layers.2.blocks.1.norm2.weight", "bb.layers.2.blocks.1.norm2.bias", "bb.layers.2.blocks.1.mlp.fc1.weight", "bb.layers.2.blocks.1.mlp.fc1.bias", "bb.layers.2.blocks.1.mlp.fc2.weight", "bb.layers.2.blocks.1.mlp.fc2.bias", "bb.layers.2.blocks.2.norm1.weight", "bb.layers.2.blocks.2.norm1.bias", "bb.layers.2.blocks.2.attn.relative_position_bias_table", "bb.layers.2.blocks.2.attn.relative_position_index", "bb.layers.2.blocks.2.attn.qkv.weight", "bb.layers.2.blocks.2.attn.qkv.bias", "bb.layers.2.blocks.2.attn.proj.weight", "bb.layers.2.blocks.2.attn.proj.bias", "bb.layers.2.blocks.2.norm2.weight", "bb.layers.2.blocks.2.norm2.bias", "bb.layers.2.blocks.2.mlp.fc1.weight", "bb.layers.2.blocks.2.mlp.fc1.bias", "bb.layers.2.blocks.2.mlp.fc2.weight", "bb.layers.2.blocks.2.mlp.fc2.bias", "bb.layers.2.blocks.3.norm1.weight", "bb.layers.2.blocks.3.norm1.bias", "bb.layers.2.blocks.3.attn.relative_position_bias_table", "bb.layers.2.blocks.3.attn.relative_position_index", "bb.layers.2.blocks.3.attn.qkv.weight", "bb.layers.2.blocks.3.attn.qkv.bias", "bb.layers.2.blocks.3.attn.proj.weight", "bb.layers.2.blocks.3.attn.proj.bias", "bb.layers.2.blocks.3.norm2.weight", "bb.layers.2.blocks.3.norm2.bias", "bb.layers.2.blocks.3.mlp.fc1.weight", "bb.layers.2.blocks.3.mlp.fc1.bias", "bb.layers.2.blocks.3.mlp.fc2.weight", "bb.layers.2.blocks.3.mlp.fc2.bias", "bb.layers.2.blocks.4.norm1.weight", "bb.layers.2.blocks.4.norm1.bias", "bb.layers.2.blocks.4.attn.relative_position_bias_table", "bb.layers.2.blocks.4.attn.relative_position_index", "bb.layers.2.blocks.4.attn.qkv.weight", "bb.layers.2.blocks.4.attn.qkv.bias", "bb.layers.2.blocks.4.attn.proj.weight", "bb.layers.2.blocks.4.attn.proj.bias", "bb.layers.2.blocks.4.norm2.weight", "bb.layers.2.blocks.4.norm2.bias", "bb.layers.2.blocks.4.mlp.fc1.weight", "bb.layers.2.blocks.4.mlp.fc1.bias", "bb.layers.2.blocks.4.mlp.fc2.weight", "bb.layers.2.blocks.4.mlp.fc2.bias", "bb.layers.2.blocks.5.norm1.weight", "bb.layers.2.blocks.5.norm1.bias", "bb.layers.2.blocks.5.attn.relative_position_bias_table", "bb.layers.2.blocks.5.attn.relative_position_index", "bb.layers.2.blocks.5.attn.qkv.weight", "bb.layers.2.blocks.5.attn.qkv.bias", "bb.layers.2.blocks.5.attn.proj.weight", "bb.layers.2.blocks.5.attn.proj.bias", "bb.layers.2.blocks.5.norm2.weight", "bb.layers.2.blocks.5.norm2.bias", "bb.layers.2.blocks.5.mlp.fc1.weight", "bb.layers.2.blocks.5.mlp.fc1.bias", "bb.layers.2.blocks.5.mlp.fc2.weight", "bb.layers.2.blocks.5.mlp.fc2.bias", "bb.layers.2.blocks.6.norm1.weight", "bb.layers.2.blocks.6.norm1.bias", "bb.layers.2.blocks.6.attn.relative_position_bias_table", "bb.layers.2.blocks.6.attn.relative_position_index", "bb.layers.2.blocks.6.attn.qkv.weight", "bb.layers.2.blocks.6.attn.qkv.bias", "bb.layers.2.blocks.6.attn.proj.weight", "bb.layers.2.blocks.6.attn.proj.bias", "bb.layers.2.blocks.6.norm2.weight", "bb.layers.2.blocks.6.norm2.bias", "bb.layers.2.blocks.6.mlp.fc1.weight", "bb.layers.2.blocks.6.mlp.fc1.bias", "bb.layers.2.blocks.6.mlp.fc2.weight", "bb.layers.2.blocks.6.mlp.fc2.bias", "bb.layers.2.blocks.7.norm1.weight", "bb.layers.2.blocks.7.norm1.bias", "bb.layers.2.blocks.7.attn.relative_position_bias_table", "bb.layers.2.blocks.7.attn.relative_position_index", "bb.layers.2.blocks.7.attn.qkv.weight", "bb.layers.2.blocks.7.attn.qkv.bias", "bb.layers.2.blocks.7.attn.proj.weight", "bb.layers.2.blocks.7.attn.proj.bias", "bb.layers.2.blocks.7.norm2.weight", "bb.layers.2.blocks.7.norm2.bias", "bb.layers.2.blocks.7.mlp.fc1.weight", "bb.layers.2.blocks.7.mlp.fc1.bias", "bb.layers.2.blocks.7.mlp.fc2.weight", "bb.layers.2.blocks.7.mlp.fc2.bias", "bb.layers.2.blocks.8.norm1.weight", "bb.layers.2.blocks.8.norm1.bias", "bb.layers.2.blocks.8.attn.relative_position_bias_table", "bb.layers.2.blocks.8.attn.relative_position_index", "bb.layers.2.blocks.8.attn.qkv.weight", "bb.layers.2.blocks.8.attn.qkv.bias", "bb.layers.2.blocks.8.attn.proj.weight", "bb.layers.2.blocks.8.attn.proj.bias", "bb.layers.2.blocks.8.norm2.weight", "bb.layers.2.blocks.8.norm2.bias", "bb.layers.2.blocks.8.mlp.fc1.weight", "bb.layers.2.blocks.8.mlp.fc1.bias", "bb.layers.2.blocks.8.mlp.fc2.weight", "bb.layers.2.blocks.8.mlp.fc2.bias", "bb.layers.2.blocks.9.norm1.weight", "bb.layers.2.blocks.9.norm1.bias", "bb.layers.2.blocks.9.attn.relative_position_bias_table", "bb.layers.2.blocks.9.attn.relative_position_index", "bb.layers.2.blocks.9.attn.qkv.weight", "bb.layers.2.blocks.9.attn.qkv.bias", "bb.layers.2.blocks.9.attn.proj.weight", "bb.layers.2.blocks.9.attn.proj.bias", "bb.layers.2.blocks.9.norm2.weight", "bb.layers.2.blocks.9.norm2.bias", "bb.layers.2.blocks.9.mlp.fc1.weight", "bb.layers.2.blocks.9.mlp.fc1.bias", "bb.layers.2.blocks.9.mlp.fc2.weight", "bb.layers.2.blocks.9.mlp.fc2.bias", "bb.layers.2.blocks.10.norm1.weight", "bb.layers.2.blocks.10.norm1.bias", "bb.layers.2.blocks.10.attn.relative_position_bias_table", "bb.layers.2.blocks.10.attn.relative_position_index", "bb.layers.2.blocks.10.attn.qkv.weight", "bb.layers.2.blocks.10.attn.qkv.bias", "bb.layers.2.blocks.10.attn.proj.weight", "bb.layers.2.blocks.10.attn.proj.bias", "bb.layers.2.blocks.10.norm2.weight", "bb.layers.2.blocks.10.norm2.bias", "bb.layers.2.blocks.10.mlp.fc1.weight", "bb.layers.2.blocks.10.mlp.fc1.bias", "bb.layers.2.blocks.10.mlp.fc2.weight", "bb.layers.2.blocks.10.mlp.fc2.bias", "bb.layers.2.blocks.11.norm1.weight", "bb.layers.2.blocks.11.norm1.bias", "bb.layers.2.blocks.11.attn.relative_position_bias_table", "bb.layers.2.blocks.11.attn.relative_position_index", "bb.layers.2.blocks.11.attn.qkv.weight", "bb.layers.2.blocks.11.attn.qkv.bias", "bb.layers.2.blocks.11.attn.proj.weight", "bb.layers.2.blocks.11.attn.proj.bias", "bb.layers.2.blocks.11.norm2.weight", "bb.layers.2.blocks.11.norm2.bias", "bb.layers.2.blocks.11.mlp.fc1.weight", "bb.layers.2.blocks.11.mlp.fc1.bias", "bb.layers.2.blocks.11.mlp.fc2.weight", "bb.layers.2.blocks.11.mlp.fc2.bias", "bb.layers.2.blocks.12.norm1.weight", "bb.layers.2.blocks.12.norm1.bias", "bb.layers.2.blocks.12.attn.relative_position_bias_table", "bb.layers.2.blocks.12.attn.relative_position_index", "bb.layers.2.blocks.12.attn.qkv.weight", "bb.layers.2.blocks.12.attn.qkv.bias", "bb.layers.2.blocks.12.attn.proj.weight", "bb.layers.2.blocks.12.attn.proj.bias", "bb.layers.2.blocks.12.norm2.weight", "bb.layers.2.blocks.12.norm2.bias", "bb.layers.2.blocks.12.mlp.fc1.weight", "bb.layers.2.blocks.12.mlp.fc1.bias", "bb.layers.2.blocks.12.mlp.fc2.weight", "bb.layers.2.blocks.12.mlp.fc2.bias", "bb.layers.2.blocks.13.norm1.weight", "bb.layers.2.blocks.13.norm1.bias", "bb.layers.2.blocks.13.attn.relative_position_bias_table", "bb.layers.2.blocks.13.attn.relative_position_index", "bb.layers.2.blocks.13.attn.qkv.weight", "bb.layers.2.blocks.13.attn.qkv.bias", "bb.layers.2.blocks.13.attn.proj.weight", "bb.layers.2.blocks.13.attn.proj.bias", "bb.layers.2.blocks.13.norm2.weight", "bb.layers.2.blocks.13.norm2.bias", "bb.layers.2.blocks.13.mlp.fc1.weight", "bb.layers.2.blocks.13.mlp.fc1.bias", "bb.layers.2.blocks.13.mlp.fc2.weight", "bb.layers.2.blocks.13.mlp.fc2.bias", "bb.layers.2.blocks.14.norm1.weight", "bb.layers.2.blocks.14.norm1.bias", "bb.layers.2.blocks.14.attn.relative_position_bias_table", "bb.layers.2.blocks.14.attn.relative_position_index", "bb.layers.2.blocks.14.attn.qkv.weight", "bb.layers.2.blocks.14.attn.qkv.bias", "bb.layers.2.blocks.14.attn.proj.weight", "bb.layers.2.blocks.14.attn.proj.bias", "bb.layers.2.blocks.14.norm2.weight", "bb.layers.2.blocks.14.norm2.bias", "bb.layers.2.blocks.14.mlp.fc1.weight", "bb.layers.2.blocks.14.mlp.fc1.bias", "bb.layers.2.blocks.14.mlp.fc2.weight", "bb.layers.2.blocks.14.mlp.fc2.bias", "bb.layers.2.blocks.15.norm1.weight", "bb.layers.2.blocks.15.norm1.bias", "bb.layers.2.blocks.15.attn.relative_position_bias_table", "bb.layers.2.blocks.15.attn.relative_position_index", "bb.layers.2.blocks.15.attn.qkv.weight", "bb.layers.2.blocks.15.attn.qkv.bias", "bb.layers.2.blocks.15.attn.proj.weight", "bb.layers.2.blocks.15.attn.proj.bias", "bb.layers.2.blocks.15.norm2.weight", "bb.layers.2.blocks.15.norm2.bias", "bb.layers.2.blocks.15.mlp.fc1.weight", "bb.layers.2.blocks.15.mlp.fc1.bias", "bb.layers.2.blocks.15.mlp.fc2.weight", "bb.layers.2.blocks.15.mlp.fc2.bias", "bb.layers.2.blocks.16.norm1.weight", "bb.layers.2.blocks.16.norm1.bias", "bb.layers.2.blocks.16.attn.relative_position_bias_table", "bb.layers.2.blocks.16.attn.relative_position_index", "bb.layers.2.blocks.16.attn.qkv.weight", "bb.layers.2.blocks.16.attn.qkv.bias", "bb.layers.2.blocks.16.attn.proj.weight", "bb.layers.2.blocks.16.attn.proj.bias", "bb.layers.2.blocks.16.norm2.weight", "bb.layers.2.blocks.16.norm2.bias", "bb.layers.2.blocks.16.mlp.fc1.weight", "bb.layers.2.blocks.16.mlp.fc1.bias", "bb.layers.2.blocks.16.mlp.fc2.weight", "bb.layers.2.blocks.16.mlp.fc2.bias", "bb.layers.2.blocks.17.norm1.weight", "bb.layers.2.blocks.17.norm1.bias", "bb.layers.2.blocks.17.attn.relative_position_bias_table", "bb.layers.2.blocks.17.attn.relative_position_index", "bb.layers.2.blocks.17.attn.qkv.weight", "bb.layers.2.blocks.17.attn.qkv.bias", "bb.layers.2.blocks.17.attn.proj.weight", "bb.layers.2.blocks.17.attn.proj.bias", "bb.layers.2.blocks.17.norm2.weight", "bb.layers.2.blocks.17.norm2.bias", "bb.layers.2.blocks.17.mlp.fc1.weight", "bb.layers.2.blocks.17.mlp.fc1.bias", "bb.layers.2.blocks.17.mlp.fc2.weight", "bb.layers.2.blocks.17.mlp.fc2.bias", "bb.layers.2.downsample.reduction.weight", "bb.layers.2.downsample.norm.weight", "bb.layers.2.downsample.norm.bias", "bb.layers.3.blocks.0.norm1.weight", "bb.layers.3.blocks.0.norm1.bias", "bb.layers.3.blocks.0.attn.relative_position_bias_table", "bb.layers.3.blocks.0.attn.relative_position_index", "bb.layers.3.blocks.0.attn.qkv.weight", "bb.layers.3.blocks.0.attn.qkv.bias", "bb.layers.3.blocks.0.attn.proj.weight", "bb.layers.3.blocks.0.attn.proj.bias", "bb.layers.3.blocks.0.norm2.weight", "bb.layers.3.blocks.0.norm2.bias", "bb.layers.3.blocks.0.mlp.fc1.weight", "bb.layers.3.blocks.0.mlp.fc1.bias", "bb.layers.3.blocks.0.mlp.fc2.weight", "bb.layers.3.blocks.0.mlp.fc2.bias", "bb.layers.3.blocks.1.norm1.weight", "bb.layers.3.blocks.1.norm1.bias", "bb.layers.3.blocks.1.attn.relative_position_bias_table", "bb.layers.3.blocks.1.attn.relative_position_index", "bb.layers.3.blocks.1.attn.qkv.weight", "bb.layers.3.blocks.1.attn.qkv.bias", "bb.layers.3.blocks.1.attn.proj.weight", "bb.layers.3.blocks.1.attn.proj.bias", "bb.layers.3.blocks.1.norm2.weight", "bb.layers.3.blocks.1.norm2.bias", "bb.layers.3.blocks.1.mlp.fc1.weight", "bb.layers.3.blocks.1.mlp.fc1.bias", "bb.layers.3.blocks.1.mlp.fc2.weight", "bb.layers.3.blocks.1.mlp.fc2.bias", "bb.norm0.weight", "bb.norm0.bias", "bb.norm1.weight", "bb.norm1.bias", "bb.norm2.weight", "bb.norm2.bias", "bb.norm3.weight", "bb.norm3.bias", "squeeze_module.0.conv_in.weight", "squeeze_module.0.conv_in.bias", "squeeze_module.0.dec_att.aspp1.atrous_conv.offset_conv.weight", "squeeze_module.0.dec_att.aspp1.atrous_conv.offset_conv.bias", "squeeze_module.0.dec_att.aspp1.atrous_conv.modulator_conv.weight", "squeeze_module.0.dec_att.aspp1.atrous_conv.modulator_conv.bias", "squeeze_module.0.dec_att.aspp1.atrous_conv.regular_conv.weight", "squeeze_module.0.dec_att.aspp1.bn.weight", "squeeze_module.0.dec_att.aspp1.bn.bias", "squeeze_module.0.dec_att.aspp1.bn.running_mean", "squeeze_module.0.dec_att.aspp1.bn.running_var", "squeeze_module.0.dec_att.aspp_deforms.0.atrous_conv.offset_conv.weight", "squeeze_module.0.dec_att.aspp_deforms.0.atrous_conv.offset_conv.bias", "squeeze_module.0.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.weight", "squeeze_module.0.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.bias", "squeeze_module.0.dec_att.aspp_deforms.0.atrous_conv.regular_conv.weight", "squeeze_module.0.dec_att.aspp_deforms.0.bn.weight", "squeeze_module.0.dec_att.aspp_deforms.0.bn.bias", "squeeze_module.0.dec_att.aspp_deforms.0.bn.running_mean", "squeeze_module.0.dec_att.aspp_deforms.0.bn.running_var", "squeeze_module.0.dec_att.global_avg_pool.1.weight", "squeeze_module.0.dec_att.global_avg_pool.2.weight", "squeeze_module.0.dec_att.global_avg_pool.2.bias", "squeeze_module.0.dec_att.global_avg_pool.2.running_mean", "squeeze_module.0.dec_att.global_avg_pool.2.running_var", "squeeze_module.0.dec_att.conv1.weight", "squeeze_module.0.dec_att.bn1.weight", "squeeze_module.0.dec_att.bn1.bias", "squeeze_module.0.dec_att.bn1.running_mean", "squeeze_module.0.dec_att.bn1.running_var", "squeeze_module.0.conv_out.weight", "squeeze_module.0.conv_out.bias", "squeeze_module.0.bn_in.weight", "squeeze_module.0.bn_in.bias", "squeeze_module.0.bn_in.running_mean", "squeeze_module.0.bn_in.running_var", "squeeze_module.0.bn_out.weight", "squeeze_module.0.bn_out.bias", "squeeze_module.0.bn_out.running_mean", "squeeze_module.0.bn_out.running_var", "decoder.ipt_blk4.conv1.weight", "decoder.ipt_blk4.conv1.bias", "decoder.ipt_blk4.conv_out.weight", "decoder.ipt_blk4.conv_out.bias", "decoder.ipt_blk3.conv1.weight", "decoder.ipt_blk3.conv1.bias", "decoder.ipt_blk3.conv_out.weight", "decoder.ipt_blk3.conv_out.bias", "decoder.ipt_blk2.conv1.weight", "decoder.ipt_blk2.conv1.bias", "decoder.ipt_blk2.conv_out.weight", "decoder.ipt_blk2.conv_out.bias", "decoder.ipt_blk1.conv1.weight", "decoder.ipt_blk1.conv1.bias", "decoder.ipt_blk1.conv_out.weight", "decoder.ipt_blk1.conv_out.bias", "decoder.decoder_block4.conv_in.weight", "decoder.decoder_block4.conv_in.bias", "decoder.decoder_block4.dec_att.aspp1.atrous_conv.offset_conv.weight", "decoder.decoder_block4.dec_att.aspp1.atrous_conv.offset_conv.bias", "decoder.decoder_block4.dec_att.aspp1.atrous_conv.modulator_conv.weight", "decoder.decoder_block4.dec_att.aspp1.atrous_conv.modulator_conv.bias", "decoder.decoder_block4.dec_att.aspp1.atrous_conv.regular_conv.weight", "decoder.decoder_block4.dec_att.aspp1.bn.weight", "decoder.decoder_block4.dec_att.aspp1.bn.bias", "decoder.decoder_block4.dec_att.aspp1.bn.running_mean", "decoder.decoder_block4.dec_att.aspp1.bn.running_var", "decoder.decoder_block4.dec_att.aspp_deforms.0.atrous_conv.offset_conv.weight", "decoder.decoder_block4.dec_att.aspp_deforms.0.atrous_conv.offset_conv.bias", "decoder.decoder_block4.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.weight", "decoder.decoder_block4.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.bias", "decoder.decoder_block4.dec_att.aspp_deforms.0.atrous_conv.regular_conv.weight", "decoder.decoder_block4.dec_att.aspp_deforms.0.bn.weight", "decoder.decoder_block4.dec_att.aspp_deforms.0.bn.bias", "decoder.decoder_block4.dec_att.aspp_deforms.0.bn.running_mean", "decoder.decoder_block4.dec_att.aspp_deforms.0.bn.running_var", "decoder.decoder_block4.dec_att.global_avg_pool.1.weight", "decoder.decoder_block4.dec_att.global_avg_pool.2.weight", "decoder.decoder_block4.dec_att.global_avg_pool.2.bias", "decoder.decoder_block4.dec_att.global_avg_pool.2.running_mean", "decoder.decoder_block4.dec_att.global_avg_pool.2.running_var", "decoder.decoder_block4.dec_att.conv1.weight", "decoder.decoder_block4.dec_att.bn1.weight", "decoder.decoder_block4.dec_att.bn1.bias", "decoder.decoder_block4.dec_att.bn1.running_mean", "decoder.decoder_block4.dec_att.bn1.running_var", "decoder.decoder_block4.conv_out.weight", "decoder.decoder_block4.conv_out.bias", "decoder.decoder_block4.bn_in.weight", "decoder.decoder_block4.bn_in.bias", "decoder.decoder_block4.bn_in.running_mean", "decoder.decoder_block4.bn_in.running_var", "decoder.decoder_block4.bn_out.weight", "decoder.decoder_block4.bn_out.bias", "decoder.decoder_block4.bn_out.running_mean", "decoder.decoder_block4.bn_out.running_var", "decoder.decoder_block3.conv_in.weight", "decoder.decoder_block3.conv_in.bias", "decoder.decoder_block3.dec_att.aspp1.atrous_conv.offset_conv.weight", "decoder.decoder_block3.dec_att.aspp1.atrous_conv.offset_conv.bias", "decoder.decoder_block3.dec_att.aspp1.atrous_conv.modulator_conv.weight", "decoder.decoder_block3.dec_att.aspp1.atrous_conv.modulator_conv.bias", "decoder.decoder_block3.dec_att.aspp1.atrous_conv.regular_conv.weight", "decoder.decoder_block3.dec_att.aspp1.bn.weight", "decoder.decoder_block3.dec_att.aspp1.bn.bias", "decoder.decoder_block3.dec_att.aspp1.bn.running_mean", "decoder.decoder_block3.dec_att.aspp1.bn.running_var", "decoder.decoder_block3.dec_att.aspp_deforms.0.atrous_conv.offset_conv.weight", "decoder.decoder_block3.dec_att.aspp_deforms.0.atrous_conv.offset_conv.bias", "decoder.decoder_block3.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.weight", "decoder.decoder_block3.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.bias", "decoder.decoder_block3.dec_att.aspp_deforms.0.atrous_conv.regular_conv.weight", "decoder.decoder_block3.dec_att.aspp_deforms.0.bn.weight", "decoder.decoder_block3.dec_att.aspp_deforms.0.bn.bias", "decoder.decoder_block3.dec_att.aspp_deforms.0.bn.running_mean", "decoder.decoder_block3.dec_att.aspp_deforms.0.bn.running_var", "decoder.decoder_block3.dec_att.global_avg_pool.1.weight", "decoder.decoder_block3.dec_att.global_avg_pool.2.weight", "decoder.decoder_block3.dec_att.global_avg_pool.2.bias", "decoder.decoder_block3.dec_att.global_avg_pool.2.running_mean", "decoder.decoder_block3.dec_att.global_avg_pool.2.running_var", "decoder.decoder_block3.dec_att.conv1.weight", "decoder.decoder_block3.dec_att.bn1.weight", "decoder.decoder_block3.dec_att.bn1.bias", "decoder.decoder_block3.dec_att.bn1.running_mean", "decoder.decoder_block3.dec_att.bn1.running_var", "decoder.decoder_block3.conv_out.weight", "decoder.decoder_block3.conv_out.bias", "decoder.decoder_block3.bn_in.weight", "decoder.decoder_block3.bn_in.bias", "decoder.decoder_block3.bn_in.running_mean", "decoder.decoder_block3.bn_in.running_var", "decoder.decoder_block3.bn_out.weight", "decoder.decoder_block3.bn_out.bias", "decoder.decoder_block3.bn_out.running_mean", "decoder.decoder_block3.bn_out.running_var", "decoder.decoder_block2.conv_in.weight", "decoder.decoder_block2.conv_in.bias", "decoder.decoder_block2.dec_att.aspp1.atrous_conv.offset_conv.weight", "decoder.decoder_block2.dec_att.aspp1.atrous_conv.offset_conv.bias", "decoder.decoder_block2.dec_att.aspp1.atrous_conv.modulator_conv.weight", "decoder.decoder_block2.dec_att.aspp1.atrous_conv.modulator_conv.bias", "decoder.decoder_block2.dec_att.aspp1.atrous_conv.regular_conv.weight", "decoder.decoder_block2.dec_att.aspp1.bn.weight", "decoder.decoder_block2.dec_att.aspp1.bn.bias", "decoder.decoder_block2.dec_att.aspp1.bn.running_mean", "decoder.decoder_block2.dec_att.aspp1.bn.running_var", "decoder.decoder_block2.dec_att.aspp_deforms.0.atrous_conv.offset_conv.weight", "decoder.decoder_block2.dec_att.aspp_deforms.0.atrous_conv.offset_conv.bias", "decoder.decoder_block2.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.weight", "decoder.decoder_block2.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.bias", "decoder.decoder_block2.dec_att.aspp_deforms.0.atrous_conv.regular_conv.weight", "decoder.decoder_block2.dec_att.aspp_deforms.0.bn.weight", "decoder.decoder_block2.dec_att.aspp_deforms.0.bn.bias", "decoder.decoder_block2.dec_att.aspp_deforms.0.bn.running_mean", "decoder.decoder_block2.dec_att.aspp_deforms.0.bn.running_var", "decoder.decoder_block2.dec_att.global_avg_pool.1.weight", "decoder.decoder_block2.dec_att.global_avg_pool.2.weight", "decoder.decoder_block2.dec_att.global_avg_pool.2.bias", "decoder.decoder_block2.dec_att.global_avg_pool.2.running_mean", "decoder.decoder_block2.dec_att.global_avg_pool.2.running_var", "decoder.decoder_block2.dec_att.conv1.weight", "decoder.decoder_block2.dec_att.bn1.weight", "decoder.decoder_block2.dec_att.bn1.bias", "decoder.decoder_block2.dec_att.bn1.running_mean", "decoder.decoder_block2.dec_att.bn1.running_var", "decoder.decoder_block2.conv_out.weight", "decoder.decoder_block2.conv_out.bias", "decoder.decoder_block2.bn_in.weight", "decoder.decoder_block2.bn_in.bias", "decoder.decoder_block2.bn_in.running_mean", "decoder.decoder_block2.bn_in.running_var", "decoder.decoder_block2.bn_out.weight", "decoder.decoder_block2.bn_out.bias", "decoder.decoder_block2.bn_out.running_mean", "decoder.decoder_block2.bn_out.running_var", "decoder.decoder_block1.conv_in.weight", "decoder.decoder_block1.conv_in.bias", "decoder.decoder_block1.dec_att.aspp1.atrous_conv.offset_conv.weight", "decoder.decoder_block1.dec_att.aspp1.atrous_conv.offset_conv.bias", "decoder.decoder_block1.dec_att.aspp1.atrous_conv.modulator_conv.weight", "decoder.decoder_block1.dec_att.aspp1.atrous_conv.modulator_conv.bias", "decoder.decoder_block1.dec_att.aspp1.atrous_conv.regular_conv.weight", "decoder.decoder_block1.dec_att.aspp1.bn.weight", "decoder.decoder_block1.dec_att.aspp1.bn.bias", "decoder.decoder_block1.dec_att.aspp1.bn.running_mean", "decoder.decoder_block1.dec_att.aspp1.bn.running_var", "decoder.decoder_block1.dec_att.aspp_deforms.0.atrous_conv.offset_conv.weight", "decoder.decoder_block1.dec_att.aspp_deforms.0.atrous_conv.offset_conv.bias", "decoder.decoder_block1.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.weight", "decoder.decoder_block1.dec_att.aspp_deforms.0.atrous_conv.modulator_conv.bias", "decoder.decoder_block1.dec_att.aspp_deforms.0.atrous_conv.regular_conv.weight", "decoder.decoder_block1.dec_att.aspp_deforms.0.bn.weight", "decoder.decoder_block1.dec_att.aspp_deforms.0.bn.bias", "decoder.decoder_block1.dec_att.aspp_deforms.0.bn.running_mean", "decoder.decoder_block1.dec_att.aspp_deforms.0.bn.running_var", "decoder.decoder_block1.dec_att.global_avg_pool.1.weight", "decoder.decoder_block1.dec_att.global_avg_pool.2.weight", "decoder.decoder_block1.dec_att.global_avg_pool.2.bias", "decoder.decoder_block1.dec_att.global_avg_pool.2.running_mean", "decoder.decoder_block1.dec_att.global_avg_pool.2.running_var", "decoder.decoder_block1.dec_att.conv1.weight", "decoder.decoder_block1.dec_att.bn1.weight", "decoder.decoder_block1.dec_att.bn1.bias", "decoder.decoder_block1.dec_att.bn1.running_mean", "decoder.decoder_block1.dec_att.bn1.running_var", "decoder.decoder_block1.conv_out.weight", "decoder.decoder_block1.conv_out.bias", "decoder.decoder_block1.bn_in.weight", "decoder.decoder_block1.bn_in.bias", "decoder.decoder_block1.bn_in.running_mean", "decoder.decoder_block1.bn_in.running_var", "decoder.decoder_block1.bn_out.weight", "decoder.decoder_block1.bn_out.bias", "decoder.decoder_block1.bn_out.running_mean", "decoder.decoder_block1.bn_out.running_var", "decoder.conv_out1.0.weight", "decoder.conv_out1.0.bias", "decoder.lateral_block4.conv.weight", "decoder.lateral_block4.conv.bias", "decoder.lateral_block3.conv.weight", "decoder.lateral_block3.conv.bias", "decoder.lateral_block2.conv.weight", "decoder.lateral_block2.conv.bias", "decoder.conv_ms_spvn_4.weight", "decoder.conv_ms_spvn_4.bias", "decoder.conv_ms_spvn_3.weight", "decoder.conv_ms_spvn_3.bias", "decoder.conv_ms_spvn_2.weight", "decoder.conv_ms_spvn_2.bias", "decoder.gdt_convs_3.0.weight", "decoder.gdt_convs_3.0.bias", "decoder.gdt_convs_3.1.weight", "decoder.gdt_convs_3.1.bias", "decoder.gdt_convs_3.1.running_mean", "decoder.gdt_convs_3.1.running_var", "decoder.gdt_convs_2.0.weight", "decoder.gdt_convs_2.0.bias", "decoder.gdt_convs_2.1.weight", "decoder.gdt_convs_2.1.bias", "decoder.gdt_convs_2.1.running_mean", "decoder.gdt_convs_2.1.running_var", "decoder.gdt_convs_pred_3.0.weight", "decoder.gdt_convs_pred_3.0.bias", "decoder.gdt_convs_pred_2.0.weight", "decoder.gdt_convs_pred_2.0.bias", "decoder.gdt_convs_attn_3.0.weight", "decoder.gdt_convs_attn_3.0.bias", "decoder.gdt_convs_attn_2.0.weight", "decoder.gdt_convs_attn_2.0.bias".
Unexpected key(s) in state_dict: "model".

File "E:\AI\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\AI\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\AI\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\AI\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-BiRefNet-ZHO\birefnet.py", line 59, in load_model
net.load_state_dict(state_dict)
File "E:\AI\ComfyUI_windows_portable_nvidia_cu121_or_cpu\ComfyUI_windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 2152, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(

@sharpcj
Copy link

sharpcj commented Aug 24, 2024

I got the same error , had you fixed it ?

@curlysasha
Copy link

same

@ZhengPeng7
Copy link

Load latest BiRefNet in one line: https://huggingface.co/ZhengPeng7/BiRefNet#1-load-birefnet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants