&Portal
The scoped version of &Node that survives copy-paste
- trigger
&Portal (class 0nedark_PortalIn) is the "send" end of eks-spaghetti's scoped wire-free bus - the direct counterpart to &Node, with one crucial upgrade: the names are scoped to the current group or subgraph context instead of being global. Same idea, same mechanics, but two portals called "seed" in two different groups won't fight over the same data.
That matters more than it sounds. &Node/*Node use names that are global to the whole graph, which is fine until you copy a group with a "seed" ref in it - now you have two producers of the same name colliding silently. Portals are the fix: each one binds its ref name to the group it lives in, so a workflow region can be duplicated freely and each copy keeps its own values. If you're building reusable group-based workflows, this is the version you want.
How it works
The scoping is a string trick. When ComfyUI expands a group into execution, every node inside gets a unique ID prefixed with the group's UUID. &Portal derives its scope from that prefix, then stores its input values in the same in-process dict - but under scope + "/" + ref_name instead of just ref_name. The matching *Portal in the same group computes the same scope and reads the same key. Different group, different prefix, no collision.
Like &Node, it forces correct ordering by exposing a trigger output the frontend hides and uses as an injected dependency, so the portal always executes before its consumer reads the store.
The inputs that matter
- ref_name - a text field; type the name and the title updates to
Portal -> <name>. - Dynamic input sockets - starts with a
...wildcard placeholder and grows an input per wire, inheriting names and types from whatever you connect. - Passthrough outputs - a bonus
&Nodedoesn't have: the node mirrors its connected inputs onto outputs so you can chain portal values down a line if you want.
Install
Search eks-spaghetti (registered as 0nedark-eks-spaghetti) in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/drupsys/eks-spaghetti
Restart ComfyUI. No dependencies, no model files.
Where people get burned
The scope cuts both ways. If your *Portal consumer is outside the group - sitting on the root canvas while the &Portal is inside a group - they don't share a scope, so the consumer comes up blocked. Cross-group data still needs the global &Node/*Node pair. And as with the rest of the pack, this leans on recent ComfyUI features and frontend graph rewriting; on an old install the scope detection and trigger injection can misbehave, and you'll see greyed-out consumers with no obvious cause.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| ref_name | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| trigger | * | — |