Add extra noise

catboxanon 2023-08-15 16:05:45 -04:00
parent 051070fb23
commit 3879c0f1a0

@ -769,3 +769,13 @@ A more detailed explanation:
CLIP is a very advanced neural network that transforms your prompt text into a numerical representation. Neural networks work very well with this numerical representation and that's why devs of SD chose CLIP as one of 3 models involved in stable diffusion's method of producing images. As CLIP is a neural network, it means that it has a lot of layers. Your prompt is digitized in a simple way, and then fed through layers. You get numerical representation of the prompt after the 1st layer, you feed that into the second layer, you feed the result of that into third, etc, until you get to the last layer, and that's the output of CLIP that is used in stable diffusion. This is the slider value of 1. But you can stop early, and use the output of the next to last layer - that's slider value of 2. The earlier you stop, the less layers of neural network have worked on the prompt.
Some models were trained with this kind of tweak, so setting this value helps produce better results on those models.
## Extra noise
Adds additional noise from the latent representation of the input image, determined by the setting, defaulting to `0`. Implemented in [#12564](https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/12564), available in settings under `img2img` -> `Extra noise multiplier for img2img and hires fix`. As noted in the UI, it should always be lower than the denoising strength used to yield the best results.
One purpose for this tweak is to add back additional detail into hires fix. It is somewhat of a cross between GAN upscaling and latent upscaling.
The below example is of a 512x512 image with hires fix applied, using a GAN upscaler (4x-UltraSharp), at a denoising strength of 0.45. The image on the right utilizes this extra noise tweak.
Extra noise = 0 | Extra noise = 0.2
:-------------------------:|:-------------------------:
![without](https://user-images.githubusercontent.com/122327233/260556373-9257aa18-dfc8-49f6-9984-a0a1f430c029.png) | ![with](https://user-images.githubusercontent.com/122327233/260556387-0c6df12c-7412-43d5-84d2-2a69ad6152c4.png)