TT Context Set Latent
The tiny node that writes a latent into your context
- context
- latent
- CONTEXT
TT Context Set Latent does one thing: it takes a TT_CONTEXT and a LATENT, stuffs the latent into the context, and hands the context back. That's the whole node - one input pair, one output. If that sounds pointless, you haven't hit the moment where your context workflow produces a latent somewhere off to the side and the downstream VAE decode expects it to be inside the context. That's exactly what this node is for.
It's part of TenserTensor's context system, the pack's take on the "bundle all state, pass it down one wire" pattern that rgthree made famous. The context object carries the model, the CLIP, the VAE, conditioning, and the latent. Setter nodes like this one are how you add or replace a piece of that state at a specific point in the graph.
Why this beats rewiring
Say your graph looks like: load model → build context → run a sampler → decode. The sampler outputs a fresh LATENT. If your decode node reads latents from the context, you have two choices: wire the sampler's latent all the way around into the context (a long, ugly connection), or drop a TT Context Set Latent in the middle - sampler output into latent, context through the top, updated context out the bottom. The second keeps the graph compact and the data flow obvious.
Same logic applies anywhere a node produces state the context should know about. The setter overwrites whatever was there, so it also works as a "replace the latent with this one" checkpoint - useful in multi-pass workflows where an intermediate latent should become the working one.
The fine print
The socket type is TT_CONTEXT, which is proprietary to this pack. It only connects to other TenserTensor context nodes; try to feed it from a stock node or hand its output to a third-party node and you'll get a type mismatch. So this node has zero standalone value - it's purely an internal part of the TenserTensor context flow.
It's also a legacy V1 node. The pack migrated to ComfyUI's API V3 and parked the V1 context nodes in Deprecated/, with removal planned for a future major release. If you're starting a new context workflow, check whether your installed version exposes a V3 equivalent under TenserTensor/Context and prefer that; the pattern survives, the specific node may not.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/tenser-tensor/ComfyUI-TenserTensor
or ComfyUI Manager → search "TenserTensor" → install → restart. The pack's dependencies are gguf and kornia, which Manager installs for you.
The one thing that catches people: this node writes to the context but returns only the context - it doesn't pass the latent through. If you also need the latent downstream as a plain LATENT socket, grab it from the node that produced it and keep both wires. Beginners often assume the setter forwards its input; it doesn't.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| context | TT_CONTEXT | — | |
| latent | LATENT | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| CONTEXT | TT_CONTEXT | — |