> 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/video/wan2.1-video/inpaint.md).

# 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="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FUVWv9r1NTBW0Ck05lheO%2FScreenshot_20250508_005501.jpg?alt=media&amp;token=28681ea8-69f7-4928-9c38-e4bde5b640a4" 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="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2Fra4SFFN0avoeQ6LcxNnk%2FScreenshot_20250508_010728.jpg?alt=media&amp;token=b0ca843e-63bb-469d-8055-75d5f4bb7a8c" 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="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FmBCXmkCy4J0KfvWLcVgY%2FScreenshot_20250508_011743.jpg?alt=media&amp;token=2e3edd1f-597b-46b1-8ce7-ac52552e6ac5" 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="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2F6jqpFg7vrfPlSoP7fvqr%2FStart%20Frame.jpg?alt=media&amp;token=6384e255-9f3f-4098-8e44-fc20ac5f489f" 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>" %}
