ComfyUI icon indicating copy to clipboard operation
ComfyUI copied to clipboard

[feature request] nested node

Open PladsElsker opened this issue 2 years ago • 3 comments

I wonder what would be needed to implement a nested/composite node that can run and edit a sub-workflow.

What I mean is something like the grouped node in blender.

It would be nice to be able to save them as custom nodes as well to load them later on.

It would also be nice to allow nested nodes to be used in nested nodes themselves.

I saw that there's a way to make your own custom js extension to run whatever code is needed in ComfyUI, I thought that maybe there was a way to implement the missing code to be able to use all the functionalities of litegraphjs to make this nested node thing possible.

Any concrete ideas on how to achieve this?

PladsElsker avatar Mar 18 '23 17:03 PladsElsker

I thought about making a node that just calls the API, but that definitely won't work as you can only add a prompt to the queue.

Furthermore, there's a lot of data forwarding for the inputs and outputs that would be needed, and so I think making a node that calls the API for that is a bad idea.

PladsElsker avatar Mar 18 '23 17:03 PladsElsker

I too would like nested nodes.

Kuinox avatar Jun 03 '23 23:06 Kuinox

I too would like nested nodes.

There are 2 approaches are developing.

This is subgraph feature. This will be included built-in, eventually.

https://github.com/comfyanonymous/ComfyUI/pull/724

And this is a workflow component feature. This is an experimental project. Currently, you can use as an extensiom. But, I am not decided, yet.

https://github.com/ltdrdata/ComfyUI-Workflow-Component

Usability of each approaches are little bit different.

ltdrdata avatar Jun 03 '23 23:06 ltdrdata

https://github.com/comfyanonymous/ComfyUI/pull/1776

comfyanonymous avatar Dec 08 '23 19:12 comfyanonymous