ComfyUI-Custom-Scripts icon indicating copy to clipboard operation
ComfyUI-Custom-Scripts copied to clipboard

Frontend vs Backend Nodes

Open ghostsquad opened this issue 1 year ago • 2 comments

@pythongosssss, I was wondering how you figured out frontend vs backend node types. I've searched around ComfyUI repo to see if I could locate any frontend code for nodes after getting this reply on my PR: https://github.com/comfyanonymous/ComfyUI/pull/2569#issuecomment-2040848856 and I can't seem to find (and thus understand) how/when to modify frontend vs backend. My understanding is that backend nodes only work on execution of a workflow, where as frontend nodes can provide added functionality before a workflow is run. I want to contribute more functionality, but I'm a bit lost in this regard. Thanks in advance for your time in explaining this!

ghostsquad avatar May 13 '24 15:05 ghostsquad

Hi, I think your understanding of it is correct. If you need more "fancy" user interaction beyond just entering static values, you'll need to work on the frontend however it is normally pairing with a backend node that does the actual "work". There are pure frontend only "virtual" nodes, e.g. primitives and reroutes, these are only part of the UI and not send to the backend but instead modify the graph when it is serialized.

pythongosssss avatar May 16 '24 19:05 pythongosssss

Ah, I see. You just did a bit of digging then to figure out how to modify a backend node with more frontend code?

ghostsquad avatar May 23 '24 00:05 ghostsquad

This issue can probably be closed.

SirVeggie avatar Jun 26 '24 02:06 SirVeggie