Set Dict Latent
Carry a latent through your graph in a dict
- LATENT
- DICT
- DICT
Latents are the wires you least want snaking across a big workflow - they run from your empty-latent or VAE-encode node all the way to a sampler that might be six node-widths away. Set Dict Latent lets you drop a latent into a DICT bundle so it travels with the rest of your workflow's values on one shared wire, and gets pulled back out by name with a Get Dict wherever you actually need it.
It's the latent member of the antrobots dict family. The family's whole reason for existing is to bundle: rather than running a dedicated wire for every value, you pack them into one keyed container and route that around. Same instinct as rgthree's Context nodes keeping a graph readable, just as an open, self-named bag instead of fixed typed slots - and here the slot holds a latent.
What this is actually good for
Two honest use cases. One, stashing a base or reference latent you'll want again later - carry it in the bundle and re-fetch it downstream instead of dragging a long wire back across the canvas. Two, keeping a latent grouped with its own settings, so the latent and the seed and the denoise that go with it all move together as one tidy package. For a plain point-to-point latent connection you don't need this at all; the payoff shows up once the wire would otherwise be long or the value has to reach several places.
Unlike the number and text variants, there's no widget here - you can't type a latent by hand, so the value is always an input connection. That means Set Dict Latent buys you organization rather than an inline-editing convenience: a labeled, typed port that pairs with a latent-typed Get Dict on the far end.
How it works
A dict here is a Python dictionary carried on a custom DICT wire. Give the node a key and a LATENT and it opens a new one-key bundle. Give it a key, a LATENT, and an existing DICT and it appends to that bundle and passes the whole thing forward. You chain them - output into the next node's DICT input - to build up the bundle.
The inputs and outputs that matter
- key (string) - the name you'll fetch the latent by later, matched exactly by Get Dict.
- LATENT - the latent, wired in from an empty-latent, VAE-encode, or sampler output. No widget.
- DICT (optional) - an existing bundle to append to; empty starts a fresh one.
Output is a single DICT, on its way to the next Set Dict or a Get Dict.
Installing it
Install the whole pack. Via ComfyUI Manager: Install Custom Nodes, search antrobots ComfyUI Nodepack, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/antrobot1234/antrobots-comfyUI-nodepack
then restart ComfyUI. It's pure Python with nothing to download and no fussy dependencies, so installation is quick.
Common issues
The dict is a reference, not a snapshot. If you bundle a latent and then keep manipulating it downstream, be clear in your own head about which stage you stored - carry the version you actually want to reuse, and if you need a genuinely frozen copy, bundle it before anything else touches it.
The rest is the family's standard fine print. Keys are matched as exact strings, so a mismatch between this node and the Get Dict silently returns a default (an empty latent) rather than erroring - check the key spelling first when a latent "goes missing." The DICT type is antrobots-only and unpacks through a Get Dict, never into a stock node. And this is a small, single-maintainer pack with next to no community discussion, so the README's nudge to open a GitHub issue is your real support line if something breaks.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| key | STRING | — | |
| LATENT | LATENT | — | |
| DICTopt | DICT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| DICT | DICT | — |