Add support for file list refresh feature in node
Add 'Refresh' button to enable file list refresh in Model Loader and Image Loader nodes; eliminate the need to restart ComfyUI for file list reloading.
Is there any reason why you need to add a "REFRESH" widget to the backend code of the nodes?
Can't you just add a route in the backend to query the INPUT_TYPES of any node type? I think that would be more clean overall along with a right click->refresh to refresh a node.
I got it. It is the better way. I'd tried refreshing single node for now. But how about refresh whole node at once by main menu?
I moved refresh feature from node to main menu.
What I meant exactly is that you make it so the /object_info can also be used to query the "object_info" for a single node.
Then when a node is refreshed it queries /object_info?node=CheckpointLoaderSimple
And refreshes every combo box in the node with the new values from there.
The code should be generic enough that you shouldn't need to put node names in the javascript code.
Oh. I understood.
Done. I modified as your feedback.
It doesn't seem to work and I get this in the javascript console when I click on Refresh:
app.js:817 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading 'refresh_list')
at ComfyApp.refreshNodes (app.js:817:23)
Robust patch applied. Now it will work. I missed the error because my Chrome browser ignored it
Is there a reason why you can't refresh all values instead of having to specify them with REFRESH_LIST?
Oh.. Do you meaning update all values instead of just updating file list. I'll fix it.
Done. Now I removed REFRESH_LIST. And updating all combo list. I don't updating other content to avoid unexpected side-effect.