ai_diffusion
An authenticated client can post a request to Stable Diffusion v1.4
Last updated
An authenticated client can post a request to Stable Diffusion v1.4
Last updated
Stable Diffusion comes with two flavors to produce images:
TXT2IMG: a text to image generation AI. Input text and a few additional parameters.
IMG2IMG: an image to image generation AI. Input a guiding image (full URI of the image), additional text, and a few additional parameters
GET
https://opensourceais.com/api/v1/public/config/diffusion
You should not need to call this endpoint. This is just a FYI to understand all input parameters sent to the AI.
POST
https://opensourceais.com/api/v1/private/client/ai/diffusion
Name | Type | Description |
---|---|---|
width
Number
The width of the output image. Defaults to 320
height
Number
The height of the output image. Defaults to 320
steps
Number
The number of steps requested for generating the output image. High number of steps cost more GPU compute. Defaults to 20. Should not exceed 200.
seed
Number
A random number between 1 and 1,000,000 used by the TXT2IMG generation. Same seed and exact same params delivers same output. Defaults to 1. Should send random values for better experience.
word*
String
A text input to tell the AI what to generate.
url_upload
String
A well formed URI starting with https://... and accessing a PNG or JPG image. Note that if the image is not of the width and height size passed in parameters, it will be automatically cropped or resized.
strength
Float
A float between 0 and 1, corresponding to a % of strength applied for the IMG2IMG generation. Defaults to 0.75.
guidance
Float
A float between 0.1 and 10, corresponding to the guidance scale applied for the TXT2IMG generation. Defaults to 7.5.
cimg
Number
The number of images to produce. Defaults to 1. Note that more images to produce will cost proportionally more in GPU compute.