From 21aa800f681a77c2d570638fadedea152b4c0f59 Mon Sep 17 00:00:00 2001 From: Abhi <85984486+AbhiTheModder@users.noreply.github.com> Date: Thu, 29 Feb 2024 14:04:29 +0530 Subject: [PATCH] Update aiutils.py --- modules/aiutils.py | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/modules/aiutils.py b/modules/aiutils.py index 16865ea..2bcddfc 100644 --- a/modules/aiutils.py +++ b/modules/aiutils.py @@ -11,7 +11,7 @@ lexica = import_library("lexica", "lexica-api") from lexica import Client as lcl # Define the API endpoint -api_url = "https://visioncraft-rs24.koyeb.app" +api_url = "https://api.visioncraft.top" def upscale_request_lexica(image: bytes) -> bytes: client = lcl() @@ -29,9 +29,8 @@ def upscale_request_vc(image): headers = {"content-type": "application/json"} resp = requests.post(url, json=payload, headers=headers) - image_url = resp.json()["images"][0] - content = requests.get(image_url) - return content.content + content = resp.content + return content @Client.on_message(filters.command("vdxl", prefix) & filters.me) async def vdxl(c: Client, message: Message): @@ -52,13 +51,14 @@ async def vdxl(c: Client, message: Message): data = { "prompt": prompt, "model": "sdxl-turbo", - "negative_prompt": "", + "negative_prompt": "bad quality" "token": vca_api_key, "width": 1024, - "height": 768, - "steps": 30, - "cfg_scale": 8, - "nsfw_filter": False, + "height": 1024, + # "steps": 30, + # "cfg_scale": 8, + "sampler": "euler", + "scheduler": "normal", "watermark": False } @@ -122,4 +122,4 @@ modules_help["aiutils"] = { "vdxl [prompt/reply to prompt]*": "Text to Image with SDXL model", "upscale [cap/reply to image]*": "Upscale Image through VisionCraft API", "lupscale [cap/reply to image]*": "Upscale Image through Lexica API", -} \ No newline at end of file +}