Nodes/ComfyUI-ZML-Image/ZML_变量_浮点序列
ComfyUI Node

ZML_变量_浮点序列

Sequence a float across parallel runs — the subworkflow node nobody explains

By zml-w·Created about a year ago·Updated 2 months ago· 218
ZML_变量_浮点序列
  • 输入变量包
  • 输出变量包
起始值0.00
步长0.10
占位符浮点

This node is useless on its own, and that's the point. It's one of the input-definition nodes for the ZML subworkflow system - the "子工作流" family that lets ComfyUI actually run multiple lightweight tasks in parallel. If you've never touched that system, this float node is a glorified counter. If you have, it's how you feed a different float value into each of the 32 runs your subworkflow container is about to launch.

Think of it as the sequence generator from the KB's plumbing layer: it doesn't touch pixels, it fights repetition. You define a starting value and a step, give it a placeholder name, and it produces start + index * step for run index. First run gets the start value, second gets start plus one step, and so on. Wire it (and its siblings) into the "变量包" (variable bundle) input of ZML_ParallelJsonContainer, and every {{占位符}} marker inside your API JSON workflow gets filled in with that run's number.

What to set

  • 起始值 (start) - FLOAT, default 0. The value of the very first run.
  • 步长 (step) - FLOAT, default 0.1. How much each subsequent run adds.
  • 占位符 (placeholder) - the {{name}} you'll write into the JSON workflow. Default 浮点.
  • 输入变量包 (optional) - chain it onto a bundle you've already built from other variable nodes, so one container can get a float, an int, and a text list from three separate nodes all merged into a single bundle.

The single output, 输出变量包 (VAR_BUNDLE), carries the whole accumulated bundle forward.

Why you'd actually bother

The honest use case is a batch sweep. You want to test how a model reacts to cfg stepping from 4.0 to 8.0 in 0.25 increments, or you're doing a strength ramp on an img2img pass. In a normal graph you'd build a loop yourself or babysit 17 runs. Here you paste the API JSON of your sub-workflow into the container node, set 执行次数 (execution count), set 并行线程数 (threads), and this float node hands each parallel thread its own cfg value. That's the README's framing: 32 threads watermarking images, 8 threads hitting an API - things ComfyUI's single-threaded graph normally can't do.

Install

Install the pack once, all 160+ nodes come with it. Easiest: ComfyUI Manager, search ComfyUI-ZML-Image, Install, restart. Or manually:

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

English speakers should also grab the translation patch the README points to (ZZZ_ZML_English_Patch) - the UI is Chinese-first. No model downloads, no heavy deps for this node; the pack's requirements.txt is mostly the torch/numpy/Pillow stack ComfyUI already ships. A reference workflow 多线程子工作流.json ships in the pack's workflows folder if you want a working example instead of building your own JSON.

One gotcha: the author is one person maintaining 160+ nodes and says so openly - the subworkflow family is well-worn because it's their daily driver, but if you hit a bug, an issue or PR on the repo is the actual support channel.

Categoryimage/ZML_图像/子工作流

Inputs (4)

NameTypeDefaultDescription
起始值FLOAT0.00
步长FLOAT0.10
占位符STRING浮点
输入变量包optVAR_BUNDLE

Outputs (1)

NameTypeDescription
输出变量包VAR_BUNDLE