As Any
The pass-through node that beats ComfyUI's type system
- any
- *
As Any is the pack's answer to one of ComfyUI's most annoying design quirks: strict socket types. One input, one output, nothing changes - the node just receives any value and passes it through, but it does so under the * (wildcard) type, which lets you connect things that ComfyUI's type checker refuses to wire directly.
Here's the problem it solves. ComfyUI validates connections by socket type: a STRING socket won't connect to a INT socket, and anything in a custom type won't connect to anything else without an adapter. Sometimes you know a value is fine - the node on the other end accepts it even though the declared types don't match - but ComfyUI won't let you draw the wire. That's where As Any comes in: it eats any type and re-emits it as the wildcard, and a lot of custom nodes accept wildcard inputs, so the wire goes through.
The mechanism
It's a literal identity function: return (any,). The source code is four lines. The "any" type is a custom string subclass that makes ComfyUI treat the socket as compatible with everything - a trick the pack also uses on text_color in Draw Text in BBox, json_object in Dump JSON, and the optional model_options in LLM Create Client. When you see type: "*" in this pack's schemas, that's the same machinery.
One input (any), one output (*). What you put in is what you get out, byte for byte.
When it's the right tool
The classic case: you've got a dict or object from an LLM or JSON node, and you need to feed it into a node that's typed to accept "anything." Or you're connecting outputs across two packs whose type names differ but whose actual data is compatible. It's the ComfyUI equivalent of casting a pointer - the type system was in your way, so you politely step around it.
The warning that comes with the trick: type mismatches are sometimes real, not pedantic. As Any can't make a STRING into an IMAGE; it only silences the error. If the node downstream actually needs pixels and you feed it a string, you'll get a confusing runtime crash instead of a clean type error at connect time. Use it when you know the data is right, not to brute-force a connection you don't understand.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/Duanyll/duanyll_nodepack
cd duanyll_nodepack && pip install -r requirements.txt
or ComfyUI Manager → "Duanyll Nodepack" → install → restart.
Honest take: most people solve this same problem with any of the several "Any" nodes floating around in bigger packs (rgthree and friends have equivalents), and ComfyUI's core has gotten more permissive over time. But if this pack is already installed, As Any is zero-config, zero-dependency, and does the job. It's a stepping-stone node - you won't build a workflow around it, but you'll be glad it's there on the one connection the type checker won't stop fighting you about.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| any | * | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| * | * | — |