Shima Transform One
The single-channel Transformer when you only need one
- in_1
- var_!!!
- var_@@@
- var_###
- var_$$$
- out_1
Shima Transform One is the same "Atomic Switch" value-mapping trick as Shima Transformer, trimmed to exactly one channel. One input, one map box, one output. Same key ||| value syntax, same catchall, same type inference, same variable tokens. If you've read the Transformer article, you already know how this behaves - this is the version you reach for when a four-channel router feels like bringing a whole toolbox to hang one picture.
Why a one-channel version exists
ComfyUI is a graph editor, and canvas real estate is a real cost. A workflow full of four-channel transformers reads like a factory floor even when you're only using one channel. Transform One exists so a single value remap - the common case - stays visually small: one in, one out, one map box. The source comments call it "a single-input/single-output version of the Shima Transformer," and that's the whole story.
How it works
The mapping engine is identical to the big one, line by line:
key ||| value- input equalskey, outputvalue- No
|||on a line - unconditional override, matches anything - No match → input passes through unchanged
Type inference still runs: "true" becomes the boolean True, digit strings become ints/floats, and output_as_strings (the required boolean) pins everything to literal strings when you're building filenames or prompt text. The var_!!!..var_$$$ tokens work the same way, letting you inject live values from other nodes into the output.
Inputs and outputs
output_as_strings(required) - force the output to a stringin_1(required) - whatever value you're remapping, any typemap_1(required) - the multiline rule blockvar_!!!..var_$$$(optional) - injection tokens- Output:
out_1- the matched result, or the input untouched if nothing matched
A common setup: turn a sampler's seed integer into a "fixed" vs "random" label, or remap a resolution enum into the exact string a filename template needs. Small jobs, one node.
Installing it
Part of the Shima pack (KDB-USJP/shima_wf). Install via ComfyUI Manager (search "Shima") or clone:
cd ComfyUI/custom_nodes
git clone https://github.com/KDB-USJP/shima_wf
Restart after cloning. First launch pulls in cg-use-everywhere and ComfyUI-Impact-Pack automatically if they're missing.
Gotchas
Same family, same quirks: an empty map_1 passes the input through, a key ||| with an empty value also passes through, and the first matching line wins - so order your catchall lines last. And since this is a wildcard any-type node, it won't catch type mismatches for you. None of that is specific to Transform One, which is the point: you're trading four channels for one, not getting a different tool. For a one-off remap mid-graph, this is the tidy version to grab.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| output_as_strings | BOOLEAN | false | — |
| in_1 | * | — | |
| map_1 | STRING | — | |
| var_!!!opt | * | — | |
| var_@@@opt | * | — | |
| var_###opt | * | — | |
| var_$$$opt | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| out_1 | * | — |