laion-ai
/
conditioned-prior
Generate a CLIP image embedding from text.
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.
|
{
"type": "object",
"title": "Input",
"properties": {
"prompt": {
"type": "string",
"title": "Prompt",
"default": "",
"x-order": 0,
"description": "Caption to invert to a CLIP image embed"
},
"overwrite": {
"type": "boolean",
"title": "Overwrite",
"default": false,
"x-order": 3,
"description": "Re-predict any cached embeddings."
},
"candidates": {
"type": "integer",
"title": "Candidates",
"default": 2,
"maximum": 32,
"minimum": 2,
"x-order": 1,
"description": "Numer of image embeds to draw from in the prior. Increasing may improve performance."
},
"cond_scale": {
"type": "number",
"title": "Cond Scale",
"default": 1,
"maximum": 5,
"minimum": 0,
"x-order": 2,
"description": "How much prior guidance to use."
}
}
}
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."
}