Nodes/komojini-comfyui-nodes/🔥FlowBuilderSetter
ComfyUI Node

🔥FlowBuilderSetter

🔥FlowBuilderSetter — a flow endpoint that also saves its result under a name

By komojini·Created 3 years ago·Updated 2 years ago· 77
🔥FlowBuilderSetter
  • value
  • value
â—„keyâ–º
â—„batch_size1â–º

🔥FlowBuilderSetter is FlowBuilder plus a side effect: it acts as a flow endpoint - place it before the output you care about and its Queue button runs only that upstream subgraph - and on top of that it stores whatever flows through it in the pack's key/value cache under the key you give it. So the same node both defines where a "flow" ends and publishes its result for a Getter to pick up elsewhere.

This is the natural marriage of the pack's two ideas. The FlowBuilder half handles "run only the part of the graph I changed." The Setter half handles "and name this value so the rest of the workflow can reference it." When you're generating video step by step - say, sample a first pass, then a second pass that consumes the first - a FlowBuilderSetter at the end of the first stage gives you a button to run just that stage and leaves its latent in the cache under a meaningful key like "pass_1."

How it behaves. In the UI it gets the same Queue button as plain FlowBuilder: click it, the pack mutes every node not feeding this node, queues the prompt, waits, restores. The Python side, meanwhile, writes CACHED_MAP[key] = value and passes the value through its output. Matching Getters (or CachedGetters) elsewhere can then read that stored value. The key widget doubles as the pairing label - Getter dropdowns are populated from the Setter keys present in the graph, and matching Getters retitle themselves Get_<key>.

Inputs and output. Required inputs: value (*, the value to flow and store) and key (STRING). Optional: batch_size (INT, default 1). One * output that passes value through. No model work, no parameters to tune - this is control-flow plumbing.

Order matters, and here's the subtle bit. The Queue button runs only the upstream subgraph, but a Getter elsewhere in the graph isn't part of that subgraph. If you want the stored value available to a later stage, that stage has to run after this node has executed - so either run this flow first, or make sure the downstream consumer is downstream in execution order. Get this wrong and the Getter reads stale or missing data, with a "No value assigned" warning in the console.

Install. Same single pack:

ComfyUI Manager → search "komojini-comfyui-nodes" → Install → restart

or cd ComfyUI/custom_nodes && git clone https://github.com/komojini/komojini-comfyui-nodes. No models. The usual 2024-era caveats apply to the mute/restore JS on modern ComfyUI - that's the component most likely to age badly. If you don't need the store-by-key side effect, plain FlowBuilder is the simpler node; grab this one when the value needs to survive into another stage.

Categorykomojini/flow

Inputs (3)

NameTypeDefaultDescription
value*—
keySTRING—
batch_sizeoptINT11–10000—

Outputs (1)

NameTypeDescription
value*—