Stable Diffusion Models#

This section provides an overview of how you can generate images from prompts in EvaDB using a Stable Diffusion model.

Introduction#

Stable Diffusion models leverage a controlled random walk process to generate intricate patterns and images from textual prompts, bridging the gap between text and visual representation. EvaDB uses the stable diffusion implementation from Replicate.

Stable Diffusion UDF#

In order to create an image generation function in EvaDB, use the following SQL command:

CREATE FUNCTION IF NOT EXISTS StableDiffusion
IMPL 'evadb/functions/stable_diffusion.py';

EvaDB automatically uses the latest stable diffusion release available on Replicate.

To see a demo of how the function can be used, please check the demo notebook on stable diffusion.