smthemex / ComfyUI_Stable_Makeup

You can apply makeup to the characters in comfyui
Apache License 2.0
58 stars 2 forks source link

Error(s) in loading state_dict for RetinaFace #9

Closed hiowenluke closed 2 months ago

hiowenluke commented 2 months ago

If I use mobilenet, the error occursed :

Error occurred when executing StableMakeup_Sampler:

Error(s) in loading state_dict for RetinaFace:
Missing key(s) in state_dict: "body.stage1.0.0.weight", "body.stage1.0.1.weight", "body.stage1.0.1.bias", "body.stage1.0.1.running_mean", "body.stage1.0.1.running_var", "body.stage1.1.0.weight", "body.stage1.1.1.weight", "body.stage1.1.1.bias", "body.stage1.1.1.running_mean", "body.stage1.1.1.running_var", "body.stage1.1.3.weight", "body.stage1.1.4.weight", "body.stage1.1.4.bias", "body.stage1.1.4.running_mean", "body.stage1.1.4.running_var", "body.stage1.2.0.weight", "body.stage1.2.1.weight", "body.stage1.2.1.bias", "body.stage1.2.1.running_mean", "body.stage1.2.1.running_var", "body.stage1.2.3.weight", "body.stage1.2.4.weight", "body.stage1.2.4.bias", "body.stage1.2.4.running_mean", "body.stage1.2.4.running_var", "body.stage1.3.0.weight", "body.stage1.3.1.weight", "body.stage1.3.1.bias", "body.stage1.3.1.running_mean", "body.stage1.3.1.running_var", "body.stage1.3.3.weight", "body.stage1.3.4.weight", "body.stage1.3.4.bias", "body.stage1.3.4.running_mean", "body.stage1.3.4.running_var", "body.stage1.4.0.weight", "body.stage1.4.1.weight", "body.stage1.4.1.bias", "body.stage1.4.1.running_mean", "body.stage1.4.1.running_var", "body.stage1.4.3.weight",
...
File "D:\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\ComfyUI\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 "D:\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\ComfyUI\ComfyUI\custom_nodes\ComfyUI_Stable_Makeup\stable_makeup_nodes.py", line 228, in makeup_main
detector = FaceDetector(name=facedetector,weight_path=weight_path)
File "D:\ComfyUI\ComfyUI\custom_nodes\ComfyUI_Stable_Makeup\facelib\Retinaface\Retinaface.py", line 59, in __init__
model.load_state_dict(torch.load(weight_path, map_location=device))
File "D:\ComfyUI\ComfyUI\venv\lib\site-packages\torch\nn\modules\module.py", line 2153, in load_state_dict
raise RuntimeError('Error(s) in loading state_dict for {}:\n\t{}'.format(

But after I changed it to resnet, it works.

example

smthemex commented 2 months ago

The other mode seems to have a bug, I will check the code

smthemex commented 2 months ago

new update fix it