ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

Workflow format in UI is not the same as API format - creates a lot of confusion and challenges

Open oxysoft opened this issue 2 years ago • 3 comments

Hi, I am creating an app that uses ComfyUI workflows for rendering and I wish to use the title of nodes like ids in CSS in order to tag nodes and inject them later with corresponding meaning data from my rendering app. Unfortunately the API json does not contain title, and we do not have the conversion function available in python. So I found a workaround which involves saving both jsons, and using the UI json for querying and prompt for injecting values and passing to the API. Imo this is confusing, it should be as easy as sending any ol' workflow json saved from the UI, no need for dev mode.

I understand why it was done this way, i.e. to cut down the amount of data passed around on the network. In my opinion the best solution is to allow both format to initiate a job in the queue.

oxysoft avatar Aug 26 '23 02:08 oxysoft

We can't really use the node titles because they don't need to be unique while the node ids have to be unique.

comfyanonymous avatar Aug 26 '23 03:08 comfyanonymous

Then as the project lead I'm excitedly anticipating what better suggestion or alternative you have to propose! Personally it's no problem for me, as I'm the user making the workflow specially so each title is unique. What do you think of supporting both formats for API requests? We need a way to do this!

oxysoft avatar Aug 26 '23 14:08 oxysoft

Hello How did you solve this issue. I have also some issue workflow UI is not same as api

DoudouDoudouk avatar Feb 16 '24 08:02 DoudouDoudouk