Stable Diffusion

This action allows you to input text prompts and generate images using the Stable Diffusion model.

Usage

  • First, add a "Stable Diffusion" action to your agent.

  • Fill in the prompt, image size and the response_format.

    • prompt: detailed description of the image you want to generate.

    • image size: the size of the image you want to generate. Should be one of the following: "1024x1024", "1792x1024", "1024x1792".

    • response_format: the format of the response. Should be one of the following: "url", "b64_json".

Output

  • The output of this action is a URL or a base64 encoded image.

  • Click the link and you will see the generated image!

  • You can use env.state.REBYTE_OPENAI_IMAGE_GEN_1.images[0].url or {{REBYTE_OPENAI_IMAGE_GEN_1.images[0].url}} to reference the URL in the next action.

  • The base64 encoded image can be referenced using env.state.REBYTE_OPENAI_IMAGE_GEN_1.images[0].base64 or {{REBYTE_OPENAI_IMAGE_GEN_1.images[0].base64}}.

Example Agent

  • This is the "HowToUse" agent for stable diffusion action.

  • This is the app for stable diffusion.

Last updated