Fantastic H3 Edit Composite
Only the masked area gets regenerated
- images
- references
- images
Here's the thing nobody tells you about video editing models: ask one to change a jacket and it hands back the whole clip, slightly different everywhere. That's fine for a restyle and terrible for a targeted edit, because the ninety-five percent of the frame you liked just went through a VAE round trip it didn't need.
This node exists to stop that. It's the paste-back step of masked editing: H3 regenerates everything, and then this drops only the area you masked - as H3 actually rounded it out to the latent grid, feather included - back into your original frames through a soft edge. The rest of the picture is the source file's own pixels, not a VAE's memory of them.
That "bit-identical unmasked pixels" property is the one thing masked inpainting still owns over instruction-based editing, and it's the whole reason this node is in the graph.
How it works
It reads the edit spec off the references bundle - the same H3_REFS bundle the Text Encode gets, which remembers which clip is being edited, its mask, its grow, feather and invert. From the mask it rebuilds a cell mask on H3's 16-pixel latent grid, gives each pixel frame the cells of its latent frame, and bilinear-upsamples so the cell edges fade instead of stair-stepping. blend adds a separable box blur on top of that (internally half the number you type, in output pixels).
Then it alpha-composites: generated frames on the right side of the ramp, source frames on the left. If the loader's crop to mask was on, it scales the generated crop back into place first. It finishes by printing how much of each frame is genuinely original footage, which is a satisfying line to read.
One useful default: with no clip being edited, it passes frames straight through and says so in the console. It's safe to leave in a graph.
Inputs and outputs
Three inputs matter:
- images - the decoded frames from VAE Decode.
- references - the Media Loader bundle, from the loader itself or the Prompt Builder's
referencesoutput. Must be the same one the Text Encode is fed, or there's no edit spec to read. - blend - extra soft edge in output pixels, default 8. Raise it if you see a hard seam; it's cheap.
max_size caps the output's long edge (0 keeps the source clip's size, after the loader's crop and size cap). The single output, images, goes into Create Video or a save node.
Wire it between VAE Decode and Create Video, exactly there. Not after a frame-interpolating node, not after anything that adds or drops frames - it will raise rather than silently misalign a frame.
Install
Same pack, same install as the rest of it: search Fantastic H3 Prompt Builder in ComfyUI Manager, or:
cd ComfyUI/custom_nodes
git clone https://github.com/Adudeguyman/ComfyUI-Fantastic-MiniMaxH3-PromptBuilder
Restart ComfyUI fully - a browser refresh does nothing. You need ComfyUI 0.30.0 or newer (H3 support landed there), an H3 checkpoint, and the SAM 3.1 checkpoint in models/checkpoints only if you're using the loader's Auto Mask to make the mask. Also check the H3 licence: the open weights are territory-restricted out of the US, EU, UK and Korea. That's a real gate, not a footnote.
Where people get burned
"no clip is being edited; frames passed through" in the console means your references bundle had no edit spec - the loader clip has no mask set, or you wired a different loader's references. Nothing errors; you just get an unedited clip back and a wasted render.
The edit looks too wide. That's the latent grid, not a bug: the mask gets rounded outward to whole 16-pixel cells of the sampling size before anything is pasted, plus grow and feather from the loader's mask panel. Turn on the ▦ regenerated overlay to see the area H3 really touches, and dial grow down there rather than fighting it here.
A visible edge in the result. Raise blend - but first check the mask panel's feather, since the fade built into the mask is doing more work than this node's extra blur.
If the composite fires at all, check the console line in the queue log: it names the clip, the frame count and size, and the percentage that came back untouched.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| images | IMAGE | The decoded frames from VAE Decode. | |
| references | H3_REFS | The Media Loader bundle, from the loader or the Prompt Builder's references output — the same one the Text Encode gets. | |
| blend | INT | 80–64 | Extra soft edge, in output pixels, on top of the one the latent cells give. |
| max_size | INT | 00–8192 | Cap the output's long edge. 0 keeps the source clip's size (after the loader's crop and size cap). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |