Nodes/Omini Kontext/Omini Kontext Editor
ComfyUI Node

Omini Kontext Editor

Omini Kontext's canvas editor

By Saquib764·Created about a year ago·Updated 12 months ago· 444
Omini Kontext Editor
  • background
  • subject
  • subject_mask
  • IMAGE
  • IMAGE

The Omini Kontext spatial model has a specific appetite: it wants a reference image the same size as your scene, with your character placed exactly where you want them to appear. You don't want to hand-edit that in an external tool every time. OminiKontextEditor is the in-ComfyUI answer - an interactive canvas that lets you drag, scale, and rotate your subject over the background, then hands the properly-composed reference to the rest of the workflow.

It's not a generator. It's prep work: a positioning tool that lives in the node UI. Think of it as the difference between typing coordinates and pointing.

What it does

Three inputs, all straightforward:

  • background - your scene image.
  • subject - the character or object you want to insert.
  • subject_mask - the cutout mask of the subject (so the editor knows what's "character" and what's empty space).

When you run it, a canvas opens in the node showing the subject floating over the background. You move it into place, resize it, rotate it, and the node re-runs. It emits two IMAGE outputs, and the distinction matters:

  1. The subject composited onto a white background - this is the reference image you VAE-encode and feed to OminiKontextConditioning for the spatial workflow (delta [1,0,0]).
  2. The subject composited onto the background - your preview of where the model should place the character, and a handy reference for the edit prompt.

How it works under the hood

The editor is a fabric.js canvas embedded in the node's frontend. When you drag the subject, the frontend POSTs your positioning settings to a small local API endpoint (/omini_kontext_editor/update_subject_settings) that the node registers at startup. The node itself blocks until those settings arrive, then does the compositing and returns the two images.

That "blocks until the browser talks back" design is the one real gotcha: this node requires the web UI. It won't work headless, and if you run it from the API or an automation harness it will just sit there waiting forever. It also needs a moment on first run - the canvas has to appear and you have to actually move the subject once before the settings are sent. If the output looks wrong, double-check the subject mask, because a sloppy mask is the usual culprit for a character that drags along a chunk of its old background.

Install

Same as the whole pack - ComfyUI Manager → search Omini Kontext, or:

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

Restart ComfyUI. The fabric.js library ships with the pack, so no extra frontend setup.

Where it fits

This node exists to serve the spatial-character-test LoRA, and that LoRA is honest about its limits: the model takes "some freedom" about where the character actually lands, so your careful canvas placement is a strong suggestion, not a contract. Still, for the one workflow it serves - drop a character into a scene, roughly where you want them, then let Kontext blend - it's the missing ergonomic piece. If you're using the plain character-insertion LoRAs (character_3000 / product_2000) instead, you don't need this node at all; those just want a reference on a white background.

Categoryimage

Inputs (3)

NameTypeDefaultDescription
backgroundIMAGE
subjectIMAGE
subject_maskMASK

Outputs (2)

NameTypeDescription
IMAGEIMAGE
IMAGEIMAGE