Nodes/ComfyLab Pack/Convert to Any (lab)
ComfyUI Node

Convert to Any (lab)

The type-escape hatch, one connection at a time

By bugltd·Created 2 years ago·Updated about a year ago· 11
Convert to Any (lab)
  • value
  • value_any

Convert to Any (lab) is an identity node with one job: take a value of any type and re-type it as * - ComfyUI's "Any" wildcard - on the way out. The value itself is untouched; only the declared type changes. It exists because ComfyUI's type system is strict about connections, and sometimes you need to tell it "trust me, this will be fine."

When does that happen? Most often with combo widgets - those dropdown inputs that take a typed value. ComfyUI won't always let you wire an untyped list value straight into them, and a converter that explicitly re-labels the connection is the clean way in. It's also the standard fix when you're feeding the Any outputs of ComfyLab's queue nodes into something picky, or when a node's input type is declared more narrowly than what you're actually handing it.

Why this node, not a free-for-all

There's a real cultural history here. ComfyUI had an era of "route any output to any input" extensions that made workflows faster to build and much harder to debug - the KB documents a "Please Stop using the Anything Anywhere extension" backlash over exactly that trade-off. ConvertToAny is the opposite philosophy: it's a scoped, explicit version of the same trick. One conversion, placed exactly where you mean it, visible in the graph. That's the maintainable take on type-escape - you keep the flexibility and you keep knowing what you did.

It's also how ComfyLab's own queue nodes stay usable: they emit Any values, and ConvertToAny is the polite way to bridge those into typed inputs when the connection won't take.

Inputs and outputs

  • value - anything. A string, an int, a float, a tensor, whatever's flowing.
  • value_any - the same value, re-typed as *.

That's genuinely all there is. It adds no computation, no transformation, no side effects.

Install

ComfyLab Pack installs as one package (nodes display with "(lab)" suffixes). ComfyUI Manager: search ComfyLab Pack, install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/bugltd/ComfyLab-Pack.git
cd ComfyLab-Pack
pip install -r requirements.txt

Restart after. No model downloads; requirements are light.

Gotchas

  • It does not fix type mismatches, only type labels. If you feed it a string and the destination genuinely needs a float, the error moves downstream instead of disappearing. Convert values with a real converter first, then bridge the type.
  • Use it like seasoning. A graph laced with converters everywhere is a graph nobody can debug. One here, one there, for a specific known reason - that's the pattern.
  • If a connection already works, don't bother. This node only earns its place when the strict type system blocks you.

It's the smallest node in the pack and the one whose name invites the most eye-rolling. Use it sparingly, use it deliberately, and it'll unblock the exact connections that would otherwise have you rebuilding half a workflow.

CategoryComfyLab/utils

Inputs (1)

NameTypeDefaultDescription
value*input value to convert to type Any

Outputs (1)

NameTypeDescription
value_any*input value, converted to type Any ('*')