Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Save widget names in the workflow JSON #3625

Closed
wants to merge 1 commit into from

Conversation

dennwc
Copy link
Contributor

@dennwc dennwc commented Jun 2, 2024

Currently, any external tooling will have a hard time converting workflow JSON files to the API format.

The main reason is that widgets_values is an array and mapping values from that array to widget names requires loading node types from the /object_info endpoint as well. However, /object_info depends on the plugins installed and thus may miss some of the nodes in the workflow.

This change adds widget_names to the JSON, allowing direct conversion of workflow files to API format without prior knowledge of all node types. This could also help with compatibility in the future.

Requires comfyanonymous/litegraph.js#10

Resolves #2275

Currently, any external tooling will have a hard time converting workflow JSON files to the API format.

The main reason is that widgets_values is an array and mapping values from that array to widget names requires loading node types from the object_info endpoint as well. However, object_info depends on the plugins installed and thus may miss some of the nodes in the workflow.

This change adds widget_names to the JSON, allowing direct conversion of workflow files to API format without prior knowledge of all node types. This could also help with compatibility in the future.

Resolves comfyanonymous#2275
@ltdrdata
Copy link
Collaborator

ltdrdata commented Jun 2, 2024

litegraph modification PR should be submitted to litegraph repo.

And I love this commit.

@dennwc
Copy link
Contributor Author

dennwc commented Jun 2, 2024

Oh, I see. I didn't look at the file name, missed the facts it's a copy of a library. Will send a PR there too 👍

dennwc added a commit to dennwc/litegraph.js that referenced this pull request Jun 2, 2024
@mcmonkey4eva
Copy link
Contributor

frontend is replaced by https://github.com/Comfy-Org/ComfyUI_frontend now

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feature Request] API support in Workflow JSON
3 participants