ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

unet_dtype() got an unexpected keyword argument 'supported_dtypes'

Open GentlemanHu opened this issue 1 year ago • 3 comments

Error occurred when executing UNETLoader:

unet_dtype() got an unexpected keyword argument 'supported_dtypes'

File "/content/drive/colab_ai/ComfyUI/execution.py", line 152, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/content/drive/colab_ai/ComfyUI/execution.py", line 82, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "/content/drive/colab_ai/ComfyUI/execution.py", line 75, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/content/drive/colab_ai/ComfyUI/nodes.py", line 851, in load_unet
model = comfy.sd.load_unet(unet_path)
File "/content/drive/colab_ai/ComfyUI/comfy/sd.py", line 553, in load_unet
model = load_unet_state_dict(sd)
File "/content/drive/colab_ai/ComfyUI/comfy/sd.py", line 540, in load_unet_state_dict
unet_dtype = model_management.unet_dtype(model_params=parameters, supported_dtypes=model_config.supported_inference_dtypes)

GentlemanHu avatar Feb 17 '24 07:02 GentlemanHu

I occured the same issue

wujm424606 avatar Feb 17 '24 07:02 wujm424606

Not a ComfyUI issue. Fixed in https://github.com/shiimizu/ComfyUI_smZNodes/commit/96382baa08616b59eaf132915f76df3fc1aedb80

shiimizu avatar Feb 17 '24 08:02 shiimizu

Not a ComfyUI issue. Fixed in shiimizu/ComfyUI_smZNodes@96382ba

I'm assuming that updating the nodes via the ComfyUI is the best way to fix this?

mgmandahl avatar Feb 17 '24 20:02 mgmandahl

I'm sorry, but can someone explain what exactly needs to be done to fix the error being discussed?

ModzhaHead avatar Feb 21 '24 07:02 ModzhaHead

I'm sorry, but can someone explain what exactly needs to be done to fix the error being discussed?

Just update custom nodes: ComfyUI_smZNodes

cd /ComfyUI/custom_nodes/ComfyUI_smZNodes git pull

or you can use manager to update ComfyUI_smZNodes

alboto avatar Feb 21 '24 09:02 alboto

I'm sorry, but can someone explain what exactly needs to be done to fix the error being discussed?

Just update custom nodes: ComfyUI_smZNodes

cd /ComfyUI/custom_nodes/ComfyUI_smZNodes git pull

or you can use manager to update ComfyUI_smZNodes

Thanks for the tip, with the help of the git pull command these nodes were actually updated, which did not happen when updating through the ComfyUI manager But that's where the good news ends. The error has not gone away, and still occurs when starting generation in different workflows, using different custom checkpoint loaders for SD1.5/SDXL/Cascade models Perhaps the community will have some brighter ideas on how to fix this error...

ModzhaHead avatar Feb 21 '24 09:02 ModzhaHead

I'm sorry, but can someone explain what exactly needs to be done to fix the error being discussed?

Just update custom nodes: ComfyUI_smZNodes cd /ComfyUI/custom_nodes/ComfyUI_smZNodes git pull or you can use manager to update ComfyUI_smZNodes

Thanks for the tip, with the help of the git pull command these nodes were actually updated, which did not happen when updating through the ComfyUI manager But that's where the good news ends. The error has not gone away, and still occurs when starting generation in different workflows, using different custom checkpoint loaders for SD1.5/SDXL/Cascade models Perhaps the community will have some brighter ideas on how to fix this error...

Did you restart Comfyui after pulling the code from ComfyUI_smZNodes?

alboto avatar Feb 21 '24 09:02 alboto

Did you restart Comfyui after pulling the code from ComfyUI_smZNodes?

Yes, of course I did. In general, everything worked after I ran the git pull command on most of the custom nodes, and also removed and reinstalled ComfyUI_smZNodes (the need for reinstallation was established experimentally, since simply updating the results did not give). In fact, I have already encountered similar situations, they arise as a result of each significant update, and the solutions to the problems that arise are also different each time, although they often involve manually (this is mandatory and important!) updating certain custom nodes. Everything works fine now, thanks for the tip :)

ModzhaHead avatar Feb 21 '24 10:02 ModzhaHead