DICT To Any π½
Cast a dict to ANY so it can flow into any wildcard socket
- DICT
- any
The send and edit nodes in the ComfyUI Telegram Suite return message payloads as DICTs, and DICT is also the type the suite's API Method node accepts for parameters. But ComfyUI's type system is strict: a DICT output won't plug into just any socket. This node takes a DICT, passes it through completely unchanged, and re-labels the output as * (any) - one small cast that unsticks an otherwise valid connection.
It's part of the pack's generated converter family (DICTToAny, INTToAny, CLIPToAny, and friends, plus the reverse AnyToX direction).
Why it exists
Same backstory as every converter in this pack: the suite's trigger inputs originally demanded an ANY-typed signal to enforce execution order, so the author generated a converter for each type. Version 1.0.4 removed that requirement - typed signals feed straight into triggers now - and the changelog explicitly keeps these nodes for backward compatibility.
So today the honest use for DICTToAny is narrower: any node with a genuine wildcard (*) input that refuses your DICT output. ComfyUI won't coerce types for you, and this is the one-node bridge.
How it works
A straight pass-through - no serialization, no conversion of the data:
def convert(self, DICT):
return (DICT,)
The dict's contents (keys, values, nesting) are untouched. The input DICT is a forceInput socket; the output any is type *. That's the whole trick.
Inputs and outputs
DICT(required) - the dict to pass through.any(output, type*) - the same dict, typed as any.
Installation
Pack-wide:
cd ComfyUI/custom_nodes
git clone https://github.com/SwissCore92/comfyui-telegram-suite.git
cd comfyui-telegram-suite
pip install -r requirements.txt
or via ComfyUI Manager, search "ComfyUI Telegram Suite", install, restart.
Notes
If you're reaching for this inside a modern trigger chain, don't - it's redundant since 1.0.4. Use it when a wildcard-input node won't take a DICT and you're sure the target genuinely accepts any Python object. And no, it doesn't flatten or prettify the dict; that's not this node's job.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| DICT | DICT | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| any | * | β |