Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

when executing, stopped at node: "GroundingDinoModelLoader (segment anything)" #74

Open
metsweet999 opened this issue Jul 1, 2024 · 2 comments

Comments

@metsweet999
Copy link

metsweet999 commented Jul 1, 2024

first time to use a workflow including nodes from comfyui_segment_anything",when exectuing, stopped at node of "GroundingDinoModelLoader (segment anything)" ,got prompt in terminal below:
"

got prompt

[rgthree] Using rgthree's optimized recursive execution.

grounding-dino is using models/bert-base-uncased

final text_encoder_type: E:\ComfyUI_Max\ComfyUI\models\bert-base-uncased

!!! Exception during processing!!! expected , or } at line 30671 column 12

Traceback (most recent call last):
File "E:\ComfyUI_Max\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\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 "E:\ComfyUI_Max\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 286, in main
dino_model = load_groundingdino_model(model_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 126, in load_groundingdino_model
dino = local_groundingdino_build_model(dino_model_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models_init_.py", line 17, in build_model
model = build_func(args)
^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models\GroundingDINO\groundingdino.py", line 362, in build_groundingdino
model = GroundingDINO(
^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\models\GroundingDINO\groundingdino.py", line 97, in init
self.tokenizer = get_tokenlizer.get_tokenlizer(text_encoder_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "E:\ComfyUI_Max\ComfyUI\custom_nodes\ComfyUI_LayerStyle\py\local_groundingdino\util\get_tokenlizer.py", line 19, in get_tokenlizer
tokenizer = AutoTokenizer.from_pretrained(text_encoder_type)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\models\auto\tokenization_auto.py", line 908, in from_pretrained
return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\tokenization_utils_base.py", line 2163, in from_pretrained
return cls._from_pretrained(
^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\tokenization_utils_base.py", line 2397, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\models\bert\tokenization_bert_fast.py", line 89, in init
super().init(
File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\tokenization_utils_fast.py", line 115, in init
fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: expected , or } at line 30671 column 12

"

uninstalled extension-comfyui_segment_anything, and uninstalled all libs in "...\ComfyUI\custom_nodes\comfyui_segment_anything\requirements.txt",which are "
segment_anything
timm
addict
yapf
"
then reinstalled extension-comfyui_segment_anything, all libs in "...\ComfyUI\custom_nodes\comfyui_segment_anything\requirements.txt" installed automatically by extension-comfyui_segment_anything.
rerun, got same prompt in treminal.

since seen the lib called "transformers " was related in the prompt in terminal, so uninstalled and then installed "transformers ", still got same prompt.

since seen the extension called "layerdiffusion " was related in the prompt in terminal, so uninstalled and then installed "layerdiffusion ", got same prompt:
"

got prompt

Failed to validate prompt for output 22:

  • ImageCompositeAbsolute 16:
  • Required input is missing: images_b
    Output will be ignored

Failed to validate prompt for output 19:
Output will be ignored
Failed to validate prompt for output 23:
Output will be ignored

[rgthree] Using rgthree's optimized recursive execution.

grounding-dino is using models/bert-base-uncased

final text_encoder_type: E:\ComfyUI_Max\ComfyUI\models\bert-base-uncased

!!! Exception during processing!!! expected , or } at line 30671 column 12

Traceback (most recent call last):
File "E:\ComfyUI_Max\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

File "E:\ComfyUI_Max\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 "E:\ComfyUI_Max\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 286, in main
dino_model = load_groundingdino_model(model_name)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\comfyui_segment_anything\node.py", line 126, in load_groundingdino_model
dino = local_groundingdino_build_model(dino_model_args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\comfyui_segment_anything\local_groundingdino\models_init_.py", line 17, in build_model
model = build_func(args)
^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\ComfyUI\custom_nodes\comfyui_segment_anything\local_groundingdino\models\GroundingDINO\groundingdino.py", line 362, in build_groundingdino
model = GroundingDINO(
^^^^^^^^^^^^^^

File "E:\ComfyUI_Max\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 "E:\ComfyUI_Max\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 "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\models\auto\tokenization_auto.py", line 908, in from_pretrained
return tokenizer_class_fast.from_pretrained(pretrained_model_name_or_path, *inputs, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\tokenization_utils_base.py", line 2163, in from_pretrained
return cls._from_pretrained(
^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\tokenization_utils_base.py", line 2397, in _from_pretrained
tokenizer = cls(*init_inputs, **init_kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\models\bert\tokenization_bert_fast.py", line 89, in init
super().init(

File "E:\ComfyUI_Max\python_embeded\Lib\site-packages\transformers\tokenization_utils_fast.py", line 115, in init
fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Exception: expected , or } at line 30671 column 12

"
seemed like skipped extension-layerStyle, but still almost the same error.
reinstalled the extension-layerStyle, saw the prompt in terminal recovered to its previous state, error still.

and until now i still can't locate where the "line 30671 column 12" is in.

models in models/grounding-dino directory was already re-downloaded following the guidance in "https://github.com/storyicon/comfyui_segment_anything?tab=readme-ov-file".
didn't work.

SOS,just can't figure it out now

屏幕截图 2024-07-01 115407
.

@metsweet999 metsweet999 changed the title when ,executing stopped at node of "GroundingDinoModelLoader (segment anything)" when executing, stopped at node of "GroundingDinoModelLoader (segment anything)" Jul 1, 2024
@metsweet999 metsweet999 changed the title when executing, stopped at node of "GroundingDinoModelLoader (segment anything)" when executing, stopped at node: "GroundingDinoModelLoader (segment anything)" Jul 1, 2024
@metsweet999
Copy link
Author

re-downloaded models in folder "models\bert-base-uncased", with this ,problem solved. hope helpful to u.

@Ethan7493
Copy link

Could you please upload the“GroundingDinoModelLoader (segment anything)” node?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants