# Offset Noise

{% hint style="info" %}
[**dreamlook.ai**](https://dreamlook.ai/) **lets you finetune Stable Diffusion models in minutes (first SD1.5 run is free!).** Follow the guide below to train models with Offset Noise enabled.
{% endhint %}

## What is Offset Noise?

Using Offset Noise during training improves the contrast in images created by the model. The improvement is especially visible in images with very dark or very bright lighting conditions.

**Output of models trained without Offset Noise (left) vs with Offset Noise (right):**

<figure><img src="https://3775798052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbjzMS9bi5lfz4h6oo4EA%2Fuploads%2FkGjUgACrvVDtFUTiH48W%2Fxy_grid-0030-2650451456-dramatic%20photographic%20portrait%20of%20a%20techwear%20handsome%20ukj%20person%2C%20on%20the%20rooftop%20of%20a%20futuristic%20city%20at%20night%2C%20sigma%2085mm%20f_1.4%20copy.png?alt=media&#x26;token=a00b4e61-2d96-4946-af8a-3d6fd079cb9d" alt="Models trained with offset noise are able to create very dark or very bright images"><figcaption><p>Left: without Offset Noise. Right: with Offset Noise</p></figcaption></figure>

Without Offset Noise, Stable Diffusion models struggle to create images that are very dark of very bright. The results always include bright areas even if the prompt describes dimly lit scenes. This is due to limitations in the training procedure that is normally used, which Offset Noise fixes.

The images showcased above come from models that were trained from the same base model (`stable-diffusion-v1-5`), using the same training parameters and images (1200 steps, LR 1e-6, 16 images) except for the Offset Noise scale. The images were generated using the exact same parameters including seed:

```
Prompt: dramatic photographic portrait of a techwear handsome ukj person, on the rooftop of a futuristic city at night, sigma 85mm f/1.4, 4k, depth of field, high resolution, 4k, 8k, hd, full color
Negative prompt: lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality, text, signature, watermark, username, blurry
Steps: 30, Sampler: Euler a, CFG scale: 10, Seed: 2650451456, Size: 600x1000, Model hash: 9714774f, Denoising strength: 0.7, First pass size: 0x0
```

A word of caution: while Offset Noise allows the trained model to produce better images in dark and bright conditions, it will also have a noticeable impact on model outputs in other situations. You may need to adjust your prompts to address this. This is why we don't enable it by default.

## How to use Offset Noise on [dreamlook.ai](https://dreamlook.ai/)?

#### Using the [dreamlook.ai](https://dreamlook.ai/) website

Head to the Training page: <https://dreamlook.ai/dreambooth>

The parameter can be enabled by checking the "Offset Noise" checkbox under "Advanced settings"

<figure><img src="https://3775798052-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FbjzMS9bi5lfz4h6oo4EA%2Fuploads%2Fsdo7GvqJNexNVAdKAVcG%2FScreenshot%202023-07-25%20at%2018.12.45.png?alt=media&#x26;token=9434f737-6a79-41e3-997d-63789aaebadd" alt="" width="375"><figcaption></figcaption></figure>

**🔗** [**How to train models using the website**](https://docs.dreamlook.ai/train-models/using-the-website)

#### Using the API

When using the API, Offset Noise can be enabled using the boolean parameter `enable_offset_noise`. This value is `false` by default, meaning that Offset Noise is not used if you don't specify it explicitly.

**🔗** [**How to train models using the API**](https://docs.dreamlook.ai/train-models/using-the-api)

## How does Offset Noise work?

The idea of Offset Noise was first introduced in a post by Nicholas Guttenberg from Cross Labs: <https://www.crosslabs.org/blog/diffusion-with-offset-noise>

The YouTube channel **koiboi** features a good explainer video:

{% embed url="<https://www.youtube.com/watch?v=cVxQmbf3q7Q>" %}
