stablediffusion icon indicating copy to clipboard operation
stablediffusion copied to clipboard

Negative prompt?

Open tonydavis629 opened this issue 2 years ago • 4 comments

How do we input negative prompts when using the scripts?

tonydavis629 avatar Dec 09 '22 14:12 tonydavis629

I think that's just a parameter?

jamesthesnake avatar Dec 10 '22 00:12 jamesthesnake

It is not. There is only the option for prompt. The negative conditioning in the scripts are filled in with an empty string, telling me that maybe negative prompts are not meant to be used?

tonydavis629 avatar Dec 10 '22 23:12 tonydavis629

https://huggingface.co/stabilityai/stable-diffusion-x4-upscaler it is here I'll go through the code

jamesthesnake avatar Dec 11 '22 00:12 jamesthesnake

The examples here https://stability.ai/blog/stablediffusion2-1-release7-dec-2022, the post about 2.1 ,seem to imply negative prompts are added at the end of the prompt with a ": -2" to specify those prompts being negative. An example that they show is "a portrait of a beautiful blonde woman, fine - art photography, soft portrait shot 8 k, mid length, ultrarealistic uhd faces, unsplash, kodak ultra max 800, 85 mm, intricate, casual pose, centered symmetrical composition, stunning photos, masterpiece, grainy, centered composition : 2 | blender, cropped, lowres, poorly drawn face, out of frame, poorly drawn hands, blurry, bad art, blurred, text, watermark, disfigured, deformed, closed eyes : -2 ". When i tested this on the 2.1 checkpoint I had good results. This is just a guess tho.

EDIT : Read a bit more about negative prompts, mainly from https://github.com/AUTOMATIC1111/stable-diffusion-webui/wiki/Negative-prompt which shows how to add negative prompts, and the summary is that you input them into the unconditional conditioning argument of the sampler sample function. See the link for an easy explanation and example.

mattmdjaga avatar Dec 12 '22 18:12 mattmdjaga