Omini Kontext Pipeline Loader
Loading the Omini Kontext character-insertion pipeline
- OMINI_KONTEXT_PIPELINE
Everything else in this pack hangs off this one node. The Omini Kontext Pipeline Loader is what drags the whole character-insertion pipeline into memory - once it's run, every encoder, LoRA node and the main generation node downstream gets to work off a single OMINI_KONTEXT_PIPELINE object that this node emits.
Here's the deal with this pack before you go further: it's a community wrapper around Saquib764's omini-kontext, a fine-tuned take on FLUX.1-Kontext-dev that does "spatially controlled character insertion". You feed it a scene and a reference image of a character, and it drops the character into the scene without a mask - position controlled by a reference_delta. The wrapper author (ogkai, on GitHub as tercumantanumut) even says at the top of the README that the wrapper is "not updated" and points you to the original repo, which has since grown its own native implementation. Worth knowing before you build a workflow on top of this.
How it works
This loader is a pure diffusers affair. Under the hood it calls FluxOminiKontextPipeline.from_pretrained(model_path) in bfloat16, moves the result to CUDA, then flips on VAE slicing and VAE tiling to keep VRAM in check. That means it's not loading ComfyUI-native model files - it's loading the Hugging Face diffusers format, which is why the default model_path is black-forest-labs/FLUX.1-Kontext-dev, a repo id, not a filename.
That model is gated. The first time you run this node, it tries to download ~23GB (the 12B transformer plus the T5 text encoder, CLIP, and VAE) from the Hub, and it will fail with a 401 unless you're logged in. Run huggingface-cli login and paste your token. You can also pass the token directly via the optional hf_token field, or type a full local path into model_path if you already have the diffusers weights on disk - a trick worth knowing since the model's repo has been delisted/regated before.
The inputs that matter
model_path(string, defaultblack-forest-labs/FLUX.1-Kontext-dev) - HF repo id or a local path to diffusers-format weights.lora_path(optional) - absolute path to a.safetensorsLoRA to load at startup, e.g. theomini_kontext_character_5000.safetensorsfrom the README's example download. If you'd rather pick from yourmodels/lorasfolder, skip this and use the dedicated LoRA Loader node instead.hf_token(optional) - your Hugging Face token, if you don't want to rely on the CLI login.
Output is a single OMINI_KONTEXT_PIPELINE connection. That's the pipe - every downstream node in the pack expects it.
Installing the pack
cd ComfyUI/custom_nodes
git clone https://github.com/tercumantanumut/ComfyUI-Omini-Kontext
cd ComfyUI-Omini-Kontext
pip install -r requirements.txt
Then restart ComfyUI. ComfyUI Manager can do the clone for you if you search "ComfyUI-Omini-Kontext". The requirements pull in a diffusers install straight from the git main branch - this is a bleeding-edge dependency, not a stable release, so expect it to occasionally break when diffusers upstream changes. There's no ComfyUI-venv hand-holding here; make sure you're installing into the same Python environment ComfyUI runs in.
Common issues
The two you'll actually hit: "401 Unauthorized" - solve with huggingface-cli login; and "CUDA out of memory" right after the load - the full 12B model in bf16 is greedy. The README's rule of thumb: 24GB VRAM handles 1024×1024, 16GB should stay at 768×768 or lower, and the split loader in this pack (with GGUF transformer support) is the lower-VRAM escape hatch. First run is also slow - that's the download, not a hang.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_path | STRING | black-forest-labs/FLUX.1-Kontext-dev | — |
| lora_pathopt | STRING | — | |
| hf_tokenopt | STRING | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| OMINI_KONTEXT_PIPELINE | OMINI_KONTEXT_PIPELINE | — |