rgthree / rgthree-comfy

Making ComfyUI more comfortable!
MIT License
948 stars 74 forks source link

Bug: FlexibleOptionalInputType is breaking "object_info" API #283

Open morgan55555 opened 1 month ago

morgan55555 commented 1 month ago

ComfyUI has an API for other UI or systems. There is API page "comfyui_ip:8188/object_info", which used to get nodes inputs/outputs.

And since "Allow infinite context inputs for Context Switch, Merge, and their Big nodes. Fixes #253", API is broken, reporting "input": {"required": {}, "optional": {}} for all of affected nodes.

It's should somehow fill this fields with default values for API users.

rgthree commented 1 month ago

Hmmm... ComfyUI doesn't have a way to convey this object because it does work closely with the client code. This is certainly intentional since rgthree-comfy is a UI-focused node suite and the UI code is important.

For instance, there's practically no way to use the Power Lora Loader without client-side code creating the Lora JSON data. And while Context Switch isn't as complex in its inputs, it does rely on the client node code to establish the inputs.

...but let me think on this and if there's a way to solve this more seamlessly.