shadowcz007 / comfyui-mixlab-nodes

Workflow-to-APP、ScreenShare&FloatingVideo、GPT & 3D、SpeechRecognition&TTS
https://mixlabnodes.com
MIT License
1.13k stars 68 forks source link

Chinese Prompt节点似乎有问题 #236

Open BoosterCore opened 3 months ago

BoosterCore commented 3 months ago

偶然尝试了一下这个节点,发现总是报错,检查了模型都下载齐全了,不太清楚是什么情况。与之对应的英文版节点Prompt Generate运行正常。 !!! Exception during processing!!! 'NoneType' object is not callable Traceback (most recent call last): File "K:\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\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 "K:\ComfyUI_windows_portable\ComfyUI\execution.py", line 65, in map_node_over_list results.append(getattr(obj, func)(**input_data_all)) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-mixlab-nodes\nodes\TextGenerateNode.py", line 337, in run result = parser.parse(t).children ^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\lark.py", line 581, in parse return self.parser.parse(text, start=start, on_error=on_error) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\parser_frontends.py", line 106, in parse return self.parser.parse(stream, chosen_start, **kw) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\parsers\lalr_parser.py", line 41, in parse return self.parser.parse(lexer, start) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\parsers\lalr_parser.py", line 171, in parse return self.parse_from_state(parser_state) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\parsers\lalr_parser.py", line 182, in parse_from_state return state.feed_token(end_token, True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\parsers\lalr_parser.py", line 150, in feed_token value = callbacks[rule](s) ^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\parse_tree_builder.py", line 326, in f return wrapper(func, name, children, None) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\visitors.py", line 443, in _vargs_inline return f(*children) ^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\python_embeded\Lib\site-packages\lark\visitors.py", line 427, in f return _f(self, *args, **kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-mixlab-nodes\nodes\TextGenerateNode.py", line 266, in word return translate(str(word)).rstrip('.') ^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI_windows_portable\ComfyUI\custom_nodes\comfyui-mixlab-nodes\nodes\TextGenerateNode.py", line 82, in translate encoded = zh_en_tokenizer([text], return_tensors="pt") ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: 'NoneType' object is not callable

chimelea666 commented 1 month ago

同问,哪位大神明白?

water110 commented 1 month ago

同样的问题,有人解决了不