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] - 'list' object has no attribute 'strip' #47

Closed SoaringTiger closed 10 months ago

SoaringTiger commented 10 months ago

Description

I generated a image by comfyui-portrait-master

ComfyUI_temp_tnetk_00026_

After I loaded the image with comfyui-prompt-reader-node , got error

Reproduction steps

1、Add the SD Prompt Reader node to your workflow. 2、Drag and drop an image (generated from a previous workflow and otherwise unmodified) into the SD Prompt Reader node. 3、hit "Queue Prompt," 4、error:

'list' object has no attribute 'strip'
File "/opt/ComfyUI/execution.py", line 155, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "/opt/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 "/opt/ComfyUI/execution.py", line 78, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "/opt/ComfyUI/custom_nodes/comfyui-prompt-reader-node/nodes.py", line 156, in load_image
image_data = ImageDataReader(f)
File "/opt/ComfyUI/custom_nodes/comfyui-prompt-reader-node/stable_diffusion_prompt_reader/sd_prompt_reader/image_data_reader.py", line 45, in __init__
self.read_data(file)
File "/opt/ComfyUI/custom_nodes/comfyui-prompt-reader-node/stable_diffusion_prompt_reader/sd_prompt_reader/image_data_reader.py", line 105, in read_data
self._parser = ComfyUI(
File "/opt/ComfyUI/custom_nodes/comfyui-prompt-reader-node/stable_diffusion_prompt_reader/sd_prompt_reader/format/comfyui.py", line 42, in __init__
self._comfy_png()
File "/opt/ComfyUI/custom_nodes/comfyui-prompt-reader-node/stable_diffusion_prompt_reader/sd_prompt_reader/format/comfyui.py", line 84, in _comfy_png
File "/opt/ComfyUI/custom_nodes/comfyui-prompt-reader-node/stable_diffusion_prompt_reader/sd_prompt_reader/format/comfyui.py", line 85, in
self._negative_sdxl.get(key).strip()

Image file

No response

receyuki commented 10 months ago

This is because the SD Prompt Reader doesn't support Portrait Master. As I mentioned in the readme:

Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability to read image metadata correctly, it is recommended to embed the Prompt Saver Node within the workflow to ensure maximum compatibility.

SoaringTiger commented 10 months ago

This is because the SD Prompt Reader doesn't support Portrait Master. As I mentioned in the readme:

Due to custom nodes and complex workflows potentially causing issues with SD Prompt Reader's ability to read image metadata correctly, it is recommended to embed the Prompt Saver Node within the workflow to ensure maximum compatibility.

Thank you for your answer