Nodes/ComfyUI-EditUtils/EditUtils: Minimax H3 Image Edit Text Encode lrzjason
ComfyUI Node

EditUtils: Minimax H3 Image Edit Text Encode lrzjason

The three-image, one-node H3I edit encoder — and why your edit came back shifted

By lrzjason·Created 11 months ago·Updated 15 days ago· 271
EditUtils: Minimax H3 Image Edit Text Encode lrzjason
  • clip
  • vae
  • image1
  • image2
  • image3
  • mask
  • conditioning
  • latent
  • custom_output
  • main_image
  • mask
◄prompt—►
◄ref_short_edge1024►
◄ref_short_edge21024►
◄ref_short_edge31024►
◄scale_up1.00►

Instruction editors have one chronic disease, and it predates H3-Image by a year: you ask for a hair colour change and the whole frame comes back nudged a few pixels, proportions slightly wrong, faces a little off. Qwen-Image-Edit users complained about exactly this loudly enough that the 2511 card leads with a drift fix. The EditUtils pack exists largely to stop that class of problem - and the author, who also ships the consistency and depth LoRAs people pair with it, points users at it for precisely this reason. This node is the short version of that plumbing for MiniMax-H3-Image.

What it is

MinimaxH3ImageEditTextEncode_EditUtils is the one-node path: clip, vae, prompt, up to three images in, conditioning and latent out. It builds the H3-Image model config and the per-image configs internally, then hands everything to EditTextEncode_EditUtils. If you don't need per-reference sizing control or more than three images, use this and skip the config nodes entirely.

How it works

Three things get built here:

Text. The minimax CLIP (Qwen3-VL-32B truncated to layer 50) tokenizes your prompt with picture_label="Picture %d: ", so every reference becomes "Picture 1: " + <vision block> before your text. The tokenizer owns that presentation - it's why you must not type the label yourself.

Reference latents. Each image is VAE-encoded to a 24-channel latent and collected into a minimax_refs list on the conditioning, as {kind, latent_h, latent_w, latent}. ComfyUI's native H3-Image model packs the rows as [text | references | target] and re-injects them at every step, never denoised.

A target latent. image1's reference latent, multiplied by scale_up. That's the noise canvas the sampler starts from.

Inputs that matter

clip, vae and prompt are required. The prompt should be a full caption of the result - what the finished picture looks like, with the edit folded into it - and you refer to the references as <Picture 1>, <Picture 2>. Not Picture 1: with a colon; that label is already added, and typing it counts twice.

image1 is the picture being edited: its latent supplies the target grid and its pixels come back out as main_image. image2 and image3 are plain references. ref_short_edge (plus _2 and _3) default to 1024 and are the short edge of both the latent and the vision copy.

scale_up (default 1.0, up to 4.0) is the one you'll actually adjust. H3-Image was trained at 4–20 MP and a 1 MP target comes out poster-like; 2.0 turns a ~1 MP main reference into a ~4 MP result. The node prints a warning when your target falls under the trained range, so you don't have to guess.

mask exists in the schema but H3-Image has no per-pixel denoise mask in its packed layout - the encoder warns and drops it. Don't build a masking workflow on top of this route.

Outputs: conditioning → KSampler positive, with a ConditioningZeroOut of it feeding the negative; latent → KSampler latent_image; custom_output → the output extractor; main_image and mask for previews or downstream compositing.

Wiring, minimal

UNETLoader (minimax_h3_image_pruned_w4a8) ──────────────────► KSampler ──► VAEDecode ──► SaveImage
CLIPLoader (qwen3vl_32b_minimax_h3_nvfp4_awq, type minimax) ─┐
VAELoader  (minimax_h3_image_vae_fp16) ──────────────────────┼─► MinimaxH3ImageEditTextEncode ─► KSampler
LoadImage ──────────────────────────────────────────────────┘         └─ ConditioningZeroOut ─► negative

Sampler: euler / simple, 6 steps, CFG 1.0, denoise 1.0. Six is not a preference - the checkpoint is a PDD distill with a 7-point sigma grid, and 6 steps land exactly on it. Guidance is baked into the weights, so CFG 1.0 with a zeroed negative is the whole contract.

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/lrzjason/ComfyUI-EditUtils
# restart ComfyUI

Or ComfyUI Manager, search ComfyUI-EditUtils. No pip dependencies - this pack ships none and relies on ComfyUI core. That cuts both ways: you need a ComfyUI build with native MiniMax-H3-Image support (image_model="minimax_h3_image", a minimax CLIP type) or the loaders won't offer what you need. Load the pack's workflows/minimax h3 image editutils example.json first.

Common issues

Wrong image wins. image1 is always the main image in this node. If you wire your reference into slot 1, you're editing the reference.

Poster look at 1 MP. Raise scale_up. The console tells you when the target is under ~3.5 MP.

<Picture 2> had no effect. Check image2 actually arrived - an unwired optional socket produces a valid encode with fewer references, and the prompt then references something the model never saw.

Different output than the config-chain graph. This path hardcodes ComfyUI's reference sizing and ref_crop="disabled". If you need center/pad behaviour or more than three references, move to MinimaxH3ImageConfigPreparer_EditUtils plus EditTextEncode_EditUtils.

Categoryadvanced/conditioning

Inputs (11)

NameTypeDefaultDescription
clipCLIP—
vaeVAE—
promptSTRINGDescribe the edited result; refer to the references as <Picture 1>, <Picture 2>, ...
image1optIMAGE—
image2optIMAGE—
image3optIMAGE—
ref_short_edgeoptINT102432–4096Short edge of image1's reference latent and vision copy
ref_short_edge2optINT102432–4096Short edge of reference 2
ref_short_edge3optINT102432–4096Short edge of reference 3
scale_upoptFLOAT1.001–4Final latent size = image1's reference size x scale_up. 2.0 turns a ~1 MP main reference into a ~4 MP target.
maskoptMASK—

Outputs (5)

NameTypeDescription
conditioningCONDITIONING—
latentLATENT—
custom_outputANY—
main_imageIMAGE—
maskMASK—