# AICleanPlate

> Removes the masked object (Mask = AIRoto / Roto / any alpha).

Removes the masked object (Mask = AIRoto / Roto / any alpha). Process fills each masked pixel with the real background from the nearest frame where it is visible (optical flow, or exact pixels on a locked-off plate); optional stage 2 (Wan 2.1 VACE, Apache-2.0) generates only what no frame ever shows. Camera: auto, moving camera, locked-off or surface (markers). Layer cleanplate: r hole, g filled from frames, b generated, a confidence. Stage 2 model Auto picks the commercial model that fits the free GPU memory. It can also use MiniMax-Remover (research pack, non-commercial use only: accept its licence in the panel first); Stage 2 Fills = whole hole lets the model repaint the whole masked area.

| Node | AICleanPlate |
|---|---|
| Menu | AI › AICleanPlate |
| **Names in each format** | |
| .oink comp (JSON) | `"type": "OC_N_aicleanplate"` |
| .nk script | none: written as an Oink node |
| Python | `nuke.createNode("OC_N_aicleanplate")` |
| Assistant (MCP) | `create_node(type="AICleanPlate")` |
| Tab search | `aicleanplate`, or its initials `aicp` |

![AICleanPlate properties](/shots/nodes/aicleanplate@2x.webp)

## Inputs and outputs

| Port | Name | Type |
|---|---|---|
| input 0 | Plate | image |
| input 1 | Mask | image |
| output 0 | Image | image |

## Knobs

Panel tab **Aicleanplate**, in panel order.

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `mask_channel` | mask channel | menu | `alpha` | alpha, red, luminance |  |  |
| `dilate` | dilate | float | `4` | 0 to 200 |  | Pixels added around the mask (edges, motion blur, shadow) |
| `feather` | feather | float | `4` | 0 to 200 |  |  |
| `threshold` | mask threshold | float | `0.02` | 0 to 1 |  |  |
| `mode` | camera | menu | `auto` | auto, flow (moving camera), static (locked-off), surface (surface (markers)) |  |  |
| `window` | propagation window | float | `20` | 1 to 500 (integer) |  | Frames searched each way for clean background |
| `blend` | blend | menu | `nearest` | nearest (nearest frame), average |  |  |
| `stage2` | generate unseen (stage 2) | bool | `false` |  |  | Wan 2.1 VACE fills pixels no frame ever shows |
| `model` | model | menu | `AUTO` | AUTO (Auto (commercial model that fits)), wan2.1-vace-1.3b (Wan 2.1 VACE 1.3B), minimax-remover (MiniMax-Remover (research pack, non-commercial)) |  |  |
| `stage2_fill` | stage 2 fills | menu | `unseen` | unseen (unseen only), all (whole hole) |  |  |
| `prompt` | prompt | text |  |  |  | Optional: what the background is (empty = generic clean plate) |
| `seed` | seed | float | `42` | 0 to 2147483647 (integer) |  |  |
| `steps` | steps | float | `25` | 4 to 100 (integer) |  |  |
| `chunk` | chunk frames | float | `33` | 5 to 81 (integer) |  | Frames the model sees at once (4n+1); chunks overlap and crossfade |
| `overlap` | overlap | float | `8` | 0 to 40 (integer) |  |  |
| `regrain` | regrain | bool | `true` |  |  | Add grain matched to the plate to generated pixels |
| `output` | output | menu | `clean` | clean (clean plate), stage1 (stage 1 only), holes |  |  |
| `check_input` | check input | bool | `true` |  |  | Only use results made from exactly this plate + mask |

### Other knobs (Python, .nk and the assistant; not on the panel)

| Knob | Label | Type | Default | Range / values | .nk knob | Description |
|---|---|---|---|---|---|---|
| `gl_color` | Viewer Controls Color | float ×3 | `0, 0, 0` | 0 to 1 |  |  |
| `postage_stamp_frame` | Static Frame | int | `1` | -2147483648 to 2147483647 |  |  |
| `lifetimeStart` | Lifetime Start | int | `0` | -2147483648 to 2147483647 |  |  |
| `lifetimeEnd` | Lifetime End | int | `100` | -2147483648 to 2147483647 |  |  |
| `useLifetime` | Use Lifetime | boolean | `false` |  |  |  |
| `cached` | Cached | boolean | `false` |  |  |  |
| `bookmark` | Bookmark | boolean | `false` |  |  |  |
| `dope_sheet` | Dope Sheet | boolean | `false` |  |  |  |
| `clone_group` | Clone Group | string |  |  |  |  |
| `link_source` | Link Source | string |  |  |  |  |
| `link_overrides` | Link Overrides | string |  |  |  |  |
| `split_views` | Split Views | string |  |  |  |  |
| `generation` | Generation | int | `0` | -2147483648 to 2147483647 |  |  |
| `processed_first` | Processed First | int | `0` | -2147483648 to 2147483647 |  |  |
| `processed_last` | Processed Last | int | `-1` | -2147483648 to 2147483647 |  |  |


---
Sources: opencomp_core/nodes/ai/aicleanplate.py, opencomp_electron/src/components/properties/knobSchema.ts, opencomp_core/nodes/help/aicleanplate.md
