Add documentation for how to use the text to image model configs, reduce to Replicate

This commit is contained in:
sabaimran 2024-11-15 15:26:14 -08:00
parent 759873ec44
commit 15b4cec1e8

View file

@ -12,18 +12,15 @@ To generate images, you just need to provide a prompt to Khoj in which the image
You have a couple of image generation options. You have a couple of image generation options.
### Image Generation Models
We support most state of the art image generation models, including Ideogram, Flux, and Stable Diffusion. These will run using [Replicate](https://replicate.com). Here's how to set them up:
1. Get a Replicate API key [here](https://replicate.com/account/api-tokens).
1. Create a new [Text to Image Model](https://app.khoj.dev/server/admin/database/texttoimagemodelconfig/). Set the `type` to `Replicate`. Use any of the model names you see [on this list](https://replicate.com/pricing#image-models).
### OpenAI ### OpenAI
1. Get [an OpenAI API key](https://platform.openai.com/settings/organization/api-keys). 1. Get [an OpenAI API key](https://platform.openai.com/settings/organization/api-keys).
2. Setup your OpenAI API key, if you haven't already. See instructions [here](/get-started/setup#2-configure) 2. Setup your OpenAI API key, if you haven't already. See instructions [here](/get-started/setup#2-configure)
3. Create a text to image config at http://localhost:42110/server/admin/database/texttoimagemodelconfig/. We recommend the `model name` `dall-e-3`. Make sure to associate it with the OpenAI API chat configuration you setup in step 2 with `Openai config` field. 3. Create a text to image config at http://localhost:42110/server/admin/database/texttoimagemodelconfig/. We recommend the `model name` `dall-e-3`. Make sure to associate it with the OpenAI API chat configuration you setup in step 2 with `Openai config` field.
### Flux
1. You need a Replicate API key. You can find one [here](https://replicate.com/account/api-tokens).
1. Create a new [Text to Image Model](https://app.khoj.dev/server/admin/database/texttoimagemodelconfig/). Set the `type` to `Replicate`. We recommend the `model name` `black-forest-labs/flux-1.1-pro`.
### Stable Diffusion
1. Get an API key from [Stable Diffusion](https://www.stablediffusion.com/).
2. Create a new [Text to Image Model](https://app.khoj.dev/server/admin/database/texttoimagemodelconfig/). Set the `type` to `Stabilityai`. We recommend the `model name` `sd3-large`.