Nodes/ComfyUI-Omini-Kontext/Omini Kontext Pipeline
ComfyUI Node

Omini Kontext Pipeline

The Omini Kontext Pipeline generation node

By tercumantanumut·Created about a year ago·Updated about a year ago· 60
Omini Kontext Pipeline
  • pipeline
  • reference_image
  • input_image
  • IMAGE
prompt
reference_delta_x0
reference_delta_y0
reference_delta_z96
steps28
guidance_scale3.5
width1024
height1024
seed0
negative_prompt
true_cfg_scale1.0

This is the payoff node of the pack - the one you wire everything into when you want "my character, in this scene, roughly here". It's the character-insertion step of omini-kontext, a community fine-tune of FLUX.1-Kontext-dev, exposed as a single ComfyUI node. Feed it a scene image, a reference image of a character, a prompt, and a position delta, and it returns a fresh image with the character blended into the scene. No mask, no inpainting pass, no ControlNet - the reference is consumed in-context, which is exactly how FLUX.1-Kontext does editing natively.

The thing to keep in mind: Kontext models like this one are the reason character consistency stopped being a nightmare in mid-2025. Because the reference image is concatenated into the model's context window rather than injected as adapter embeddings (the IP-Adapter approach), identity holds much better across edits. Omini-kontext takes that trick and adds positional control on top.

How it works

The node is a thin wrapper over the diffusers FluxOminiKontextPipeline.__call__. It converts your IMAGE inputs to PIL, builds a reference_delta list from the three int inputs, seeds a torch generator, and hands the whole lot to the pipeline. Internally the pipeline resizes the reference to a multiple of 16, VAE-encodes it, packs the tokens, and computes latent image ids - then adds the delta straight into those ids, which is what moves the reference around the spatial grid. Because it runs the real diffusers pipeline, you get ComfyUI's progress bar in the UI for free (there's a callback wired into callback_on_step_end).

The inputs that matter

Most of the required inputs are self-explanatory generation knobs (steps default 28, guidance 3.5, width/height 1024, seed). The ones worth actually thinking about:

  • reference_image - the character or object you're inserting. First frame of the batch is used.
  • reference_delta_x / reference_delta_y - horizontal and vertical placement, roughly -100 to 100. 0 puts the subject around center.
  • reference_delta_z - the depth/integration axis, default 96. The author's workflow sets it to (scene_height + reference_height) / 16; 48–144 is the sane range. Lower = tighter into the scene, higher = more separate.
  • input_image (optional) - the base scene for img2img-style runs. If you leave it disconnected, the node still inserts the reference into a newly generated scene from the prompt.
  • negative_prompt + true_cfg_scale (optional) - true_cfg_scale above 1.0 with a negative prompt enables true classifier-free guidance, which runs the model twice. Leave it at 1.0 if you don't need the extra prompt adherence; it's a real speed cost.

Output is a single IMAGE, ready for a standard Save Image node. The README's sample workflow is: two Load Images → Pipeline → Save, with the reference delta [0, 0, 96], 28 steps, seed 42, prompt "Add character to the image."

Gotchas

VRAM is the big one - this is a 12B diffusers model and a full 1024×1024 run is 24GB-class territory. At 16GB, drop to 768×768 or use the GGUF split loader path. Also remember the identity of this pack: it's a wrapper, the README admits it's stale, and FLUX.1-Kontext now has native ComfyUI nodes. Those don't give you the positional reference_delta control though - that's what this pipeline is actually for. If the reference comes out looking like it was pasted rather than placed, that's the delta doing its job badly, not a bug; nudge x/y to move it and z to blend it.

CategoryOminiKontext

Inputs (14)

NameTypeDefaultDescription
pipelineOMINI_KONTEXT_PIPELINE
promptSTRING
reference_imageIMAGE
reference_delta_xINT0-1000–1000
reference_delta_yINT0-1000–1000
reference_delta_zINT96-1000–1000
stepsINT281–1000
guidance_scaleFLOAT3.50–20
widthINT102464–2048
heightINT102464–2048
seedINT00–18446744073709550000
input_imageoptIMAGE
negative_promptoptSTRING
true_cfg_scaleoptFLOAT1.00–10

Outputs (1)

NameTypeDescription
IMAGEIMAGE