Enable using Stable Diffusion 3 for Image Generation via API

This commit is contained in:
Debanjum Singh Solanky
2024-04-25 19:12:27 +05:30
parent d6fe5d9a63
commit eda33e092f
3 changed files with 54 additions and 9 deletions

View File

@@ -234,9 +234,11 @@ class SearchModelConfig(BaseModel):
class TextToImageModelConfig(BaseModel):
class ModelType(models.TextChoices):
OPENAI = "openai"
STABILITYAI = "stability-ai"
model_name = models.CharField(max_length=200, default="dall-e-3")
model_type = models.CharField(max_length=200, choices=ModelType.choices, default=ModelType.OPENAI)
api_key = models.CharField(max_length=200, default=None, null=True, blank=True)
class SpeechToTextModelOptions(BaseModel):