Nodes/ComfyUI-ZML-Image/ZML_变量_任意输入
ComfyUI Node

ZML_变量_任意输入

Stuff one arbitrary value into the parallel container's variable bundle

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_变量_任意输入
  • 任意数据
  • 输入变量包
  • 输出变量包
占位符任意变量

The plumbing node that feeds the parallel container. ZML_ParallelVariableAny takes one value of any type, labels it with a placeholder name, and merges it into a variable bundle (VAR_BUNDLE) that ZML_ParallelJsonContainer can substitute into its sub-workflow JSON.

If you've used the pack's multithreaded sub-workflow container, you know it replaces {{占位符}} patterns in the pasted API JSON with values that vary per run. This node is how an arbitrary value from your graph - an image, a number, a string from any node - becomes one of those placeholders. It's the glue that connects the outside world to the parallel sandbox.

What it does

  • 任意数据 (*) - any single value you want to inject. This is what makes the node "任意" (any).
  • 占位符 (default 任意变量) - the name the value will be available under. So with the default, the sub-workflow JSON would reference {{任意变量}} and get this value substituted in.
  • 输入变量包 (optional VAR_BUNDLE) - chain another bundle in here and the new variable is added to it rather than replacing it. This is how you build up a multi-variable bundle from several ZML_ParallelVariable* nodes.

One output, 输出变量包 (VAR_BUNDLE), which you wire into the parallel container's 变量包 input.

The one thing to understand

The variable bundle is the pack's typed-container concept, and this node treats your arbitrary value as a list variable with a single item (the source code wraps it as {"type": "list", "values": [你的值]}). In practice that means the placeholder resolves to that value on every run - fine for a constant injected across all executions. If you need per-run variation (cycling through many values, an integer sequence, random seeds), the pack has dedicated siblings: ZML_ParallelVariableText (list cycling), ZML_ParallelVariableInt/Float (math sequences), and ZML_ParallelVariableSeed (fixed/incrementing/random). Use those for data that should differ per task; use this one for data that stays the same.

So the honest framing: this is the "I just want to pass one thing through" node, and it's also the building block for any other bundle composition you want to do by hand.

Install

One node in ComfyUI-ZML-Image:

cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
# restart ComfyUI

or ComfyUI Manager → search "ComfyUI-ZML-Image". No dependencies beyond the pack baseline - it's a few lines that merge a dict. Chinese-first UI - 占位符 is "placeholder," 输入变量包 is "input variable bundle" - translation patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.

A thin utility, but a necessary one: without it, the parallel container can only pull variables from the specialized numeric/text nodes, and your arbitrary graph data would be stranded outside. It's the "and also this" port on a node you'll otherwise rarely think about.

Categoryimage/ZML_图像/子工作流

Inputs (3)

NameTypeDefaultDescription
任意数据*
占位符STRING任意变量
输入变量包optVAR_BUNDLE

Outputs (1)

NameTypeDescription
输出变量包VAR_BUNDLE