Omini Kontext Latent Decoder
Omini Kontext Latent Decoder
- pipeline
- latent
- IMAGE
The encoder nodes in this pack take images and turn them into tokens so you can inspect the machinery. The Omini Kontext Latent Decoder is the reverse: it takes a latent and turns it back into an image. If you've encoded something, poked at it, maybe combined it, this is the node that closes the loop and shows you the result as pixels you can actually save.
How it works
Diffusers pipelines store image latents in a "packed" format - the Flux family packs the 16 latent channels into groups before they go into the transformer, and the raw LATENT tensors coming out of the encoders are in that packed layout. You can't just hand packed tokens to a standard VAE decode and get sensible pixels. This node handles the unwrapping: it calls the pipeline's _unpack_latents to restore the proper channel layout, rescales by the VAE's scaling and shift factors, runs the decode, and normalizes the result to the [0, 1] range ComfyUI expects. That's the whole job, and it's exactly the bookkeeping the pipeline would do internally - the reason this node has to exist is that you're now on the other side of that wall.
The inputs that matter
pipeline- theOMINI_KONTEXT_PIPELINEfrom a loader; the VAE lives inside it.latent- aLATENT-typed tensor, typically theCOMBINED_LATENToutput of the Latent Combiner or theLATENToutput of the Image Encoder.heightandwidth- both default 1024, and they matter more than you'd think. The unpack step needs to know the spatial dimensions to reshape the packed tokens back into an image-shaped latent. Get them wrong and you'll get a shape error or a mangled result; they should match the resolution the latent was encoded at.
Output is a single IMAGE, wired straight into a Preview/Save node like anything else.
Where it fits
The full manual loop is: Image Encoder (scene) + Reference Encoder (character) → Combiner → Decoder → Save. That loop is a complete, runnable demonstration of the pipeline's data flow, even if it's not how you'd generate final output. Where the Decoder genuinely earns its place is checking your work - decode a latent you hand-modified and see what your edit did to the actual pixels, which is the fast feedback the other advanced nodes don't give you. And the same caveat as the rest of the set applies: the Pipeline node does its own decode internally, so if you're only after output images, you don't need this node at all.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | OMINI_KONTEXT_PIPELINE | — | |
| latent | LATENT | — | |
| height | INT | 102464–2048 | — |
| width | INT | 102464–2048 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |