ConvertTypeToAny
ConvertTypeToAny – ComfyUI Node
- any
- any
What it is
ConvertTypeToAny exists to get around a very specific and very common ComfyUI annoyance: two nodes hold the exact same kind of data underneath, but their sockets are typed differently, so ComfyUI's graph editor won't let you draw a wire between them. The README's own description calls it a bridge for "two nodes that actually have parameters of the same data type" - and that's precisely it. This node takes whatever comes in and re-emits it typed as * (any), which ComfyUI treats as compatible with basically every input socket. It doesn't touch the data at all. It just relabels the wire.
You'll reach for this most often with custom node packs that are strict about typing in ways that don't match reality - a node that outputs a custom string subtype instead of plain STRING, or a pack that invented its own type name for what is, underneath, just a list or a number. Rather than hunting for a purpose-built converter for that one mismatch, you drop this in and move on.
How it works
There's genuinely no transformation happening. It receives a value on a required any-typed input and outputs the same value on an any-typed output. The mechanism is purely about the socket type declared to ComfyUI's frontend, not about the runtime value - Python doesn't care about ComfyUI's type strings at all, only the graph editor's connection validation does. This node is a way of telling that validator "trust me, these are compatible" without ComfyUI actually checking anything.
Inputs and outputs
Just one of each. Input: any, type *, required. Output: any, type *. No parameters to configure, no defaults to pick - it's a pass-through, full stop.
Installing it
Part of the comfyui-easyapi-nodes pack. Via ComfyUI Manager: search "comfyui-easyapi-nodes", install, restart. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/lldacing/comfyui-easyapi-nodes.git
cd comfyui-easyapi-nodes
pip install -r requirements.txt
This specific node has no dependencies of its own, but the pip install step is still worth running so the rest of the pack (several nodes do need real packages) works too. git pull inside the folder to upgrade.
Common issues
"I used this to bypass a type mismatch and now the workflow crashes at runtime instead of at connection time." That's the trade-off, and it's the whole reason to be a little careful with this node. ComfyUI's type checking at the graph level is annoying but it's also a real safety net - it's catching the case where you're about to feed an IMAGE into something expecting a MASK, and it will genuinely break. If you use ConvertTypeToAny to force a connection through, you're personally taking over the job the type checker was doing. Only reach for it when you're confident the underlying data really is compatible and the type labels are just wrong or overly narrow - not as a general "make the red line go away" button.
"Why not just use a Reroute node?" A plain reroute usually preserves the original type rather than erasing it to *, so it won't fix a genuine type-name mismatch the same way. This node is specifically for when the names disagree but the data doesn't.
"Does this convert the data itself, like a string to an int?" No - for that you'd want something like this same pack's GetValueFromJsonObj (which has an explicit to_type option) or a dedicated type-cast node. This one only changes what ComfyUI is told the type is, never the actual value.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| any | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| any | * | — |