From 57310b73a3f01bcc549cbeec27ba25c622dd1b98 Mon Sep 17 00:00:00 2001 From: welabbar <70503629+elabbarw@users.noreply.github.com> Date: Thu, 13 Feb 2025 05:23:32 +0000 Subject: [PATCH] litellm doesnt support style_preset --- openwebui/actions/sdlitellm.py | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/openwebui/actions/sdlitellm.py b/openwebui/actions/sdlitellm.py index 40ea896..05ba658 100644 --- a/openwebui/actions/sdlitellm.py +++ b/openwebui/actions/sdlitellm.py @@ -137,11 +137,6 @@ class Action: if negmatch: negmatch_string = negmatch.group(1).strip() - # Regular expression to capture text after 'STYLE:' (if any) - stylematch = re.search(r"(?i)style:?\s*(.*)", prompt) - stylematch_string = None - if stylematch: - stylematch_string = negmatch.group(1).strip() headers = { "X-API-KEY": self.valves.LITELLM_API_KEY, @@ -151,7 +146,6 @@ class Action: if "sdxl" in modelchoice: payload = { "prompt": str(prompt), - "style_preset": str(stylematch_string), "cfg_scale": 7, "height": 1024, "width": 1024, @@ -167,8 +161,7 @@ class Action: "mode": "text-to-image", "model": str(modelchoice), "aspect_ratio": "1:1", - "response_format": "b64_json", - "style_preset": str(stylematch_string), + "response_format": "b64_json" } payload.update(