storyicon / comfyui_segment_anything

Based on GroundingDino and SAM, use semantic strings to segment any element in an image. The comfyui version of sd-webui-segment-anything.
Apache License 2.0
676 stars 78 forks source link

about bert-base-uncased #34

Closed blackshirt000 closed 9 months ago

blackshirt000 commented 9 months ago

Error occurred when executing GroundingDinoModelLoader (segment anything):

We couldn't connect to 'https://huggingface.co' to load this file, couldn't find it in the cached files and it looks like bert-base-uncased is not the path to a directory containing a file named config.json. Checkout your internet connection or see how to run the library in offline mode at 'https://huggingface.co/docs/transformers/installation#offline-mode'.

File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\execution.py", line 153, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\execution.py", line 83, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\execution.py", line 76, in map_node_over_list results.append(getattr(obj, func)(slice_dict(input_data_all, i))) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 268, in main dino_model = load_groundingdino_model(model_name) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 108, in load_groundingdino_model dino = local_groundingdino_build_model(dino_model_args) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_segment_anything\local_groundingdino\models__init__.py", line 17, in build_model model = build_func(args) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_segment_anything\local_groundingdino\models\GroundingDINO\groundingdino.py", line 362, in build_groundingdino model = GroundingDINO( File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_segment_anything\local_groundingdino\models\GroundingDINO\groundingdino.py", line 97, in init self.tokenizer = get_tokenlizer.get_tokenlizer(text_encoder_type) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui_segment_anything\local_groundingdino\util\get_tokenlizer.py", line 19, in get_tokenlizer tokenizer = AutoTokenizer.from_pretrained(text_encoder_type) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 733, in from_pretrained config = AutoConfig.from_pretrained( File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\models\auto\configuration_auto.py", line 1048, in from_pretrained config_dict, unused_kwargs = PretrainedConfig.get_config_dict(pretrained_model_name_or_path, kwargs) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\configuration_utils.py", line 622, in get_config_dict config_dict, kwargs = cls._get_config_dict(pretrained_model_name_or_path, **kwargs) File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\configuration_utils.py", line 677, in _get_config_dict resolved_config_file = cached_file( File "D:\Zho_Chinese_ComfyUI_windows_portable_light\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\utils\hub.py", line 470, in cached_file raise EnvironmentError(.

shawpook commented 9 months ago

同样的问题,第一次运行要从hug下载东西,但是连接不上,如果是本地的话你换一下网络环境应该就可以了。但我用的云端服务器无法访问hug,我想知道下载的东西是什么以及能否手动放进去。bert-base-uncased这个文件我在本地查找了,webui有使用,但comfyui目录下没有找到,但本地断网这个是可以用的

storyicon commented 9 months ago

This change might address the issue you're encountering. Please check https://github.com/storyicon/comfyui_segment_anything?tab=readme-ov-file#bert-base-uncased for more information. If you have any other problem, feel free to reopen the issue.