summaryrefslogtreecommitdiffstats
path: root/g4f/Provider/airforce/AirforceImage.py
diff options
context:
space:
mode:
authorkqlio67 <kqlio67@users.noreply.github.com>2024-11-11 18:57:35 +0100
committerkqlio67 <kqlio67@users.noreply.github.com>2024-11-11 18:57:35 +0100
commit562a5c957997a1bb68a43b092664ac26c5c46c26 (patch)
treec58536051e7cfda642d32b61839ebbc2ab8be9a2 /g4f/Provider/airforce/AirforceImage.py
parentUpdate (g4f/models.py g4f/Provider/Cloudflare.py) (diff)
downloadgpt4free-562a5c957997a1bb68a43b092664ac26c5c46c26.tar
gpt4free-562a5c957997a1bb68a43b092664ac26c5c46c26.tar.gz
gpt4free-562a5c957997a1bb68a43b092664ac26c5c46c26.tar.bz2
gpt4free-562a5c957997a1bb68a43b092664ac26c5c46c26.tar.lz
gpt4free-562a5c957997a1bb68a43b092664ac26c5c46c26.tar.xz
gpt4free-562a5c957997a1bb68a43b092664ac26c5c46c26.tar.zst
gpt4free-562a5c957997a1bb68a43b092664ac26c5c46c26.zip
Diffstat (limited to '')
-rw-r--r--g4f/Provider/airforce/AirforceImage.py22
1 files changed, 8 insertions, 14 deletions
diff --git a/g4f/Provider/airforce/AirforceImage.py b/g4f/Provider/airforce/AirforceImage.py
index 62d42b4f..b74bc364 100644
--- a/g4f/Provider/airforce/AirforceImage.py
+++ b/g4f/Provider/airforce/AirforceImage.py
@@ -3,6 +3,7 @@ from __future__ import annotations
from aiohttp import ClientSession
from urllib.parse import urlencode
import random
+import requests
from ...typing import AsyncResult, Messages
from ...image import ImageResponse
@@ -16,20 +17,13 @@ class AirforceImage(AsyncGeneratorProvider, ProviderModelMixin):
#working = True
default_model = 'flux'
- image_models = [
- 'flux',
- 'flux-realism',
- 'flux-anime',
- 'flux-3d',
- 'flux-disney',
- 'flux-pixel',
- 'flux-4o',
- 'any-dark',
- 'stable-diffusion-xl-base',
- 'stable-diffusion-xl-lightning',
- 'Flux-1.1-Pro',
- ]
- models = [*image_models]
+
+ response = requests.get('https://api.airforce/imagine/models')
+ data = response.json()
+
+ image_models = data
+
+ models = [*image_models, "stable-diffusion-xl-base", "stable-diffusion-xl-lightning", "Flux-1.1-Pro"]
model_aliases = {
"sdxl": "stable-diffusion-xl-base",