ComfyUI import error. Do you know any fixes?
Traceback (most recent call last):
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\utils\hub.py", line 424, in cached_files
hf_hub_download(
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\utils_validators.py", line 106, in inner_fn
validate_repo_id(arg_value)
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\utils_validators.py", line 160, in validate_repo_id
raise HFValidationError(
huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\models\segformer_b2_clothes'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\image_processing_base.py", line 340, in get_image_processor_dict
resolved_image_processor_file = cached_file(
^^^^^^^^^^^^
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\utils\hub.py", line 266, in cached_file
file = cached_files(path_or_repo_id=path_or_repo_id, filenames=[filename], **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\utils\hub.py", line 471, in cached_files
_get_cache_file_to_return(path_or_repo_id, filename, cache_dir, revision) for filename in full_filenames
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\utils\hub.py", line 134, in _get_cache_file_to_return
resolved_file = try_to_load_from_cache(path_or_repo_id, full_filename, cache_dir=cache_dir, revision=revision)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\utils_validators.py", line 106, in inner_fn
validate_repo_id(arg_value)
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\huggingface_hub\utils_validators.py", line 160, in validate_repo_id
raise HFValidationError(
huggingface_hub.errors.HFValidationError: Repo id must use alphanumeric chars or '-', '', '.', '--' and '..' are forbidden, '-' and '.' cannot start or end the name, max length is 96: 'C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\models\segformer_b2_clothes'.
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\nodes.py", line 2141, in load_custom_node
module_spec.loader.exec_module(module)
File "", line 999, in exec_module
File "", line 488, in call_with_frames_removed
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfyui_segformer_b2_clothes_init.py", line 1, in
from .segformer_b2_clothes import *
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfyui_segformer_b2_clothes\segformer_b2_clothes.py", line 18, in
processor = SegformerImageProcessor.from_pretrained(model_folder_path)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\image_processing_base.py", line 208, in from_pretrained
image_processor_dict, kwargs = cls.get_image_processor_dict(pretrained_model_name_or_path, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "C:\Users\Razer\Desktop\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\image_processing_base.py", line 359, in get_image_processor_dict
raise OSError(
OSError: Can't load image processor for 'C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\models\segformer_b2_clothes'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\models\segformer_b2_clothes' is the correct path to a directory containing a preprocessor_config.json file
Cannot import C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\custom_nodes\Comfyui_segformer_b2_clothes module for custom nodes: Can't load image processor for 'C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\models\segformer_b2_clothes'. If you were trying to load it from 'https://huggingface.co/models', make sure you don't have a local directory with the same name. Otherwise, make sure 'C:\Users\Razer\Desktop\ComfyUI_windows_portable\ComfyUI\models\segformer_b2_clothes' is the correct path to a directory containing a preprocessor_config.json file
Tried to get some help from others, but none of them worked..
I'm also having this issue. Did you manage to install the node?