# Inpaint

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FvRr8oApGexcmmnPzc8il%2FStart%20Frame%20(6).mp4?alt=media&token=6636f15c-4270-424b-a7a3-b6a1668979d5>" %}

**Introducing Wan2.1’s Video Inpainting Feature!**

Effortlessly swap or remove objects in videos with Wan2.1’s powerful inpainting feature. Perfect for edits, corrections, or creative enhancements, it delivers seamless results. Transform your videos with precision—no complex tools needed.

**Steps** &#x20;

1. Upload a source video

<figure><img src="/files/iznpKk8BJfA3jfch7HZz" alt="" width="375"><figcaption></figcaption></figure>

2. Select the object you want to replace or remove. For best results, refine the mask by adding more points to key areas—such as the arms, legs, body, and head—ensuring consistent tracking throughout the entire video.

<figure><img src="/files/6zKtsNV1ejdHbjUBy070" alt="" width="375"><figcaption></figcaption></figure>

3. Select Free mode or Control mode. Free mode will ignore the control type. You can see the example above for the different output.&#x20;

<figure><img src="/files/52I5gf84oehMhdyD5b7R" alt="" width="375"><figcaption></figcaption></figure>

3. Input the prompt to describe the inpainted video
4. (Optional) Add a reference Image. In the above example, we use this reference image.&#x20;

<figure><img src="/files/0c6o2Efy5ffmbX9FigoA" alt=""><figcaption></figcaption></figure>

5. (Optional) Add a key frames. You can add a start frame or end frame to further control the style and structure of the final output video. It is useful especially for removing object.&#x20;

Below is result without using the reference image and start frame.

{% embed url="<https://files.gitbook.com/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2Fiul521v1FP2FiqerVcig%2FStart%20Frame%20(7).mp4?alt=media&token=a7f264f5-c630-4061-bb92-2eaf8fcf1e8c>" %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.dreamerland.ai/video/wan2.1-video/inpaint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
