refactor(g4f/Provider/ReplicateHome.py): optimize model organization and improve readability

This commit is contained in:
kqlio67 2024-09-11 15:54:26 +03:00
parent 80e17bc7c9
commit 7d1fa2c623

View File

@ -15,16 +15,11 @@ class ReplicateHome(AsyncGeneratorProvider, ProviderModelMixin):
parent = "Replicate"
working = True
default_model = 'meta/meta-llama-3-70b-instruct'
text_models = {"meta/meta-llama-3-70b-instruct", "mistralai/mixtral-8x7b-instruct-v0.1", "google-deepmind/gemma-2b-it"}
image_models = {"stability-ai/stable-diffusion-3", "bytedance/sdxl-lightning-4step", "playgroundai/playground-v2.5-1024px-aesthetic"}
models = [
# Models for image generation
'stability-ai/stable-diffusion-3',
'bytedance/sdxl-lightning-4step',
'playgroundai/playground-v2.5-1024px-aesthetic',
# Models for image generation
'meta/meta-llama-3-70b-instruct',
'mistralai/mixtral-8x7b-instruct-v0.1',
'google-deepmind/gemma-2b-it',
*text_models,
*image_models
]
versions = {
@ -51,9 +46,6 @@ class ReplicateHome(AsyncGeneratorProvider, ProviderModelMixin):
]
}
image_models = {"stability-ai/stable-diffusion-3", "bytedance/sdxl-lightning-4step", "playgroundai/playground-v2.5-1024px-aesthetic"}
text_models = {"meta/meta-llama-3-70b-instruct", "mistralai/mixtral-8x7b-instruct-v0.1", "google-deepmind/gemma-2b-it"}
model_aliases = {
"sd-3": "stability-ai/stable-diffusion-3",
"sdxl": "bytedance/sdxl-lightning-4step",