Introduction

Stable Diffusion has been used to generate millions of images since its release. This tutorial will demonstrate how to use Loom to interact with Stable Diffusion via Automatic1111's API. Note that this is not a tutorial on how to install or use Stable Diffusion. A working Automatic1111 installation is required to proceed.

Requirements

  1. Working Automatic1111 WebUI setup.

    https://www.youtube.com/watch?v=kqXpAKVQDNU

<aside> đź’ˇ

Note: API features must be enabled by using “set COMMANDLINE_ARGS=--listen --api” to webui-user.bat in the root folder of your installation

</aside>

  1. Loom v1.3.1
  2. Automatic1111 Loom Modules

Tutorial

  1. Open Loom and create a new project called “sdtests”

    javaw_nGohsRLq9T.png

  2. Select Edit > Open Project Folder

    <aside> đź’ˇ Note: This method may only be compatible with Windows, Mac, and standard Linux setups. If it does not work, you may need to manually navigate to the project folder.

    </aside>

    gsieDA2IKa.png

  3. Using your file explorer, open the /src folder, then open /dependencies

    explorer_aXYq1Ty0Br.png

  4. Extract the contents of auto1111.zip into the /dependencies folder

    AWKHjxNRJF.png

  5. Return to Loom and select Edit > Insert Filter

    javaw_AODvd30mBc.png

  6. Navigate to the /dependencies folder and insert text2img.loom

    javaw_n9Rvja1Xo4.png

  7. Observe the text2img module.

    javaw_EAP3VR1T39.png

Properties from top to bottom:

  1. URL - the URL and port of your implementation of Automatic1111’s WebUI

  2. Prompt- The description of the image you want to create

  3. Neg Prompt- the negative prompt or the description of what you don’t want in the image

  4. Styles- comma delimited list of styles. These styles are defined in the webui.

  5. Width - the width of the image in pixels

  6. Height - the height of the image in pixels

  7. Steps - the number of steps for generating the image

  8. CFG Scale - the CFG scale of the generation.

  9. Seed - Generation seed

  10. Enable HR - For enabling the High Resolution Fix option. Use to upscale your images

  11. HR Scale - The scale factor for the upscaled image

  12. HR Upscaler - The name of the upscaler

  13. HR Steps - The number of steps calculated when upscaling

  14. Denoise Strength - Denoising strength for upscaler

  15. Now all there is to do is configure the properties to our liking, connect an Img-Probe node to the img64 output, and click the run button.

    javaw_mxQwDtPuiY.png

Extra

Here are some good Stable Diffusion models that I use: