laion-ai / conditioned-prior

Generate a CLIP image embedding from text.

  • Public
  • 364 runs
  • GitHub
  • License

Run laion-ai/conditioned-prior with an API

Use one of our client libraries to get started quickly. Clicking on a library will take you to the Playground tab where you can tweak different inputs, see the results, and copy the corresponding code to use in your own project.

Input schema

The fields you can use to run this model with an API. If you don't give a value for a field its default value will be used.

Field Type Default value Description
prompt
string
Caption to invert to a CLIP image embed
candidates
integer
2

Min: 2

Max: 32

Numer of image embeds to draw from in the prior. Increasing may improve performance.
cond_scale
number
1

Max: 5

How much prior guidance to use.
overwrite
boolean
False
Re-predict any cached embeddings.

Output schema

The shape of the response you’ll get when you run this model with an API.

Schema
{
  "type": "object",
  "title": "PriorOutput",
  "required": [
    "text_embedding",
    "image_embedding"
  ],
  "properties": {
    "text_embedding": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "title": "Text Embedding"
    },
    "image_embedding": {
      "type": "array",
      "items": {
        "type": "number"
      },
      "title": "Image Embedding"
    }
  },
  "description": "Pydantic class for specifying the return type of the prior prediction API endpoint."
}