marduk191 / ComfyUI-Fluxpromptenhancer

A Prompt Enhancer for flux.1 in ComfyUI
MIT License
42 stars 2 forks source link

data did not match any variant of untagged enum PyPreTokenizerTypeWrapper #3

Closed alenhrp closed 1 month ago

alenhrp commented 1 month ago

Error occurred when executing FluxPromptEnhance:

data did not match any variant of untagged enum PyPreTokenizerTypeWrapper at line 951 column 3

File "F:\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\execution.py", line 283, in execute obj = class_def() File "F:\Zho_Chinese_ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Fluxpromptenhancer\nodes\flux-prompt-enhance-node.py", line 8, in init self.tokenizer = AutoTokenizer.from_pretrained(self.model_checkpoint) File "F:\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\models\auto\tokenization_auto.py", line 825, in from_pretrained return tokenizer_class.from_pretrained(pretrained_model_name_or_path, *inputs, *kwargs) File "F:\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\tokenization_utils_base.py", line 2048, in from_pretrained return cls._from_pretrained( File "F:\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\tokenization_utils_base.py", line 2287, in _from_pretrained tokenizer = cls(init_inputs, **init_kwargs) File "F:\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\models\t5\tokenization_t5_fast.py", line 146, in init super().init( File "F:\Zho_Chinese_ComfyUI_windows_portable\python_embeded\lib\site-packages\transformers\tokenization_utils_fast.py", line 111, in init fast_tokenizer = TokenizerFast.from_file(fast_tokenizer_file)

Close

What is the cause and how to fix it, thanks!

scallbe1 commented 1 month ago

Error occurred when executing FluxPromptEnhance:

data did not match any variant of untagged enum PyPreTokenizerTypeWrapper at line 951 column 3

File "D:\comfyui-2024-08-02\ComfyUI\execution.py", line 283, in execute I get this same error when I use the sample workflow to send string output to the show text node. If I only send the output to workflow/flux I get no errors.

marduk191 commented 1 month ago

can't reproduce, i'll re-open it if i find something

scallbe1 commented 1 month ago

converting the input to widget and feeding it text from another text box causes the line 951 error, i.e. power prompt (simple) rg3 -> flux prompt enhance -> display any (rg3)