# Paint Mask

> Paint a mask by hand over any image, or refine a generated one, and send it to every node that takes a mask. White is edited, black is kept. Free.

Source: https://nodaro.ai/docs/nodes/image/paint-mask

The **Paint Mask** node lets you paint a mask by hand over an image and use it anywhere a mask is accepted. You brush over the area to change, and the node outputs a black-and-white PNG: white is edited, black is kept. The node never runs a model and costs no credits.

- Found in: Image › Edit & Retouch
- Output: image
- API type: `paint-mask`

## When to use it
- Mark an exact area to repaint in [Modify Image](https://nodaro.ai/docs/nodes/image/modify-image), when a text description cannot find it.
- Fix a mask from [Generate Mask](https://nodaro.ai/docs/nodes/image/generate-mask) that is almost right.
- Share one mask between several nodes, for example Modify Image and [Relight & Switch](https://nodaro.ai/docs/nodes/video/relight-and-switch).
- Keep a mask as part of a workflow. The mask is saved with the workflow, its exports and node presets.

## Quick start
### Add the node

Press Tab on the canvas and choose **Image › Edit & Retouch › Paint Mask**.

### Connect the image

Drag from an image node to the **Image** input. This is the picture you paint over.

### Paint the mask

Double-click the node, or click **Paint mask** on it, to open the **Mask editor**. Brush over the area to change, then click **Save mask**. The node shows how much of the image is masked.

### Connect the mask

Drag from the **Mask** output to the **Mask** input of an editing node. Wire the same image into that node's **Image** input.

Workflow: Generate Mask finds the car, Paint Mask refines the mask by hand, and Modify Image repaints only the masked area of the same photo.

- Upload Image → Generate Mask (image)
- Generate Mask → Paint Mask (image + mask seed)
- Paint Mask → Modify Image (mask)

## Inputs
| Input | Accepts | What it does |
| --- | --- | --- |
| **Image** | Image nodes, such as Upload Image, Generate Image and Modify Image | The picture to paint over. The mask is painted at the full resolution of this image. Required to open the editor. |
| **Mask seed** | Mask outputs, such as the Mask output of Generate Mask | Optional. A mask to start from: the editor opens with it, and you add or erase areas. |

The output, **Mask**, is the painted PNG, at the full resolution of the image. White areas are edited and black areas are kept. It is a plain PNG, so it also works anywhere an image is accepted.

## The Mask editor

| Control | What it does |
| --- | --- |
| **Brush** (B) | Paints the area to change. |
| **Erase** (E) | Removes paint: the area is kept. |
| **Shape** (L) | Click points around an area. Click the first point again, or double-click, to close the shape and fill it. |
| **Size** | The brush size, from 4 to 200 px. [ and ] make it smaller and larger. |
| **Hardness** and **Flow** | How soft the brush edge is and how strongly each stroke paints. Soft or light strokes paint gray, which blends the edit into its surroundings. |
| **Select all**, **Invert** and **Clear** | Mark the whole image, swap the marked and kept areas, or remove all paint. |
| **Feather** | Softens the edges of the whole mask. |
| overlay, mask, source | Show the mask over the image, the mask alone, or the image alone. |
| Undo and redo | Ctrl+Z and Ctrl+Y. |

The editor shows the share of the image that will be regenerated, as a percentage. Click **Save mask** to keep your work.

## Settings
| Setting | What it does |
| --- | --- |
| **Default brush** | The **Size** and **Hardness** the brush starts with each time you open the editor. |
| **Label** | The node's name on the canvas. |

On the node itself, **Edit mask** reopens the editor, **Clear mask** removes the mask, and **Download mask** saves the PNG.

## Where the mask goes

Any input that accepts a mask can take it:

- **Modify Image**, on a model that supports masks, such as Ideogram Edit. See [Modify Image](https://nodaro.ai/docs/nodes/image/modify-image#change-one-area-with-a-mask).
- **Relight & Switch**. See [Relight & Switch](https://nodaro.ai/docs/nodes/video/relight-and-switch).

White means "edit" and black means "keep" everywhere in Nodaro, so a mask from Paint Mask and a mask from [Generate Mask](https://nodaro.ai/docs/nodes/image/generate-mask) are interchangeable.

## Good to know

- **A mask fits one image.** The mask is painted at the resolution of the image it covers. If you wire a different image into the editing node, repaint the mask.
- **Saved masks do not follow upstream changes.** When upstream nodes run again, the node keeps the last mask you saved. Check that it still matches the new image.
- **Gray blends.** Soft, gray areas of the mask are blended by the editing node, which is useful for smooth transitions.
- **No credits.** Paint Mask never runs a job, so it never costs credits.

## Frequently asked questions

### Does Paint Mask cost credits?

No. Paint Mask never runs a model. The mask you paint is the node's output, so it is free.

### Which color means "change this"?

White marks the area to edit and black marks the area to keep. Generate Mask and the mask painter in Modify Image use the same rule, so painted and generated masks are interchangeable.

### Can I start from a generated mask?

Yes. Wire the Mask output of Generate Mask into the Mask seed input. The painter opens with the generated mask, and you add or erase areas by hand.

### What happens to my mask when the image changes?

Nothing. The node keeps the last mask you saved, even when upstream nodes run again. A mask only fits the image it was painted on, so repaint it when the image changes.

### Can one mask feed several nodes?

Yes. Wire the Mask output into as many mask inputs as you need. The mask is saved with the workflow, so it survives duplication, export and import.
