Nodes/Omini Kontext/Omini Kontext Model Patch
ComfyUI Node

Omini Kontext Model Patch

The other half of the Omini Kontext handshake

By Saquib764·Created about a year ago·Updated 12 months ago· 444
Omini Kontext Model Patch
  • model
  • MODEL

Omini Kontext works in two halves. OminiKontextConditioning attaches a reference image to the conditioning, and OminiKontextModelPatch is the half that makes the model actually read it. One without the other does nothing - feed the reference conditioning into a stock Flux Kontext model and it's silently ignored, because the vanilla forward pass never looks for it.

This node is a small, focused monkeypatch: MODEL in, patched MODEL out. It clones your loaded model, swaps in a forward pass that knows how to find omini_latents in the conditioning, tokenizes the reference latent, and concatenates it into the image tokens with shifted 3D RoPE position ids. The extra extra_conds plumbing makes sure those reference latents survive the trip from conditioning to the transformer at all. If the loaded model isn't a Flux model, the patch is a no-op - so it won't hurt anything if you wire it wrong, it just won't help either.

How to use it

Load FLUX.1-Kontext-dev as your diffusion model, then route it through this node before the KSampler:

Load Diffusion Model (FLUX.1-Kontext-dev) → OminiKontextModelPatch → KSampler

The patched MODEL output is what you sample with. Load your Omini Kontext LoRA (character_3000, product_2000, or spatial-character-test) at 0.5–0.7 strength, set CFG to 1.5, and pair it with the matching delta values on the conditioning node. If your output looks like the model never saw the reference, first check the patch is actually in the path - it's the most common cause, and it's invisible until you get a wrong result.

Install and the low-VRAM route

Same install as the rest of the pack - ComfyUI Manager, search Omini Kontext, or:

cd ComfyUI/custom_nodes
git clone https://github.com/Saquib764/omini-kontext

Restart ComfyUI and you're done; the ComfyUI nodes themselves have no extra pip dependencies.

The base model is the 12B Kontext, which doesn't fit comfortably on small cards at fp16. Run it fp8 or GGUF to fit - that's standard Kontext practice and works fine here. The one caveat: if you're on the Nunchaku path (int4 quantized Flux Kontext), use NunchakuOminiKontextPatch instead of this node. The nunchaku model wrapper is different enough that this patch won't compose LoRAs correctly for it. Two patches, same idea, different engines - picking the wrong one is a classic source of "nothing happens" mysteriously.

Honest expectations

This patch is pure plumbing, so there's nothing to tune and nothing to judge quality on - the LoRA and the base model are doing all the work. It's also a hobby-project patch: it was written for a specific ComfyUI/Flux era and hasn't seen active development since late 2025. If it breaks on a future ComfyUI release, check the repo's issues before assuming you did something wrong. For a supported, actively-maintained take on "edit my image with a second image," Qwen-Image-Edit and its LoRA ecosystem is the path with the legs under it.

Categorymodel_patches/unet

Inputs (1)

NameTypeDefaultDescription
modelMODEL

Outputs (1)

NameTypeDescription
MODELMODEL