# ControlNet

{% hint style="info" %}

* The HED model has been superseded by the Soft Edge model. \
  Soft Edge is the better option, and HED is on the list for legacy only.
* Tested to be fully compatible with graphics cards that have 6GB VRAM and up.&#x20;
* Not currently compatible with Inpaint/Outpaint&#x20;
* Not compatible with Remove Background when used on the same Gen<br>
* **Inpaint, Tile, and Shuffle models aren't working in Artroom yet.**
  {% endhint %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FxbBTP1qEssZemk3u8vC4%2Fthe_line.png?alt=media&#x26;token=1bf137fe-5b91-486d-bb1b-affd4e3d193c" alt=""><figcaption></figcaption></figure>

## What is ControlNet?

ControlNet is a method for copying the features of an image, much more accurately than a regular image to image process. First the ControlNet model makes a 'preprocessed image' of a starting image, and uses that to guide your regular model Each ControlNet model has its own style for preprocessing. It will take some practice and experimentation to find the right one.

Below are some examples of each model, what the preprocessor does, and several output images.\
Just note that these are just some good examples of what it can do, and may not always be perfect.

These five work well with just about any image you use with them, with no special requirements for using.

{% tabs %}
{% tab title="Depth" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FxKnnv1K5haDyFP2abjtj%2Fdepth%20v11.png?alt=media&#x26;token=d2d2d567-627e-4baf-9eee-bc23e7c5c5d0" alt=""><figcaption></figcaption></figure>

Attempts to predict the distance of objects from the viewer. Good for getting the general shape of an image, without copying specific details.
{% endtab %}

{% tab title="Normal" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FRPQIttLTJqE3zVnFRaVU%2Fnormal%20v11.png?alt=media&#x26;token=254b9783-ca34-4147-877e-b91e5416a892" alt=""><figcaption></figcaption></figure>

This model attempts to figure out what way a subject is facing. Like Depth, it creates a general shape without copying details.
{% endtab %}

{% tab title="Pose" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FCCpB6OkGLgDKZNl3QZES%2Fpose%20v11.png?alt=media&#x26;token=c1eaa749-4364-48ac-aff3-747a02c88b67" alt=""><figcaption></figcaption></figure>

Creates a wire-frame of the subject in an image. Copies the exact pose without any other details from the original image.\
Now with better face and hands.&#x20;
{% endtab %}

{% tab title="Soft Edge" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FSWIMcrNQkkZg28VMJ3FS%2Fsoftedge%20v11.png?alt=media&#x26;token=739a8cbe-879c-4b66-871c-e8bc1cc0b03c" alt=""><figcaption><p> </p></figcaption></figure>

Traces an outline of the image. Similar to canny, but is less strict when copying the smaller details.
{% endtab %}

{% tab title="Canny" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FLNsHq89KDO2uBkALeIzM%2Fcanny%20v11.png?alt=media&#x26;token=9dc4a4d9-fae2-4ea5-a7de-d07bafba6719" alt=""><figcaption></figcaption></figure>

The most commonly used ControlNet model. Creates a fine line to trace an image. Good for copying the subject in an image very accurately.
{% endtab %}
{% endtabs %}

These next five are a bit more specific on how they want to be used, and will be explained in each tab.

{% tabs %}
{% tab title="MLSD" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FTtAiQ7TckDo8F2utAJvg%2Fmlsd%20v11.png?alt=media&#x26;token=5377c7ec-4002-44af-bb16-e10488cb9447" alt=""><figcaption></figcaption></figure>

Used to copy the general shape of the scenery. Does not pick up on subjects very well.
{% endtab %}

{% tab title="Lineart" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FJd1QM6vo3NIakDxkltP8%2Flineart%20v11.png?alt=media&#x26;token=26023e03-0d17-46e2-88c4-4512a20413e7" alt=""><figcaption></figcaption></figure>

Used with lineart/monochrome images, adding color and details to them. \
Doesn't work well with regular colored images.\
Can sometimes work better with inverted colors if the outline is too strong.
{% endtab %}

{% tab title="Lineart Anime" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2Ff3NxYVJgDhhBlntYuhkj%2Flineartanime%20v11.png?alt=media&#x26;token=698863bf-df81-402a-b3e7-b81d828101de" alt=""><figcaption></figcaption></figure>

Used with lineart/monochrome images, adding color and details to them. \
Doesn't usually work well with regular colored images or non anime models.\
Can sometimes work better with inverted colors if the outline is too strong.
{% endtab %}

{% tab title="Scribble" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FcidwQkY5a4vaLj2kJ9xz%2Fscribble%20v11.png?alt=media&#x26;token=4b5ed027-7d22-498c-b0c1-0128cc0c73c5" alt=""><figcaption></figcaption></figure>

Takes a crude drawing made in msPaint and roughly follows it. This model has more freedom to deviate from the base image than others, and can lead to some interesting results.
{% endtab %}

{% tab title="Instruct Pix2Pix " %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2Fuw3Ox93obStYVnkDNUac%2Fip2p%20v11.png?alt=media&#x26;token=812c82a9-2c0b-4b21-bced-6ee6ac19a58d" alt=""><figcaption><p>The listed prompts are the only prompts used on that image</p></figcaption></figure>

This model s meant to take the base image and, using plain English, change specific details of it. Like, "make her hair blue" or "change the season to winter"\
As simple as it sounds, this can be one of the more difficult models to get working right.\
Inpaint may be a better option for more controlled changes. [the-paint-tab](https://artroomai.gitbook.io/tutorials/resources/extra-features-tutorials/the-paint-tab "mention")
{% endtab %}
{% endtabs %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FxbBTP1qEssZemk3u8vC4%2Fthe_line.png?alt=media&#x26;token=1bf137fe-5b91-486d-bb1b-affd4e3d193c" alt=""><figcaption></figcaption></figure>

These last ones are the old version 1.0 ControlNet models. Leaving them here as a reference.

{% tabs %}
{% tab title="Canny" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2F0onj5cuvpn8HuCUwEAH9%2F001Canny%20Layout.jpg?alt=media&#x26;token=7a150008-5a0e-43d3-9d71-e7ac0a8a79d9" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Pose" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FV6xDCLlrI2XCRpRvl5Qv%2F002Pose%20Layout.jpg?alt=media&#x26;token=ac02cb1e-62f9-460e-a725-815efc847d45" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Depth" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FzP2PHY0x9fxo7uzoWZzY%2F003Depth%20Layout.jpg?alt=media&#x26;token=19d3d198-cd1f-4659-8b33-c69b51f208b8" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="HED" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FwFQF5wcom7olMVkjuY8d%2FHED%20v10-1.png?alt=media&#x26;token=ee3a8a65-a33d-446b-bf88-e960fb65f38e" alt=""><figcaption><p>This was replaced by Soft Edge</p></figcaption></figure>
{% endtab %}

{% tab title="Normal" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FpXjtrEP2NWzy5p8g3XNx%2F005Normal%20Layout.jpg?alt=media&#x26;token=18e13d13-135a-4942-a8fb-957d433229ae" alt=""><figcaption></figcaption></figure>
{% endtab %}

{% tab title="Scribble" %}

<figure><img src="https://1638460590-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FsrvmkNlt2cT7tVvQkddJ%2Fuploads%2FSzNw6As8qg4Dht5gnq6P%2F006Scribble%20Layout.jpg?alt=media&#x26;token=8b6df2f8-4a73-4f2a-8ad8-a81f595fbd4a" alt=""><figcaption></figcaption></figure>
{% endtab %}
{% endtabs %}

{% content-ref url="broken-reference" %}
[Broken link](https://artroomai.gitbook.io/tutorials/resources/extra-features-tutorials/broken-reference)
{% endcontent-ref %}

{% content-ref url="controlnet/using-controlnet" %}
[using-controlnet](https://artroomai.gitbook.io/tutorials/resources/extra-features-tutorials/controlnet/using-controlnet)
{% endcontent-ref %}

{% content-ref url="controlnet/pose-kits-and-saved-preprocessed-images" %}
[pose-kits-and-saved-preprocessed-images](https://artroomai.gitbook.io/tutorials/resources/extra-features-tutorials/controlnet/pose-kits-and-saved-preprocessed-images)
{% endcontent-ref %}
