receyuki / comfyui-prompt-reader-node

The ultimate solution for managing image metadata and multi-tool compatibility. ComfyUI node version of the SD Prompt Reader
MIT License
290 stars 22 forks source link

[BUG] - Prompt Merger producing unsanitised output with concatenated NULL strings. #29

Closed RangerFrank closed 11 months ago

RangerFrank commented 11 months ago

Description

SDPromptMerger throws an error when fed empty strings

Error occurred when executing SDPromptMerger:

list index out of range

File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 143, in recursive_execute input_data_all = get_input_data(inputs, class_def, unique_id, outputs, prompt, extra_data) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "D:\AI\ComfyUI_windows_portable\ComfyUI\execution.py", line 27, in get_input_data obj = outputs[input_unique_id][output_index]



### Reproduction steps

![image](https://github.com/receyuki/comfyui-prompt-reader-node/assets/14126780/14cc6841-de18-4e97-9036-f9724023eae1)

### Image file

_No response_
RangerFrank commented 11 months ago

To clarify, Show Text accepts the null string value from the prompt, but not a concatenated null string from SD Prompt Merger. I think this is an output formatting issue rather than a problem with pysssss, though there should probably be some input sanitation over there too.

RangerFrank commented 11 months ago

Here's the Prompt Merger error from my main workflow

image

This occurs when prompt merger is fed two empty concatenated strings from two other instances of Prompt Merger.

image

receyuki commented 11 months ago

Would you mind sending me this part of the workflow? I can't reproduce this issue with my custom nodes.

receyuki commented 11 months ago

Oh, I get it, you are using two empty primitive nodes. I will fix this issue in the next version.