github.com/instill-ai/component@v0.16.0-beta/pkg/connector/stabilityai/v0/README.mdx (about)

     1  ---
     2  title: "Stability AI"
     3  lang: "en-US"
     4  draft: false
     5  description: "Learn about how to set up a VDP Stability AI connector https://github.com/instill-ai/instill-core"
     6  ---
     7  
     8  The Stability AI component is an AI connector that allows users to connect the AI models served on the Stability AI Platform.
     9  It can carry out the following tasks:
    10  
    11  - [Text To Image](#text-to-image)
    12  - [Image To Image](#image-to-image)
    13  
    14  ## Release Stage
    15  
    16  `Alpha`
    17  
    18  ## Configuration
    19  
    20  The component configuration is defined and maintained [here](https://github.com/instill-ai/component/blob/main/pkg/connector/stabilityai/v0/config/definition.json).
    21  
    22  ## Connection
    23  
    24  | Field | Field ID | Type | Note |
    25  | :--- | :--- | :--- | :--- |
    26  | API Key (required) | `api_key` | string | Fill your Stability AI API key. To find your keys, visit - https://platform.stability.ai/account/keys |
    27  
    28  ## Supported Tasks
    29  
    30  ### Text To Image
    31  
    32  Generate a new image from a text prompt.
    33  
    34  | Input | ID | Type | Description |
    35  | :--- | :--- | :--- | :--- |
    36  | Task ID (required) | `task` | string | `TASK_TEXT_TO_IMAGE` |
    37  | Engine (required) | `engine` | string | Stability AI Engine (model) to be used. |
    38  | Prompts (required) | `prompts` | array[string] | An array of prompts to use for generation. |
    39  | Weights | `weights` | array[number] | An array of weights to use for generation. |
    40  | CFG Scale | `cfg_scale` | number | How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) |
    41  | Clip Guidance Preset | `clip_guidance_preset` | string | Clip guidance preset |
    42  | Height | `height` | integer | The image height |
    43  | Width | `width` | integer | The image width |
    44  | 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. |
    45  | Samples | `samples` | integer | Number of images to generate |
    46  | Seed | `seed` | integer | Random noise seed (omit this option or use `0` for a random seed) |
    47  | Steps | `steps` | integer | Number of diffusion steps to run. |
    48  | 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. |
    49  
    50  | Output | ID | Type | Description |
    51  | :--- | :--- | :--- | :--- |
    52  | Images | `images` | array[string] | Generated images |
    53  | Seeds | `seeds` | array[number] | Seeds of generated images |
    54  
    55  ### Image To Image
    56  
    57  Modify an image based on a text prompt.
    58  
    59  | Input | ID | Type | Description |
    60  | :--- | :--- | :--- | :--- |
    61  | Task ID (required) | `task` | string | `TASK_IMAGE_TO_IMAGE` |
    62  | Engine (required) | `engine` | string | Stability AI Engine (model) to be used. |
    63  | Prompts (required) | `prompts` | array[string] | An array of prompts to use for generation. |
    64  | Init Image | `init_image` | string | Image used to initialize the diffusion process, in lieu of random noise. |
    65  | 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. |
    66  | Clip Guidance Preset | `clip_guidance_preset` | string | Clip guidance preset |
    67  | 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.  <br/> <br/> 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`.  |
    68  | Cfg Scale | `cfg_scale` | number | How strictly the diffusion process adheres to the prompt text (higher values keep your image closer to your prompt) |
    69  | 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. |
    70  | 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. |
    71  | Samples | `samples` | integer | Number of images to generate |
    72  | Seed | `seed` | integer | Random noise seed (omit this option or use `0` for a random seed) |
    73  | 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.) |
    74  | 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. |
    75  | Steps | `steps` | integer | Number of diffusion steps to run. |
    76  | 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. |
    77  
    78  | Output | ID | Type | Description |
    79  | :--- | :--- | :--- | :--- |
    80  | Images | `images` | array[string] | Generated images |
    81  | Seeds | `seeds` | array[number] | Seeds of generated images |