Omini Kontext Image Encoder
Omini Kontext Image Encoder
- pipeline
- image
- LATENT
- IMAGE_IDS
The main Pipeline node encodes your scene and reference images for you, silently, every run. The Omini Kontext Image Encoder is what happens when you want to do that encoding yourself and see the pieces. It takes a pipeline and an image and returns the image's latent tokens plus the latent image ids - the exact two things that get concatenated into the model's context window during generation.
How it works
Under the hood it calls the same encode_images helper the pipeline uses internally: the image is preprocessed, VAE-encoded, shifted and scaled, then packed into the Flux-style token layout via _pack_latents, with latent image ids prepared alongside. The only difference from the automatic path is that you get them out as separate ports instead of them being consumed internally. Nothing about the encoding is special - it's the standard Kontext image encoding, exposed.
The inputs and outputs
pipeline- theOMINI_KONTEXT_PIPELINEfrom a loader (the encoders need it because encoding uses the pipeline's VAE and image processor).image- any ComfyUIIMAGE.
Two outputs: LATENT (the packed image tokens) and IMAGE_IDS (the positional id grid that tells the transformer where each token sits). Both are plain tensors, and they're the types the Latent Combiner and Latent Visualizer nodes expect on their input sides.
The honest framing
Here's the thing you should know before you build anything with these advanced nodes: there is no sampler node in this pack that consumes LATENT + IMAGE_IDS and runs the denoise loop on them. The Pipeline node takes raw images, not pre-encoded latents. So the encoder chain is for understanding and inspection - you can see the token shapes, feed them into the Combiner to see how scene and reference tokens join, and dump them through the Visualizer to check what actually got encoded - but it's not a working shortcut to speed up repeated generations. The pack's README labels these "advanced encoder nodes for advanced workflows", and the honest version of that sentence is "for poking at the internals".
That's not nothing, though. If you're the kind of person who got this far because the insertion results were mysterious, encoding an image once and running it through the Visualizer will teach you more about what omini-kontext actually does to your input than any amount of reading. And if diffusers later adds a proper "latents in, image out" path, this encoder is the piece you'd feed it. Until then, treat it as a diagnostic instrument with a pleasant side effect of demystifying the pipeline.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| pipeline | OMINI_KONTEXT_PIPELINE | — | |
| image | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | — |
| IMAGE_IDS | IMAGE_IDS | — |