Get Dict Latent
Pull a latent out of a dict
- DICT
- default
- LATENT
Get Dict Latent pulls a LATENT back out of a DICT by name. Latents are the compressed image representation samplers actually work on, and in a multi-stage workflow you often want to hold onto one - the output of a base pass, an empty latent of a specific size, an intermediate you'll return to - and reuse it later. Stash it in the dict bag under a key and this node fetches it back where the next sampler or decode needs it, no long LATENT wire required.
This gets genuinely useful in branchy pipelines. A base generation whose latent feeds both a straight VAE decode and a refiner pass; or a workflow that stashes several candidate latents and picks one downstream. Keeping them named in a dict beats forking LATENT cables across the canvas, and it keeps the "which latent is which" bookkeeping in one place.
How it works
It's a typed Get Dict, so per the README it works like the plain Get Dict plus two things: an optional default and type validation. Give it a key; if the dict holds a real latent there, out it comes. If the key's missing or the stored value isn't a latent, you get the default instead - the node won't hand a sampler something malformed.
The inputs and outputs that matter
- key (required, text) - the name the latent was stored under. Match the Set Dict key exactly.
- DICT (required) - the bag to read from.
- default (optional) - a LATENT to fall back on if the key is missing or the wrong type.
One output: LATENT. Wire it into a sampler's latent input or a VAE Decode.
Installing it
Lightweight pure-Python pack - no model downloads, no heavy deps. ComfyUI Manager → Install Custom Nodes → search "antrobots ComfyUI Nodepack" → Install → restart, or clone it:
cd ComfyUI/custom_nodes
git clone https://github.com/antrobot1234/antrobots-comfyUI-nodepack
then restart. It's under antrobots-ComfyUI-nodepack/dicts/get.
Common issues
As with the other object-type gets, the optional default matters. If the key isn't found and you left the default empty, the fallback is effectively "no latent," and a sampler or decode handed that will error. Guarantee the key exists, or wire in a real fallback latent - an empty latent of the right dimensions is a reasonable choice.
One subtle thing with latents specifically: dimensions have to line up downstream. A latent you stashed at one resolution won't magically match a sampler expecting another, so retrieving the wrong one (via a key mix-up) can surface as a shape/size error rather than an obvious "missing" message. Keep keys unique and spelled consistently - typos silently return the default here, same as everywhere in the dict system. Small solo pack; real bugs are a GitHub issue, which the author welcomes.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | — | |
| DICT | DICT | — | |
| defaultopt | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |