> For the complete documentation index, see [llms.txt](https://cranford-tech.gitbook.io/replicate-ai-and-ml-models-plugin/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://cranford-tech.gitbook.io/replicate-ai-and-ml-models-plugin/creating-predictions/stable-diffusion.md).

# Stable Diffusion

Stable Diffusion is a text-to-image diffusion model capable of generating photo-realistic images given any text input. You can learn more about the model [here](https://replicate.com/stability-ai/stable-diffusion).

You can generate images using Stable Diffusion by using the "Create Prediction - Stable Diffusion" workflow action.&#x20;

<figure><img src="https://1187100604-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2F3ueA3DZDjlYOZVlFZToc%2Fuploads%2F6lIcDCfl4K5rdaloUrrB%2F2023-09-07%2009.18.10.gif?alt=media&amp;token=641e3bdd-70d7-4b84-8158-a8eca2d498de" alt=""><figcaption></figcaption></figure>

It requires the following inputs:

<table><thead><tr><th width="154">Input</th><th width="145.99999999999997">Type of Field</th><th>Description</th></tr></thead><tbody><tr><td>Prompt</td><td>Text</td><td>The text prompt you're using to create the image(s)</td></tr><tr><td>Height</td><td>Number (integer)</td><td>The height of the image(s) you want to create</td></tr><tr><td>Width</td><td>Number (integer)</td><td>The width of the image(s) you want to create</td></tr><tr><td>Number of Outputs</td><td>Number (integer)</td><td>The number of images you want to create with each prediction. Must be between 1 and 4.</td></tr><tr><td>Negative Prompt</td><td>Text</td><td>Things you do NOT want to see in the output image(s)</td></tr><tr><td># Inference Steps</td><td>Number (integer)</td><td>The number of denoising steps used in the prediction (minimum: 1; maximum: 500). In general, the more steps you use the more detailed the output. However, the more steps you use the longer it will take to generate the prediction.<br></td></tr><tr><td>Guidance Scale</td><td>Number (decimal)</td><td>Scale for classifier-free guidance (minimum: 1; maximum: 20)</td></tr><tr><td>Seed</td><td>Number (integer)</td><td>Random seed. Leave blank to randomize the seed</td></tr><tr><td>Scheduler</td><td>Text (list of pre-defined options)</td><td>The type of scheduler you want to use.</td></tr><tr><td>Version</td><td>Text (list of pre-defined options)</td><td>The version of Stable Diffusion you want to use. I've found the default version (a9758cbfbd5f3c2094457d996681af52552901775aa2d6dd0b17fd15df959bef) works better than the newer version (ac732df83cea7fff18b8472768c88ad041fa750ff7682a21affe81863cbe77e4)</td></tr></tbody></table>
