ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Error occurred when executing CheckpointLoader: expected str, bytes or os.PathLike object, not NoneType

Open Zanariazi01 opened this issue 2 years ago • 6 comments

Hello, I am new in using manager comfyUI and this morning this message appear. I don't really understand it because I have my checkpoint loaded, there are all in .safetensors. Some one can help me to understand what's going on?

"Error occurred when executing CheckpointLoader:

expected str, bytes or os.PathLike object, not NoneType

File "/Users/zanariazi/Applications/ComfyUI/execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/Applications/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 "/Users/zanariazi/Applications/ComfyUI/execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/Applications/ComfyUI/nodes.py", line 527, in load_checkpoint return comfy.sd.load_checkpoint(config_path, ckpt_path, output_vae=True, output_clip=True, embedding_directory=folder_paths.get_folder_paths("embeddings")) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/Applications/ComfyUI/comfy/sd.py", line 488, in load_checkpoint clip = CLIP(clip_target, embedding_directory=embedding_directory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/Applications/ComfyUI/comfy/sd.py", line 105, in init self.tokenizer = tokenizer(embedding_directory=embedding_directory) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/Applications/ComfyUI/comfy/sd1_clip.py", line 491, in init setattr(self, self.clip, tokenizer(embedding_directory=embedding_directory)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/Applications/ComfyUI/comfy/sd1_clip.py", line 360, in init self.tokenizer = tokenizer_class.from_pretrained(tokenizer_path) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/miniconda3/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 2048, in from_pretrained return cls._from_pretrained( ^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/miniconda3/lib/python3.11/site-packages/transformers/tokenization_utils_base.py", line 2287, in _from_pretrained tokenizer = cls(*init_inputs, **init_kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "/Users/zanariazi/miniconda3/lib/python3.11/site-packages/transformers/models/clip/tokenization_clip.py", line 326, in init with open(vocab_file, encoding="utf-8") as vocab_handle: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

Zanariazi01 avatar Mar 12 '24 10:03 Zanariazi01

It appears that the files of ComfyUI installed on your computer are corrupted.

ltdrdata avatar Mar 14 '24 01:03 ltdrdata

Thanks a lot, indeed, I re install comfyUI then it had worked

Zanariazi01 avatar Mar 26 '24 14:03 Zanariazi01

Have you fixed this error yet?

thinghesi avatar Sep 28 '24 02:09 thinghesi

No i couldn't fixe this error, so I re install. Afterward i have not well ranked all pythons and conda files on my mac, and i tried to install them several times, so maybe it comes for this noobi moov 😅

Zanariazi01 avatar Sep 28 '24 12:09 Zanariazi01

I've run into the same issue, but reinstalling didn't fix the problem. The thing is, ComfyUI can run other workflows just fine. The MagicClothing node works okay on its own, but as soon as I try to add a face or a pose, it throws an error.

JayChen02 avatar Oct 27 '24 08:10 JayChen02

I've run into the same issue, but reinstalling didn't fix the problem. The thing is, ComfyUI can run other workflows just fine. The MagicClothing node works okay on its own, but as soon as I try to add a face or a pose, it throws an error.

For issues related to custom nodes, please inquire at the corresponding repository.

ltdrdata avatar Oct 27 '24 09:10 ltdrdata