HTTP 变量 (工作流存储)
HTTP variables that travel with your workflow — A through G
- 变量包
The sibling of ZML_HTTP_Vars_Browser, and the boring, honest version. Where the browser node hides your secrets in localStorage, this one is just seven text fields - A through G - that get packed into a variable dict and shipped to the HTTP request node. The values live in the workflow itself, so they travel with the file, get shared with it, and show up in your PNG metadata. That's a feature if the values are prompts, URLs, or model names, and a trap if you put a key in here instead of the browser node.
How it works
There's almost nothing underneath it: pack_vars returns {"A": A, "B": B, ..., "G": G} as an HTTP_VARS object. Each field is a multiline string. The consumer - ZML_HTTP_Request's vars_workflow socket - merges these into its template pool, so a {{A}} in the request's URL or body gets replaced with whatever A holds. The placeholders in the node's own fields tell you the pattern: type {{A}} into the request, and the variable node supplies the value.
The division of labor in the pack is deliberate: workflow vars for things you want in the file (non-secrets), browser vars for things you don't (keys). Mixing them up is the classic error - a key in the workflow node ships with every share and every saved image.
The inputs
- A through G - seven multiline strings, all optional in the sense that empty strings are fine. That's the whole interface.
Output: 变量包 ("variable pack"), type HTTP_VARS, to the request node.
Installing
The standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/zml-w/ComfyUI-ZML-Image
restart, or ComfyUI Manager. No extra dependencies. Translation patch at https://github.com/zml-w/ZZZ_ZML_English_Patch.
Common issues
Beyond the secret-leak trap (use the browser node for keys, seriously), the main practical quirk is that seven fixed slots is a weird API shape - if you need eight variables or want a dictionary keyed by name, this node fights you and you're better off with the browser node's arbitrary-JSON approach or just writing values directly into the request. Also note the values are strings, period - if you need {{A}} to be a number in the JSON body, the request node substitutes the string and it's up to the endpoint to parse it; quote it if the API expects a JSON string. And since the values are baked into the workflow, a saved PNG carries them - which is the feature for reproducibility and the privacy cost if the "A" you stashed is sensitive.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| A | STRING | — | |
| B | STRING | — | |
| C | STRING | — | |
| D | STRING | — | |
| E | STRING | — | |
| F | STRING | — | |
| G | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| 变量包 | HTTP_VARS | — |