Composite Frames
Image Composite Masked, minus the 13 GB it wants for a 121-frame shot
- destination
- source
- mask
- image
The paste-back, at video scale
Every "put the generated thing back into the real thing" workflow ends the same way: the new pixels go inside the mask, the original pixels stay outside it, and you composite the two. On a still, that's Image Composite Masked and you never think about it again. On a 121-frame shot at 1920×1088, core's version works on the whole batch at once and, at its peak, holds four copies of the shot and two copies of its mask - 13.2 GB before the node has done anything useful. That's where the OOM comes from.
Composite Frames is the same operation with the memory fixed. It's part of Paint a plate, AInVFX's paint-on-the-first-frame VFX tool that took comfy.org's Open Source Higgsfield contest in November 2026 - the plate stays exactly as shot, one edit gets painted on frame one, an IC-LoRA extends it through the clip, and the matte decides how much of the regenerated layer survives. This node is that last decision. It's one of sixteen nodes in the pack, and it's the one you'd steal for your own graphs.
How it works
The arithmetic is honestly boring, which is the point. For each frame it computes mask * source + (1 - mask) * destination, in float32 - the exact expression core's composite uses, so the pictures match. What changes is the loop. It walks the batch one frame at a time, resizes that single frame's destination, source and mask to the target size with a bilinear filter, composites, drops it into a preallocated output, and ticks a progress bar. One frame in memory instead of six copies of the shot. The finished batch is handed over once, on ComfyUI's intermediate device and dtype.
Two behaviours are worth knowing because they're inherited, not accidents. A shorter source or mask repeats: frame i reads source frame i % source_count, which is how core behaves too. And the sizing is bilinear only - no Lanczos, no crop options. That's deliberate; this node is the cheap final paste, not the resampler.
If you want the editorial version: this is the rule in every good inpainting tutorial - composite the result instead of letting the untouched pixels round-trip the VAE - applied to video, where ignoring it costs you gigabytes rather than a little softness.
The five fields
- destination - the frames around the mask, any size. In Paint a plate's own graphs this is the plate.
- source - the frames inside the mask. The regenerated layer.
- mask - 1 keeps the source, 0 keeps the destination. Any size, resized to the output.
- width / height - the size of the result, defaults 1920×1088, up to 8192 a side.
The output is a single image batch. Wire it into Save Image, an encoder, or the next stage. That's the whole node - no hidden options, nothing to tune.
Install
cd ComfyUI/custom_nodes
git clone https://github.com/AInVFX/ainvfx-paintaplate
python -m pip install -r ainvfx-paintaplate/requirements.txt
Or search Paint a plate in ComfyUI Manager and install AInVFX Paint a plate. Restart ComfyUI, and the node sits under AInVFX/Paint a plate.
Here's the good news for anyone scared off by the pack's requirements: it lists OpenEXR and opencolorio. That's it. The 79 GB of FLUX 3 / LTX 2.5 / SAM 3.1 weights are for the full Paint a plate app, and you need none of them to use this node in a graph of your own.
Where people get burned
Width and height don't follow your inputs. They're fixed values, not linked to anything. Leave the default on a 4K plate and you will silently downscale your entire shot on the last node of the graph, after every expensive step has already run. Set them to the plate's real size - 1920×1088 in the pack's own workflows at its tested resolution.
Bilinear softens. If your source was generated at half size and you're compositing back at full, this node's upscale is the cheap filter. That's why the pack's graphs put a Lanczos step upstream and let this node do nothing but the blend. Copy that order and you get the quality; copy it in reverse and you get a soft layer you can't fix later.
Repeating inputs hide truncation. A one-frame source is genuinely useful as a stub - it paints the same thing on every frame. It also means a source that unexpectedly came back with 30 frames instead of 121 will quietly repeat instead of raising, and you find out at export.
Mask range. A mask saved as 0/255 instead of 0/1 reads as "all source everywhere". If the composite comes back as 100% the new layer, check the mask's values before you blame the node.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| destination | IMAGE | The frames around the mask, any size. | |
| source | IMAGE | The frames inside the mask, any size. | |
| mask | MASK | Where the source goes, any size: 1 is the source, 0 the destination. | |
| width | INT | 192016–8192 | Width of the result. |
| height | INT | 108816–8192 | Height of the result. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |