vienteck / ComfyUI-Chat-GPT-Integration

GNU General Public License v3.0
29 stars 4 forks source link

max word Issue #3

Closed SimRow closed 9 months ago

SimRow commented 9 months ago

The change of the max_words line gave me this issue somehow.

Error occurred when executing ChatGptPrompt:

ChatGptPrompt.process() missing 1 required positional argument: 'max_words'

File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 155, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 85, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 78, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

vienteck commented 9 months ago

Sorry about that. Pull new repo changes and it should be fixed. Let me know if it works out for you

SimRow commented 9 months ago

Worked, thanks! But I don't get a respond, could be region related, dont know. Also I get another error while encoding the "none" text:

NoneType' object has no attribute 'replace'

File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 155, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 85, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\execution.py", line 78, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\nodes.py", line 55, in encode tokens = clip.tokenize(text) ^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 122, in tokenize return self.tokenizer.tokenize_with_weights(text, return_word_ids) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\comfy\sdxl_clip.py", line 30, in tokenize_with_weights out["g"] = self.clip_g.tokenize_with_weights(text, return_word_ids) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 410, in tokenize_with_weights text = escape_important(text) ^^^^^^^^^^^^^^^^^^^^^^ File "C:\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 249, in escape_important text = text.replace(")", "\0\1") ^^^^^^^^^^^^

jags111 commented 9 months ago

I am also having same issue None object no attrib replace

Failed to talk to OpenAi. sleeping for 10 seconds and trying again
Failed to talk to OpenAi. sleeping for 10 seconds and trying again
Failed to talk to OpenAi. sleeping for 10 seconds and trying again
Returning Text: None
QualityOfLifeSuit_Omar92::debug:None
ERROR:root:!!! Exception during processing !!!
ERROR:root:Traceback (most recent call last):
  File "D:\AI\comfyUI\execution.py", line 155, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
                             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\comfyUI\execution.py", line 85, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
                    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\ComfyUI\custom_nodes\ComfyUI-0246\utils.py", line 363, in new_func
    res_value = old_func(*final_args, **kwargs)
                ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\comfyUI\execution.py", line 78, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
                   ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\comfyUI\nodes.py", line 55, in encode
    tokens = clip.tokenize(text)
             ^^^^^^^^^^^^^^^^^^^
  File "D:\AI\comfyUI\comfy\sd.py", line 122, in tokenize
    return self.tokenizer.tokenize_with_weights(text, return_word_ids)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\comfyUI\comfy\sd1_clip.py", line 493, in tokenize_with_weights
    out[self.clip_name] = getattr(self, self.clip).tokenize_with_weights(text, return_word_ids)
                          ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\comfyUI\comfy\sd1_clip.py", line 410, in tokenize_with_weights
    text = escape_important(text)
           ^^^^^^^^^^^^^^^^^^^^^^
  File "D:\AI\comfyUI\comfy\sd1_clip.py", line 249, in escape_important
    text = text.replace("\\)", "\0\1")
           ^^^^^^^^^^^^
AttributeError: 'NoneType' object has no attribute 'replace'