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

Refactor WAS_Image_Batch Class for Flexibility and Dimension Checking #110

Closed lcolok closed 1 year ago

lcolok commented 1 year ago

Hi,

I've made some adjustments to the WAS_Image_Batch class, aimed at improving its robustness and flexibility.

I've changed the INPUT_TYPES attribute to view all inputs as "optional". Users can provide any number of images as needed. If no images are provided, an exception is thrown.

I've added a _check_image_dimensions method to verify the dimensions of all images. If there are inconsistencies in the dimensions, it will throw an exception and indicate which images do not match.

I've refactored the image_batch method. Now, it accepts keyword arguments and can flexibly handle an undetermined number of images.

These modifications help the code to better adapt to a variety of user inputs, improve the efficiency of error detection, and enhance the user experience.

Please review these changes when convenient, I look forward to hearing your feedback.

WASasquatch commented 1 year ago

Looks good. Thanks for the PR.