From 2cac0472ad0d957c74be6e28fa1541c39981c310 Mon Sep 17 00:00:00 2001 From: AUTOMATIC1111 <16777216c@gmail.com> Date: Thu, 29 Sep 2022 16:10:08 +0300 Subject: [PATCH] Updated Negative prompt (markdown) --- Negative-prompt.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Negative-prompt.md b/Negative-prompt.md index 534adf0..13cc6f1 100644 --- a/Negative-prompt.md +++ b/Negative-prompt.md @@ -2,7 +2,7 @@ Negative prompt is a way to use the Stable Diffusion in a way that allows the us The way negative prompt works is by using user-specified text instead of empty string for `unconditional_conditioning` when doing sampling. -Here's (simplified) code from [txt2img.py](https://github.com/CompVis/stable-diffusion/blob/main/scripts/txt2img.py): +Here's the (simplified) code from [txt2img.py](https://github.com/CompVis/stable-diffusion/blob/main/scripts/txt2img.py): ```python # prompts = ["a castle in a forest"] @@ -14,7 +14,7 @@ uc = model.get_learned_conditioning(batch_size * [""]) samples_ddim, _ = sampler.sample(conditioning=c, unconditional_conditioning=uc, [...]) ``` -This launches sampler that repeatedly: +This launches the sampler that repeatedly: - de-noises the picture guiding it to look more like your prompt (conditioning) - de-noises the picture guiding it to look more like an empty prompt (unconditional_conditioning) - looks at difference between those and uses it to produce a set of changes for the noisy picture (different samplers do that part differently)