LatentTypeConversion
Squeeze Your Latents Into Half the VRAM
- latent
- LATENT
Your latent tensor doesn't need to live in float32. Half the precision, half the VRAM, and for most SDXL/Illustrious/Flux-style models the sampler won't care - that's the whole pitch of LatentTypeConversion, a tiny node from the Eden.art nodesuite that casts a LATENT between float16 and float32 on demand.
Why would you bother? Because where you put that cast matters. Sampling in float32 and decoding in float32 is a memory hog on an 8GB card. But plenty of workflows hit it in the opposite direction: some KSampler setups or VAE decoders quietly want float32, and a latent you've been carrying around in fp16 the whole time chokes them. This node lets you store the cheap version and promote it exactly where something needs the expensive one. Drop one right after EmptyLatentImage to keep everything fp16, then a second one right before a stubborn VAE decode to bump back up.
How it works
It's embarrassingly simple under the hood, which is the point. The node reads your latent dict, prints what it found (dtype, shape, device, plus free memory) when verbose is on, and does a straight cast - .half() to go down, .float() to come back up - inside an autocast block. No sampling happens, no precision rescaling, nothing clever. It passes the latent dict straight through, just with a different tensor dtype.
The inputs that matter
Only three, and two of them you'll touch once:
latent- the LATENT you want converted.output_type- the enum that's the whole node:float16orfloat32.verbose- default on. It prints input/output dtype, shape, device and available memory to your console on every run. Genuinely handy when you're diagnosing a low-VRAM run; annoying when you're looping 50 frames and the console is one big wall of it. Turn it off once you've confirmed your cast is working.
Output is a single LATENT with the same shape and batch, so you can wire it anywhere a latent expects to go - into a KSampler, into VAEDecode, into another conversion.
Installing it
It ships in edenartlab/eden_comfy_pipelines ("Eden.art nodesuite"), a grab-bag of 70+ nodes from the Eden.art platform team. ComfyUI Manager is easiest - search "Eden" and install. Or clone it:
cd ComfyUI/custom_nodes/
git clone https://github.com/edenartlab/eden_comfy_pipelines.git
cd eden_comfy_pipelines
pip install -r requirements.txt
Restart, and the node appears under Eden π±. The full dependency list is heavy (clip-interrogator, transformers, scikit-image, opencv-python and friends all land in your shared Python environment), so expect the occasional dependency clash - the ecosystem's classic complaint, and one of the main reasons people prefer Manager for handling it.
Common issues
Honestly, this node doesn't have many failure modes. Two things to know: float16 latents lose a little numeric precision, and for most base models that's invisible, but if you're doing heavy img2img or tiling work and see color banding creep in, suspect the fp16 path. And since the cast is in-place on the latent dict, don't expect it to fix a workflow that's already OOM'd - it saves you memory before the heavy ops, not after. Put it early.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| latent | LATENT | β | |
| output_type | COMBO | 2 options: float16, float32 | |
| verbose | BOOLEAN | true | β |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | β |