The Stability AI component is an AI component that allows users to connect the AI models served on the Stability AI Platform. It can carry out the following tasks:
#Release Stage
Alpha
#Configuration
The component definition and tasks are defined in the definition.yaml and tasks.yaml files respectively.
#Setup
In order to communicate with Stability AI, the following connection details need to be
provided. You may specify them directly in a pipeline recipe as key-value pairs
within the component's setup
block, or you can create a Connection from
the Integration Settings
page and reference the whole setup
as setup: ${connection.<my-connection-id>}
.
Field | Field ID | Type | Note |
---|---|---|---|
API Key | api-key | string | Fill in your Stability AI API key. To find your keys, visit here. |
#Supported Tasks
#Text to Image
Generate a new image from a text prompt.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_TEXT_TO_IMAGE |
Engine (required) | engine | string | Stability AI Engine (model) to be used. Enum values
|
Prompts (required) | prompts | array[string] | An array of prompts to use for generation. |
Weights | weights | array[number] | An array of weights to use for generation. |
CFG Scale | cfg-scale | number | How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) |
Clip Guidance Preset | clip-guidance-preset | string | Clip guidance preset. Enum values
|
Height | height | integer | Height of the image to generate, in pixels, in an increment divible by 64. Engine-specific dimension validation: - SDXL Beta: must be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. - SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152 - SDXL v1.0: same as SDXL v0.9 - SD v1.6: must be between 320x320 and 1536x1536 |
Width | width | integer | Width of the image to generate, in pixels, in an increment divible by 64. Engine-specific dimension validation: - SDXL Beta: must be between 128x128 and 512x896 (or 896x512); only one dimension can be greater than 512. - SDXL v0.9: must be one of 1024x1024, 1152x896, 1216x832, 1344x768, 1536x640, 640x1536, 768x1344, 832x1216, or 896x1152 - SDXL v1.0: same as SDXL v0.9 - SD v1.6: must be between 320x320 and 1536x1536 |
Sampler | sampler | string | Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you. Enum values
|
Samples | samples | integer | Number of images to generate |
Seed | seed | number | Random noise seed (omit this option or use 0 for a random seed) |
Steps | steps | integer | Number of diffusion steps to run. |
Style Preset | style-preset | string | Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change. Enum values
|
Output | Field ID | Type | Description |
---|---|---|---|
Images | images | array[image/png] | Generated images. |
Seeds | seeds | array[number] | Seeds of generated images. |
#Image to Image
Modify an image based on a text prompt.
Input | Field ID | Type | Description |
---|---|---|---|
Task ID (required) | task | string | TASK_IMAGE_TO_IMAGE |
Engine (required) | engine | string | Stability AI Engine (model) to be used. Enum values
|
Prompts (required) | prompts | array[string] | An array of prompts to use for generation. |
Init Image | init-image | image/* | Image used to initialize the diffusion process, in lieu of random noise. |
Weights | weights | array[number] | An array of weights to use for generation. If unspecified, the model will automatically assign a default weight of 1.0 to each prompt. |
Clip Guidance Preset | clip-guidance-preset | string | Clip guidance preset. Enum values
|
Image Strength | image-strength | number | How much influence the init_image has on the diffusion process. Values close to 1 will yield images very similar to the init_image while values close to 0 will yield images wildly different than the init_image . The behavior of this is meant to mirror DreamStudio's "Image Strength" slider. This parameter is just an alternate way to set step_schedule_start , which is done via the calculation 1 - image_strength . For example, passing in an Image Strength of 35% (0.35 ) would result in a step_schedule_start of 0.65 . |
CFG Scale | cfg-scale | number | How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) |
Init Image Mode | init-image-mode | string | Whether to use image_strength or step_schedule_* to control how much influence the init_image has on the result. Enum values
|
Sampler | sampler | string | Which sampler to use for the diffusion process. If this value is omitted we'll automatically select an appropriate sampler for you. Enum values
|
Samples | samples | integer | Number of images to generate |
Seed | seed | number | Random noise seed (omit this option or use 0 for a random seed) |
Step Schedule Start | step-schedule-start | number | Skips a proportion of the start of the diffusion steps, allowing the init_image to influence the final generated image. Lower values will result in more influence from the init_image, while higher values will result in more influence from the diffusion steps. (e.g. a value of 0 would simply return you the init_image, where a value of 1 would return you a completely different image.) |
Step Schedule End | step-schedule-end | number | Skips a proportion of the end of the diffusion steps, allowing the init_image to influence the final generated image. Lower values will result in more influence from the init_image, while higher values will result in more influence from the diffusion steps. |
Steps | steps | integer | Number of diffusion steps to run. |
Style Preset | style-preset | string | Pass in a style preset to guide the image model towards a particular style. This list of style presets is subject to change. Enum values
|
Output | Field ID | Type | Description |
---|---|---|---|
Images | images | array[image/png] | Generated images. |
Seeds | seeds | array[number] | Seeds of generated images. |