Add an option to define the IDs used in the API workflow
- Dominant language
- Python
- Stars
- 133k
- Forks
- 15.7k
- Avg merge
- 1d 6h
- Merged PRs (30d)
- 155
Description
### Feature Idea
Exporting a workflow for using it with the API assigns a numeric ID to each node, which appears to come from the order in which it was created. This makes it difficult to change parts of the workflow later, for example to assign a new prompt. Manually replacing the numbers with custom strings works fine with the API as the numeric IDs are also exported as strings, but the next time the workflow is exported it will have numeric node IDs again.
I suggest adding an optional field to define an ID to be used when exporting to the API, so that one can define IDs such as "prompt", "negative-prompt", "sampler", etc. to later use, for example, `nodes["prompt"]["inputs"]["text"]` for setting a prompt instead of `nodes["7"]["inputs"]["text"]`.
### Existing Solutions
- Identifying the nodes and using replace all in the exported workflow.
- Filtering nodes based on the `nodes[i]["_meta"]["title"]` property.
Contributor guide
Assessment
This issue has not been assessed yet.