ComfyUI Node
TS Studio Inpaint Crop
Crops the masked area with a context band and scales it to the processing budget, so a repaint spends the model's resolution where the mask is instead of on the whole frame. Feed the crop and its mask to any inpainting sampler, then hand the result plus this node's plan to TS Studio Inpaint Restore.
TS Studio Inpaint Crop
- image
- mask
- crop
- crop_mask
- crop_mask_soft
- plan
- source
◄megapixels1.0►
◄context_pct8.0►
◄denoise1.00►
◄snap_px64►
◄feather_pct3.0►
CategoryTS/Studio
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Full source frame. | |
| mask | MASK | Painted mask: white = repaint. | |
| megapixels | FLOAT | 1.00.1–8 | Resolution the crop is actually processed at. Small selections are enlarged toward it (up to 3x) for detail; oversized ones are reduced to it so a big mask in an 8K frame cannot hang the machine. |
| context_pct | FLOAT | 8.00–50 | How much context to take around the mask, as a percent of the mask's own size. More context helps the model match the surroundings; it also enlarges the crop, so less of the budget lands on the mask itself. Values below the 32px colour-analysis ring change nothing. |
| denoise | FLOAT | 1.000–1 | How much of the masked area the sampler will replace. Full replacement leaves the model no pixels to anchor on, so the crop then takes more context and is enlarged less — otherwise it paints a scene of its own inside the mask. |
| snap_px | INT | 648–256 | Side multiple the processed crop is rounded up to. The VAE divides by 8 or 16 and the transformer patches the latent on top of that, so a size off the grid costs an internal pad and a resize on the way back. 64 is the safe general answer; Qwen follows its own encoder on a 56 grid, where 112 also keeps the latent side even. |
| feather_pct | FLOAT | 3.00–25 | Width of the soft edge used when the repaint is pasted back, as a percent of the mask's own size. |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| crop | IMAGE | — |
| crop_mask | MASK | — |
| crop_mask_soft | MASK | The same mask with its soft edge kept. Feed this one when Differential Diffusion patches the model: it turns the ramp into a per-pixel denoise schedule instead of throwing it away. |
| plan | TS_INPAINT_PLAN | Crop geometry and its soft edge — feed to TS Studio Inpaint Restore. |
| source | IMAGE | The frame, passed through. |