Comfy-Org / Comfy-Org/ComfyUI_frontend
[Feature Request]: Move models metadata to nodes
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Is there an existing issue for this?
- [x] I have searched the existing issues and checked the recent builds/commits
### What would your feature do ?
The models metadata is currently in the outermost scope of the workflow schema. Problems with this:
- There is not a system to persist workflow metadata, so it is lost as soon as the workflow is re-saved.
- It not accessible for use by custom node developers outside of making static example workflows. Majority of developers would prefer to attach this data on the node itself.
- It's difficult to track which model applies to which node widget, which can be an issue for maintainability longterm
### Proposed workflow
1. Write a custom node
2. Write an input that is a combo for a model
3. Attach the model metadata (name, url, directory) inside the input options dict like:
```python
class CheckpointLoaderSimple:
@classmethod
def INPUT_TYPES(s):
return {
"required": {
"ckpt_name": (
folder_paths.get_filename_list("checkpoints"),
{
"default": "v1-5-pruned-emaonly-fp16.safetensors",
"model": {
"name": "v1-5-pruned-emaonly-fp16.safetensors", # the download prompt will not re-appear if this value is not selected
"url": "https://huggingface.co/Comfy-Org/stable-diffusion-v1-5-archive/resolve/main/v1-5-pruned-emaonly-fp16.safetensors?download=true",
"directory": "checkpoints",
}
},
),
}
}
```
### Additional information
_No response_
┆Issue is synchronized with this [Notion page](https://www.notion.so/Issue-2661-Feature-Request-Move-models-metadata-to-nodes-1a16d73d36508129aeb5ec2b1ef50115) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.