Nodes/ComfyUI Ino Nodes/Ino Cast Any To Vae
ComfyUI Node

Ino Cast Any To Vae

The name is a lie — it doesn't convert anything, and that's the point

By nobandegani·Created about a year ago·Updated 2 months ago· 6
Ino Cast Any To Vae
  • input_any
  • vae

Let me save you a confused five minutes: Ino Cast Any To Vae does not cast anything. It's a type label. The source code is literally return io.NodeOutput(input_any) - the value goes in and comes back untouched. What the node actually does is tell ComfyUI "trust me, this wire is a VAE," so a value that was passing through the graph as generic * (any) type can plug into a socket that insists on VAE.

If that sounds niche, it is - but it's the kind of niche that unblocks whole workflow designs.

Why type labels matter in ComfyUI

ComfyUI wires are typed. A node that outputs IMAGE won't plug into an input that expects LATENT, and ComfyUI's node graph editor enforces this at connection time. But a lot of the interesting plumbing nodes - switches, relays, "any" pass-throughs - output the * wildcard type precisely so they can connect to anything. The catch is downstream: a VAE Decode or VAE Encode input expects a VAE and the editor won't let a * wire dock without help. This node is the adapter that bridges the gap. The CastHelper family does the same trick for MODEL, CLIP, CONTROL_NET, string, and int.

How to use it

One input, input_any, accepting anything. One output, vae, typed as VAE. The classic pattern:

  1. You have a switch, relay, or config-driven node that outputs * - say, a node that picks one of two pipelines.
  2. You know that in practice the value flowing through is a real VAE object from a VAE Loader.
  3. Wire the * output into input_any here, then wire this node's vae output into your VAE Encode / VAE Decode / VAE Loader input.

That's it. The connection now type-checks, the graph runs, everyone's happy.

The one trap that will bite you

The label is only as good as the value underneath. This node does not validate that input_any is actually a VAE - it passes it through blind. If you cast something that isn't a VAE (a latent tensor, a string, nothing at all), you won't get an error at this node. You'll get a confusing crash further down the pipeline where some node tries to call a method on a VAE object and finds garbage. So the rule is: only use it when you know the upstream value is genuinely a VAE. If you're using it to fake your way past a type error you don't understand, you're just moving the crash.

Installation

It ships in ComfyUI-InoNodes:

  • ComfyUI Manager: search "ComfyUI Ino Nodes", install, restart.
  • Manual: cd ComfyUI/custom_nodes && git clone https://github.com/nobandegani/comfyui_ino_nodes && cd comfyui_ino_nodes && pip install -r requirements.txt, restart.

Needs Python 3.10+ and ComfyUI 0.18.1+ (the pack runs entirely on the V3 node schema). No models, no keys. The pack's core dependency, inopyutils, installs with the requirements.txt so there's nothing extra to fetch for this node.

Honestly, most people never need it. But the day you build a workflow with a config-driven switch that can route between a full Flux stack and a lightweight one - and that's exactly the kind of thing InoNodes is for - this is the node that makes the VAE socket stop fighting you.

CategoryInoCastHelper

Inputs (1)

NameTypeDefaultDescription
input_any*

Outputs (1)

NameTypeDescription
vaeVAE