> 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/regional_prompt/regional-prompt-with-reference-image.md).

# Regional Prompt with Reference Image

Control the image composition with control layer

You may want to have more control while using a regional prompt. Here, we bring you a demonstration of using a reference image to draw a color map and using the reference image in the control layer.

<mark style="background-color:orange;">**How does it work?**</mark>

In this example, we want to generate an image of a woman with half white hair and half black hair.

First, open the color map drawing canvas. Click the "Background" button to select a reference image.

<figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FBwws9fUm5HryFSTfNN7l%2FIMG_7740.jpg?alt=media&amp;token=604c98cb-4b82-4f05-b073-d1a99d1be760" alt="" width="375"><figcaption></figcaption></figure>

Now, let's draw a color map on the reference image. We want the woman to have half white hair on the left and half black hair on the right. We'll use the color <mark style="color:red;">red</mark> for the left part of her hair and <mark style="color:yellow;">yellow</mark> for the right part.

<figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FtFcWF31kU0UQrHJeNBQh%2FIMG_7741.jpg?alt=media&amp;token=23f5a0b5-1451-4759-b04b-a8ce4a15b514" alt="" width="375"><figcaption></figcaption></figure>

Here is a final color map we have. Next step is to write prompts for each area.&#x20;

<div align="left"><figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FD2rPm45MdNkSegKwUYUS%2FIMG_7742.jpg?alt=media&amp;token=231884da-84aa-4087-b883-064b875b9fcd" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FN0Ewsbi6dl0LZTweMbVs%2FIMG_7747.jpg?alt=media&amp;token=f60dc780-d1bb-4fa5-a580-f1d54c786357" alt="" width="375"><figcaption></figcaption></figure></div>

Don't forget to add a control layer with the reference image. We used a depth control here.

<figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2Fyj6MAvJwFotncUnxODIZ%2FIMG_7743.jpg?alt=media&amp;token=ff29af75-f9cb-48d8-ac04-11675d72ece6" alt="" width="375"><figcaption></figcaption></figure>

Okay, now we can click a button to generate images! Below are the resulting images of this configuration in both the realistic model and anime model.

<figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FkTRAiCeXzVilnJKlqp7B%2FIMG_7745.JPG?alt=media&amp;token=2d3413f0-a827-4380-a101-a22180b7aea7" alt=""><figcaption><p>Dreamer photoreal V2 model</p></figcaption></figure>

<figure><img src="https://2310956826-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2Ftbrc6W2n35oVxftMovDQ%2Fuploads%2FgKRRejRMGBjk4zQmWRcV%2FIMG_7746.JPG?alt=media&amp;token=98b410be-2e95-4dd9-bcf7-74fd2855a120" alt=""><figcaption><p>Anime Diffusion V2 model</p></figcaption></figure>
