rgthree-comfy icon indicating copy to clipboard operation
rgthree-comfy copied to clipboard

[Deprecation Proposal] Migrate to litegraph native reroute

Open huchenlei opened this issue 9 months ago • 4 comments

Ref:

  • https://github.com/Comfy-Org/rfcs/pull/6
  • https://github.com/Comfy-Org/ComfyUI_frontend/pull/3151

The node based reroute node will be removed in frontend version 1.15 (Release to main repo in ~2 weeks). I would like to propose removal of reroute node in this repo and we automatically convert Reroute (rgthree) to litegraph native reroute the same way we migrate the reroute node in core.

Another option here is try fix the issue and keep the custom reroute node functioning.

huchenlei avatar Mar 24 '25 15:03 huchenlei

I'm sure the new system is better than having nodes, though I've yet to check out the new reroute system (and don't have time to investigate right now). I don't mind converting if the new system has all the benefits of the rgthree-comfy reroute that ComfyUI users expect.

  1. First, before even talking about rghtree-comfy nodes, the largest way I see people use reroute nodes (even the core Comfy ones) are as a manual switch. They let the reroute node act as a proxy connection they can quickly toggle at a local site (it's not how I do it; but countless workflows do it this way):

    Image

  2. For rgthree-comfy reroutes, the main feature would be multi-directional control & corners:

    Image

  3. Then, minimal, 10px runners with multidirectional ends:

    Image

  4. And, finally, ability for fast shortcuts:

    Image

rgthree avatar Mar 25 '25 02:03 rgthree

So I just tried the new latest frontend and it looks like all of these are now "broken." Some comments:

  • From 1. above, I think a lot of (regular ComfyUI) users are going to be upset that the "manual switch" from that screenshot is broken and not possible any longer. I'm glad the "branch" case still works; though I think you should consider adding a way to easily "pull" a new connection out, like the original node allowed. Some key press and click or something...

  • For the rgthree-comfy ones, 2. & 3. above definitely break visually. That's not really a new re-route issue, that's just must be other code changes somewhere that rewrite the flexibility rgthree-comfy has hacked in to allow multidirection inputs/outputs and sizing format. That's too bad, but at least it still functionally works. User's using this format will likely be upset since they're probably taken a lot of time to make their workflows look nice. I'm honestly not sure if I'll have time to investigate this and, admittedly, this was hacking into some core Litegraph stuff that may no longer be possible if the code has become less flexible.

  • And, finally, the shortcuts kinda work, but of course rely also on the formatting of 2. and 3. to be best. Selecting and connecting seems to not be working (which is weird because I thought it was using standard LiteGraph select/connect methods... i hope something didn't regress there).

Again, I'm not sure I'll have time to investigate and handle these cases, but in order to port the rgthree-comfy issues to a new native reroute would be a way to programatically create a reroute in the workflow, position it, and connect inputs and outputs. If that's available, and I'm convinced replacing rgthree-comfy reroutes is the best route (ha!), then seems feasible.

Though I do think you should consider not pushing this to main until you can accomodate updating existing core reroutes that are not fully connected (as in the "manual Switch" from 1. above).

rgthree avatar Mar 25 '25 03:03 rgthree

  • From 1. above, I think a lot of (regular ComfyUI) users are going to be upset that the "manual switch" from that screenshot is broken and not possible any longer. I'm glad the "branch" case still works; though I think you should consider adding a way to easily "pull" a new connection out, like the original node allowed. Some key press and click or something...

I encounter a lot of workflows in the wild that use the "manual swtich" case with reroutes. Stock ComfyUI does not have a switch node, so the only way to replace sections of workflow is generally by switch reroute. Not every workflow is conducive to putting all of the input or output nodes next to each other and swapping out links between nodes that may be multiple screens away is not good UX. Hopefully ComfyUI fixes this with the new reroutes. 👎

One feature you missed listing about your reroutes is the ability to support having a title. I do make use of that. ComfyUI is not consistent about link colors to types, so its just the default of showing their type when titles enabled is already very helpful.

without-ordinary avatar Mar 25 '25 04:03 without-ordinary

I often collapsed nodes to clean the UI and used "floating" reroute with title for quick and easy connect with other "modules" in my workflow. No way to know what is what anymore: Image

I notice you can pull a connection using "Shift key" but such floating reroute can't be copy/paste or be inserted into a workflow without disappearing. Image

Steudio avatar Mar 25 '25 13:03 Steudio