---
title: Masking
slug: masking
createdAt: 2026-06-15T05:34:44.722Z
---

:::hint{type="success"}
Masking lets you define specific areas of an image for a workflow to affect, so you can edit, regenerate, or remove just the regions you choose instead of changing the whole image. It powers inpainting, object removal, background replacement, and other targeted edits.
:::

## Overview

Instead of applying changes to an entire image, masking lets you select only the regions you want to edit, regenerate, or remove. Masks are commonly used for inpainting, object removal, background replacement, and other targeted image-editing workflows.

## Example Workflows for Face Swap

:::CtaButton{label="Qwen Image Edit 2509: Face Swap" externalHref="https://www.floyo.ai/workflows/qwen-image-edit-2509-face-swap-fz2gjzbu2cwh" openInNewTab="true"}

:::

## Using the Mask Editor

To create a mask:

### Step 1: Open the Workflow&#x20;

Upload or select an image in your workflow.

Right-click the image input and select **Open Mask Editor**.

![](https://api.archbee.com/api/optimize/1hT0XoAHMhU4co8ZZjygd/3lTrG0ME5-fRQi8dVmFL1_image.png)

### Step 2: Create Your Mask

Once the Mask Editor opens, use the brush tool to paint over the areas you want to modify.

The painted area represents the portion of the image that will be affected by the workflow.

You can continue painting and adjusting the mask until the desired area is selected.

![](https://api.archbee.com/api/optimize/1hT0XoAHMhU4co8ZZjygd/FW_R290iYIfs8Mt1ke7j0_image.png)

### Step 3: Save the Mask

After creating your mask, click **Save**.

The mask will be attached to the image and passed to any workflow nodes that support masking.

![](https://api.archbee.com/api/optimize/1hT0XoAHMhU4co8ZZjygd/l3TTQnk0fcOSGkOb1hyAb_image.png)

These workflow demonstrates how masks can be used to control which parts of an image are edited while preserving the surrounding content.

### Step 4: Run the Workflow

Click the Play button in the bottom toolbar to start processing.

Once the workflow completes, the generated image will be available in the outputs folder.

:::hint{type="success"}
**KEY CONCEPT: The** **painted area is the part that gets changed.&#x20;**&#x45;verything you leave unpainted is preserved. Keep this in mind so you mask the region you actually want the workflow to edit.
:::

## Common Use Cases

### Inpainting

Inpainting uses a mask to regenerate or replace content within a selected area of an image. This is commonly used to remove unwanted objects, replace specific elements, fix imperfections, or make localized edits while preserving the rest of the image.

**Recommendation for workflows:&#x20;**

::::WorkflowBlock
:::WorkflowBlockItem
[FloYo: Flux Kontext Inpainting](https://www.floyo.ai/workflows/flux-kontext-inpainting-qjlg59hoii7d)
:::

:::WorkflowBlockItem
[FloYo: Flux Kontext Inpainting](https://www.floyo.ai/workflows/flux-kontext-inpainting-qjlg59hoii7d)
:::

:::WorkflowBlockItem
[FloYo: Flux Inpaint - ULTIMATE workflow](https://www.floyo.ai/workflows/flux-inpaint-ultimate-workflow--tla7icaj1shn)
:::

:::WorkflowBlockItem
[FloYo: Inpainting with reference image](https://www.floyo.ai/workflows/inpainting-with-reference-image-xj4va4x1tw3x)
:::

:::WorkflowBlockItem
[FloYo: Image Inpainting with LoRA](https://www.floyo.ai/workflows/image-inpainting-with-lora-icijjtcrf11u)
:::

:::WorkflowBlockItem
[Flux 2 Klein 9B — Image Inpainting](https://www.floyo.ai/workflows/image-inpainting-with-lora-icijjtcrf11u)
:::
::::

For more info. you can also visit our use-case page - :InlineCtaButton[]{label="Inpainting" docId docAnchorId externalHref="https://www.floyo.ai/use-cases/image-editing-and-enhancement/inpainting" openInNewTab="true" noFollow="false"}

### Outpainting

Outpainting extends an image beyond its original boundaries. By defining the areas that should be generated, you can expand backgrounds, create wider compositions, or add additional scene content while maintaining consistency with the original image.

**Recommendation for workflows:&#x20;**

::::WorkflowBlock
:::WorkflowBlockItem
[FloYo: Wan2.1 and VACE for Video to Video Outpainting](https://www.floyo.ai/workflows/wan2-1-and-vace-for-video-to-video-o-zi8z2a3ttjhy)
:::

:::WorkflowBlockItem
[FloYo: Flux Fill Dev Image Outpainting](https://www.floyo.ai/workflows/flux-fill-dev-image-outpainting-4cshlu0gnbt7)
:::

:::WorkflowBlockItem
[FloYo: FLUX.2 Klein 4B for Image Outpainting](https://www.floyo.ai/workflows/flux-2-klein-4b-for-image-outpaintin-9kg88ecsdrj1)
:::
::::

For more info. you can also visit our use-case page - :InlineCtaButton[]{label="Outpainting" docId docAnchorId externalHref="https://www.floyo.ai/use-cases/image-editing-and-enhancement/outpainting" openInNewTab="true" noFollow="false"}

### Background Replacement

Masks can be used to isolate a subject from its surroundings, allowing you to replace the background with a completely new scene. This is useful for product photography, portraits, marketing assets, and creative image generation.

**Recommendation for workflows:&#x20;**

::::WorkflowBlock
:::WorkflowBlockItem
[FloYo: Vertical Video Background & Scene Rebuild](https://www.floyo.ai/workflows/vertical-video-background-scene-rebu-2ihieoidcil8)
:::
::::

## Tips

- Paint slightly beyond the edges of the object for smoother results.
- Use a smaller brush size when working on detailed areas.
- Review your mask before saving to ensure only the intended regions are selected.
- Complex edits often produce better results with clean and accurate masks.
