WASasquatch / was-node-suite-comfyui

An extensive node suite for ComfyUI with over 210 new nodes
MIT License
1.19k stars 178 forks source link

Error using `Load Image Batch` node #81

Closed howon52 closed 1 year ago

howon52 commented 1 year ago

Hello, and thank you for the great addition to comfyui.

I am getting the following error while trying a simple batch load.

Prompt executed in 0.00 seconds
got prompt
Traceback (most recent call last):
  File "/mnt/d/Github_D/ComfyUI/execution.py", line 257, in execute
    recursive_execute(self.server, prompt, self.outputs, x, extra_data, executed, prompt_id, self.outputs_ui)
  File "/mnt/d/Github_D/ComfyUI/execution.py", line 128, in recursive_execute
    output_data, output_ui = get_output_data(obj, input_data_all)
  File "/mnt/d/Github_D/ComfyUI/execution.py", line 75, in get_output_data
    return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
  File "/mnt/d/Github_D/ComfyUI/execution.py", line 68, in map_node_over_list
    results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
  File "/mnt/d/Github_D/ComfyUI/nodes.py", line 946, in save_images
    filename_prefix = compute_vars(filename_prefix)
  File "/mnt/d/Github_D/ComfyUI/nodes.py", line 942, in compute_vars
    input = input.replace("%width%", str(images[0].shape[1]))
TypeError: 'NoneType' object is not subscriptable

Steps to reproduce:

howon52 commented 1 year ago

(Saw issue #25 but your sample workflow link doesn't seem to work anymore)

WASasquatch commented 1 year ago

Hmm. Wonder if it's cause of the list support thing that was added. I'll take a look here in a moment. Could be update to TEXT_TYPE

WASasquatch commented 1 year ago

Hmm. I still can't to get this to give me a NoneType. Well I can, but only when I have removed a file from the folder that it previous indexed as existing. I updated the node to actually state if it found no file, but I'm still unsure where the issue is coming from for people.

Did you by chance add or remove files from the input dir while it was running?

howon52 commented 1 year ago

I think I didn't, but just to check, rebooted ComfyUI now and am still getting the error... Should my files in ./ComfyUI/input/ directory be of specific format or filenames?

WASasquatch commented 1 year ago

It should only gather file paths of valid image formats. Unless there is a format I have included that PIL doesn't read, but I don't think so. I will double check.

Another issue. Oudl be maybe the path? Maybe try a full path to a folder.

Just for information purposes to see if I can reproduce, what sort of file types do you have in there?

howon52 commented 1 year ago

Tried rebooting everything then using full path to folder, seem to have done the job. Thank you for the support, and sorry that took longer than expected!