comfyanonymous / ComfyUI

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface.
https://www.comfy.org/
GNU General Public License v3.0
55.06k stars 5.81k forks source link

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

Open oxysoft opened 1 year ago

oxysoft commented 1 year ago

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.

comfyanonymous commented 1 year ago

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

oxysoft commented 1 year ago

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!

DoudouDoudouk commented 8 months ago

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