ltdrdata / ComfyUI-Workflow-Component

This is a side project to experiment with using workflows as components.
GNU General Public License v3.0
197 stars 10 forks source link

Error with image output on custom component #14

Closed chrish-slingshot closed 10 months ago

chrish-slingshot commented 10 months ago

Hey. First up, awesome project. ComfyUI is great but definitely in need of something like this.

So I'm getting an error when trying to get an image out of my custom component. Here's the error:

Error occurred when executing PreviewImage:

'NoneType' object is not subscriptable

File "D:\Stable Diffusion\UI\ComfyUI\ComfyUI\execution.py", line 151, in recursive_execute
output_data, output_ui = get_output_data(obj, input_data_all)
File "D:\Stable Diffusion\UI\ComfyUI\ComfyUI\execution.py", line 81, in get_output_data
return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True)
File "D:\Stable Diffusion\UI\ComfyUI\ComfyUI\execution.py", line 74, in map_node_over_list
results.append(getattr(obj, func)(**slice_dict(input_data_all, i)))
File "D:\Stable Diffusion\UI\ComfyUI\ComfyUI\nodes.py", line 1265, in save_images
full_output_folder, filename, counter, subfolder, filename_prefix = folder_paths.get_save_image_path(filename_prefix, self.output_dir, images[0].shape[1], images[0].shape[0])

I've attached both my custom component and a workflow that uses it (you'll need to select a relevant model from your machine). Just rename from .txt. to .json.

Example.txt FaceDetailerComponent.txt

ltdrdata commented 10 months ago

First of all, I apologize for missing that this issue was raised.

I just analyzed the component, and the problem was that "negative" input was optional. When optional input was used and a value was provided from outside, but there was no value, the facedetailer wasn't being executed.

This issue is fixed on 23b9a9b522a035f92a9b4934782b9fa646155db2