> For the complete documentation index, see [llms.txt](https://fater.gitbook.io/fater-ai-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://fater.gitbook.io/fater-ai-docs/using-editing-and-masking-tools/ai-powered-masking.md).

# AI-Powered Masking

Fater offers a powerful way to **generate mask suggestions using AI based on text descriptions**. Instead of manually drawing complex selections, you can prompt the AI to identify objects or regions, and it will create a new layer representing that selection as a mask. You can then apply this generated mask layer to your main working mask.

***

### How "Prompt to Mask" Works

1. **Your Input:** You provide a text prompt describing the object or region you want to create a mask for (e.g., "the red car," "the sky," "all windows").
2. **AI Processing:**
   * Fater sends your prompt and the current visual context of your **Inpaint Canvas** (specifically, the content within the **Generation Area Bounding Box**) to a specialized AI segmentation model.
   * The AI model analyzes the image and attempts to identify the pixels corresponding to your text description.
3. **New Mask Layer Created:** The AI returns a white on transparent image where white represents the selected area transparent represents the unselected area. Fater takes this image and:
   * Adds it as a **new layer** to your project, often named something like "mask: \[your prompt]".
   * This new mask layer will appear as a thumbnail in the **Generation Task List** (just like other AI generations).
   * The result is **automatically added to your Layers Tab**, set to be invisible by default.
4. **Applying the Generated Mask Layer:** This new layer white surface will be automatically added or subtracted (if you Alt clicked the button) to your current mask.

***

### Using the "Prompt to Mask" Tool

1. **Prepare Your Canvas:** Ensure the image content you want to segment is visible on the canvas and within the Generation Area.
2. **Enter Your Segmentation Prompt:**
   * In the **Floating Prompt Area**, type a concise description of what you want to select.
   * *Examples:* `the main building`, `all trees`, `the product label`.
3. **Initiate Prompt to Mask:**
   * On the **Inpaint Toolbar**, click the **`TextSearch`** icon (🔍).
   * This action signals you want to generate a mask from a prompt. You'll then use the main **Floating Prompt Area** to enter your description.
4. **Refine:** Your main mask is now updated. You can refine it further using manual tools if needed.
5. **Restore**: Using the wand button on the mask layer will restore the mask if needed later.

***

**Tips for Effective AI Mask Generation:**

* **Be Specific but Concise:** Clear, unambiguous prompts work best.
* **Generation Area Matters:** The AI only analyzes the content within the current Generation Area Bounding Box.
* **Use as a Starting Point:** AI-generated masks are powerful starting points. You can often get complex selections quickly and then refine them manually.
* **Combine with Manual Tools:** Don't hesitate to add to or subtract from an AI-generated mask (once applied to the main mask) using the Brush, Lasso, or Rectangle tools.
* **Re-use Mask Layers:** Since the AI generates an actual layer, you can keep these "mask layers" in your project (perhaps in a separate Layer Workspace) and re-apply them later if needed.

This AI-powered mask generation creates a flexible workflow, providing intelligent selections as image layers that you can then integrate into your main mask.
