⭐ Star Minimax H3 Image Inpainter
Masked Edits From a Video Model, Minus the Seams
- model
- clip
- vae
- image
- mask
- ref_images
- sigmas
- preview
- IMAGE
- LATENT
- MASK
- seed
Inpainting with a video model sounds like a category error until you look at what H3 does with a mask. Then it sounds like the obvious thing.
This node is the pack's Flux2/Qwen-Image-Edit Inpainter recipe rebuilt for MiniMax H3, and it leans on the fact that H3 consumes a per-token denoise mask natively instead of needing the Flux concat machinery. That one design detail is why soft mask edges actually mean something here.
Why you'd reach for it
The 2026 default way to inpaint anything modern is crop, edit, stitch - the Inpaint Crop → model → Inpaint Stitch pattern, which won because it leaves unmasked pixels alone instead of pushing them through a VAE round-trip. This node is that pattern in one box, with H3 doing the edit.
The reason to pick H3 over Qwen-Image-Edit is the reference system: the source goes in as <Picture 1>, and any extra image you connect becomes <Picture 2>, <Picture 3> and so on - up to eight - so you can hold an identity or a product across the fill instead of hoping the surrounding pixels carry it.
How it works
Three moves. First it crops to the mask's context area with the same crop helper as the Flux2/Qwen inpainter, where expand_pixels, mask_blur and blend_pixels handle padding, mask softening and stitch feather.
Second it VAE-encodes the crop into H3's single-frame image mode - one video latent frame plus the silent audio member the packed AV layout always carries - and packs the mask the same way, with the audio member pinned to silence.
Third, the clever bit: H3 doesn't get a binary hole. Mask value m puts that DiT row at sigma m * sigma, preserved rows sit at the conditioning timestep with the clean source re-injected every step, and masked rows regenerate. A blurred mask edge is literally a gradient of denoise strength - the model's own differential diffusion, no hack required. Then the decoded still is stitched back with the blend mask.
The inputs that matter
model, clip and vae are the usual trio: an H3 diffusion model (UNETLoader, or the MODEL output of ⭐ Star Minimax All In One - cheaper, since the encoder is already loaded), the Qwen3-VL text encoder at clip type minimax, and minimax_h3_video_vae_fp16.
Then image and mask (white = regenerate), and prompt - remember the source is <Picture 1>, so "make <Picture 1> hold a copper mug" is the shape of the thing.
reference is the setting people miss. masked source sends the crop with the hole blanked to gray, which tells the model what to fill. source sends it untouched - edit style, the model can see what was there. off sends no picture at all, leaving you with mask plus prompt. If a fill keeps "restoring" the thing you wanted replaced, off is usually the fix.
megapixels defaults to native, which keeps the crop's own pixels. On a small crop that's the wrong choice: H3 stills hit their stride around 3 MP and up, and the result gets scaled back to crop size for stitching, so rendering bigger is nearly free quality.
cfg at 1.0 is the H3 preset and uses the basic positive-only guider. negative_prompt is only encoded when cfg differs from 1.0 - at 1.0 a negative isn't weak, it's discarded, because ComfyUI gates the uncond pass on cond_scale == 1.0. Write constraints as presence instead.
Outputs: IMAGE (the original with the filled region stitched back), LATENT (the packed AV latent before decode), MASK, and seed as a passthrough.
Install
Manager → search Starnodes → install → restart. Manual:
cd ComfyUI/custom_nodes
git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
cd ComfyUI_StarNodes && pip install -r requirements.txt
No extra model downloads - it uses the H3 files you already have in models/diffusion_models, models/text_encoders and models/vae. The pack itself is a big toolbox by Starnodes2024, updated often, and if a dependency is missing only the affected node disappears, with the package name printed in the console.
Where it goes wrong
Batch size 1, always. Feed it two images and it throws [Star Minimax Inpainter] MiniMax H3 supports batch size 1 - feed one image at a time. Model limitation, not a node bug.
Blank prompt doesn't fail - it silently substitutes "Seamlessly fill the masked area of <Picture 1>, matching the surrounding content." Convenient, but if your fill looks generic, check you actually typed something.
Hard seams come from mask_blur and blend_pixels fighting your mask - both default to 16, and small detail fixes usually want less while big object swaps want more. expand_pixels at 32 is decent context for a face and thin for a full object replacement; bump it if the fill arrives looking like a cut-out.
Finally, memory. The encoder is a separate and enormous budget from the diffusion model, so reusing the AIO's MODEL/CLIP/VAE outputs rather than loading a second copy is the difference between "runs" and "OOM at encode".
Inputs (22)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | MiniMax H3 diffusion model (e.g. from UNETLoader or a ⭐ Star Minimax All In One MODEL output). | |
| clip | CLIP | The MiniMax H3 text encoder (Qwen3-VL-32B, clip type 'minimax'). | |
| vae | VAE | The MiniMax H3 video VAE (e.g. minimax_h3_video_vae_fp16). | |
| image | IMAGE | — | |
| mask | MASK | 1/white marks the regions to regenerate. | |
| prompt | STRING | What to generate in the masked area. The source image is <Picture 1>, extra reference images are <Picture 2>, <Picture 3>, ... | |
| reference | COMBO | masked source | How the source crop enters the conditioning as <Picture 1>: 'masked source' shows it with the inpaint area blanked to gray (the mask's hole signals what to fill), 'source' shows it untouched (edit style - the model can see what was there), 'off' sends no picture to the text encoder at all. |
| megapixels | COMBO | native | Render resolution of the inpaint crop. 'native' keeps the crop's own pixels; the MP presets rescale crop + mask to that pixel area first - H3 stills hit their quality sweet spot around 3 MP and up. The result is scaled back to the crop size for stitching. |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–10000 | — |
| cfg | FLOAT | 1.00–100 | CFG scale. At 1.0 the negative prompt is skipped and the positive-only basic guider is used (the H3 preset). |
| sampler_name | COMBO | res_multistep | 44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38 |
| scheduler | COMBO | simple | 'beta' or 'normal' tends to outperform 'simple' for reference-heavy prompts. |
| denoise | FLOAT | 1.000–1 | — |
| negative_prompt | STRING | Negative prompt - only encoded when cfg differs from 1.0. | |
| expand_pixels | INT | 320–512 | Context margin added around the masked area before sampling - more context helps the model blend the fill into the scene. |
| mask_blur | FLOAT | 16.00–256 | Grow + blur applied to the denoise mask (same as the Flux2 inpainter's mask blur). Soft edges translate directly into per-row denoise strength on H3. |
| blend_pixels | FLOAT | 16.00–256 | Feather width of the blend mask used when stitching the decoded still back into the original image. |
| ref_image_size | COMBO | match | Reference image sizing. 'match' scales each ref (down only, keeping aspect) to the render area; 'max' uses a 2048px short edge for best identity fidelity but is slower. |
| ref_imagesopt | COMFY_AUTOGROW_V3 | — | |
| sigmasopt | SIGMAS | Optional exact sigma schedule (e.g. from a '⭐ Star Custom Sigmas' node) - overrides the scheduler, steps and denoise widgets. | |
| previewopt | STAR_PREVIEW | Optional live sampling preview from a '⭐ Star Preview' node. |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | The original image with the inpainted region stitched back in. |
| LATENT | LATENT | The sampled packed AV latent (NestedTensor video+audio), before decoding. |
| MASK | MASK | — |
| seed | INT | — |