diff options
author | kqlio67 <kqlio67@users.noreply.github.com> | 2024-11-08 20:00:43 +0100 |
---|---|---|
committer | kqlio67 <kqlio67@users.noreply.github.com> | 2024-11-08 20:00:43 +0100 |
commit | fece1083182de072281bb09e1e24db3befcf7516 (patch) | |
tree | dc664879b80753f1599aa841b6c3a935db8e9c5d /g4f/Provider | |
parent | Update (g4f/models.py g4f/Provider/airforce/ g4f/Provider/Airforce.py) (diff) | |
download | gpt4free-fece1083182de072281bb09e1e24db3befcf7516.tar gpt4free-fece1083182de072281bb09e1e24db3befcf7516.tar.gz gpt4free-fece1083182de072281bb09e1e24db3befcf7516.tar.bz2 gpt4free-fece1083182de072281bb09e1e24db3befcf7516.tar.lz gpt4free-fece1083182de072281bb09e1e24db3befcf7516.tar.xz gpt4free-fece1083182de072281bb09e1e24db3befcf7516.tar.zst gpt4free-fece1083182de072281bb09e1e24db3befcf7516.zip |
Diffstat (limited to '')
-rw-r--r-- | g4f/Provider/Prodia.py | 18 |
1 files changed, 12 insertions, 6 deletions
diff --git a/g4f/Provider/Prodia.py b/g4f/Provider/Prodia.py index 543a8b19..fcebf7e3 100644 --- a/g4f/Provider/Prodia.py +++ b/g4f/Provider/Prodia.py @@ -98,6 +98,12 @@ class Prodia(AsyncGeneratorProvider, ProviderModelMixin): model: str, messages: Messages, proxy: str = None, + negative_prompt: str = "", + steps: str = 20, # 1-25 + cfg: str = 7, # 0-20 + seed: str = "-1", + sampler: str = "DPM++ 2M Karras", # "Euler", "Euler a", "Heun", "DPM++ 2M Karras", "DPM++ SDE Karras", "DDIM" + aspect_ratio: str = "square", # "square", "portrait", "landscape" **kwargs ) -> AsyncResult: model = cls.get_model(model) @@ -117,12 +123,12 @@ class Prodia(AsyncGeneratorProvider, ProviderModelMixin): "new": "true", "prompt": prompt, "model": model, - "negative_prompt": kwargs.get("negative_prompt", ""), - "steps": kwargs.get("steps", 20), - "cfg": kwargs.get("cfg", 7), - "seed": kwargs.get("seed", int(time.time())), - "sampler": kwargs.get("sampler", "DPM++ 2M Karras"), - "aspect_ratio": kwargs.get("aspect_ratio", "square") + "negative_prompt": negative_prompt, + "steps": steps, + "cfg": cfg, + "seed": seed, + "sampler": sampler, + "aspect_ratio": aspect_ratio } async with session.get(cls.api_endpoint, params=params, proxy=proxy) as response: |