> For the complete documentation index, see [llms.txt](https://docs.dreamerland.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.dreamerland.ai/image/qwen-image-edit/edit-with-mask.md).

# Edit with mask

To edit a specific area of an image while keeping the rest untouched, you can use a mask. By drawing over the target area, you define exactly where the AI should apply changes and where it should remain unchanged.

When an image contains multiple subjects, such as a group of people, editing just one via text prompts alone can be challenging, as the AI may inadvertently alter others. By using a mask, you provide the AI with precise spatial guidance, ensuring the modifications are restricted only to your selected subject.

<figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FmLKaXOzRbiMamGHI1WGi%2FScreenshot_20251229_030051.jpg?alt=media&amp;token=c14a6a32-37f1-46d9-8b51-a48fa52ffd1f" alt="" width="375"><figcaption></figcaption></figure>

The result is as below:

<figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2F498oGu0F2GPxqM8Dk8Yi%2FJbYWj8u7Lzj8vCDivMl8_0.png?alt=media&amp;token=24b29926-8223-4453-91e6-f43ccc581f91" alt=""><figcaption></figcaption></figure>
