r/StableDiffusion • • 5d ago

Resource - Update Comfyui subgraph re-ordering

Comfyui Subgraph slots re-ordering In 2 ways-

  1. From inside. Works in nodes 2.0 also.
  2. On subgraph itself(holding down ctrl+alt and left click dragging. This does not work in nodes 2.0 yet.

here is the repo- https://github.com/pravbk100/Comfyui-prSubgraph

edit: please let me know if you find any bugs.

59 Upvotes

28 comments sorted by

14

u/DelinquentTuna 5d ago

This is wonderful. Nice QoL, good job. Something that should've been built into Comfy.

8

u/pravbk100 5d ago

I think there is official pr pending in their repo. It might come in near future versions.

2

u/Icy-Boysenberry1967 4d ago

Great Work!

1

u/pravbk100 4d ago

Thank you.

2

u/reeight 4d ago edited 4d ago

Bug: can't drag an output of a submodule out; will resort inputs.
Bug 2: can't edit values with this loaded.

deleted.

1

u/pravbk100 4d ago

Will check and fix it. Thank you.

2

u/Antique_Pianist_5585 4d ago

Try this one with reordering feature: https://github.com/nomadoor/ComfyUI-Subgraph-Input-Values

0

u/reeight 4d ago

Thanks.
BTBH, I'm considering if I should bypass the GUI for most of my edits, & just use CLI/API & edit the JSON directly. 95% of my edits are tweaks to the Positive Prompt & LoRA values,

v1 of their GUI is OK, but does have weird quirks like this. V2 is being pushed, but I think I've seen PRs talk about v3...

1

u/Zealousideal7801 4d ago

Awesome, can you also make it that the promoted sampler previews are visible when the subgraph is collapsed again ? Comfy.org doesn't seem to care outside of their previous (and shitty) nodes 2.0

1

u/pravbk100 4d ago

Willl look into it if feasable or not.

1

u/roychodraws 4d ago

can't you just do that in the settings on comfyui with native?

1

u/pravbk100 4d ago

No

2

u/roychodraws 4d ago

yes you can... i do it all the time.

1

u/pravbk100 4d ago edited 4d ago

Oh, this you meant. Yes you can. I thought comfyui settings. My re-ordering mainly focuses on inside subgraph. For example if you make a subgraph and inside it, add few io nodes, there is no way to re-order them currently. And re-ordering on subgraph itself is just a added bonus.

1

u/roychodraws 4d ago

ok, i think there's not a way to actually change input/output order with this, actually so yours does add a new function.

1

u/Davikar 3d ago

You can actually change the order inside the subgraph if you right click on the inputs and outputs.

2

u/YeahlDid 3d ago

Oh shit. People have been begging comfy to do this for as long as subgraphs have existed. Nice one!

2

u/luciferianism666 3d ago

This has been already implemented natively with a recent frontend update, I mean sure it's not as fancy as this one where you're able to drag by simply selecting the value but once inside the subgraph, you can right click on any input/ output value and shift their position.

1

u/reeight 4d ago

Helps a bit.
Doesn't help with collapsing the multiline, or allow a linked mulitline to be shuffled.

6

u/No-Persimmon-4150 5d ago

Thats awesome. And you can drag the penis enhancer.

3

u/pravbk100 5d ago

Sorry, what?

3

u/Sad_Willingness7439 5d ago

pEnh lol

1

u/pravbk100 4d ago

Got the joke now. Lol

1

u/wiserdking 4d ago

took you a long time lol.

also this thing is bugged at least on a old comfyui-frontend that im using (1.45.21 cause newest ones broke subgraph custom widget promotion).

the bugs im facing are: inputs/outputs ordering ignores ctrl+alt so things get messy if i'm not careful since its working with mere left mouse click. and for some reason i cannot connect subgraph outputs by clicking (+holding) on them - im forced to bypass that bug by connecting from the next node into the subgraph output.

EDIT: i do not expect you to add support to old frontends - just letting you know anyway

2

u/pravbk100 4d ago edited 4d ago

I am on comfy 46 and latest frontend. Will check with older versions. And try to fix it. In the mean time, did you check re ordering from inside subgraph, does that work properly?

1

u/Outrageous-Wait-8895 4d ago

This sort of thing ain't my bag, baby!