Math_X变量值
An integer box that also hands you a string — the two-socket value node
- STRING
- INT
Math_X变量值 ("X variable value") is the most boring kind of node, and boring is the point. It's a labeled box for an integer - type a number once, and it fans out to every node that needs it. In the plumbing layer that's a "value node": one authoritative source instead of typing the same seed or width into five different widgets and praying you remember to change them all together.
The one thing that makes this particular box worth a second look: it has two outputs. The first is the INT you expect. The second is the same number as a STRING - x_ac() literally returns (str(X), X). Core's PrimitiveInt gives you just the number; this one also gives you the text, which is genuinely handy when you want to inject a computed value into a filename, a prompt, or any text node downstream. One value, two typed sockets, no convert-node in between.
The inputs
- X - an integer from 0 to 8192, default 0. There's no negative side: the minimum is zero. If you need negatives or decimals, that's what Math_Y变量值 (the FLOAT version) or a core PrimitiveFloat is for.
- tips - the author's label ("整数变量X"), purely decorative. Ignore it.
The typical pattern: wire the INT output into anything numeric - a seed, a width, a batch size - and the STRING output into a text or formatting node when the value belongs in a label. You can also convert the X widget to an input and drive it from another node, if you want the "variable" in the name to be more literal.
Installing the pack
- ComfyUI Manager: search "ComfyUI_AC_FUN" and install.
- Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/A719689614/ComfyUI_AC_FUN-V1.0
Restart ComfyUI. The pack is by Cc啊程, a Bilibili creator and architect-turned-visual-programmer, and it's a Chinese-labeled wrapper suite around core ComfyUI nodes - no model downloads, no heavy dependencies. Everything lives under the 🌌AC_FUNV1.0 menu with Chinese names.
Bottom line
A value node with a free text output. You could build the same thing with core primitives, but if you're already in this pack, this is the one to use for integer plumbing - and the STRING socket is the reason to pick it over the core equivalent. Nothing clever, nothing to break, which is exactly what you want from a value node.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| X | INT | 00–8192 | — |
| tips | STRING | 整数变量X | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| STRING | STRING | — |
| INT | INT | — |