From 4eb6fbe8921ac3998794bf5d736b4b6291aee05e Mon Sep 17 00:00:00 2001 From: Luke Robles <98352913+lrobles-iterable@users.noreply.github.com> Date: Thu, 6 Oct 2022 07:57:25 -0700 Subject: [PATCH] give me more image generation steps --- app/cogs/actual_utils.py | 4 +++- app/stable_diffusion.py | 4 ++-- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/app/cogs/actual_utils.py b/app/cogs/actual_utils.py index 77a788b6..6d7c3b86 100644 --- a/app/cogs/actual_utils.py +++ b/app/cogs/actual_utils.py @@ -73,10 +73,12 @@ class ActualUtils(commands.Cog): port = "7860" ip = "192.168.1.80" + steps = 20 # Send my requests to my gaming computer with the 3080 (if its up) if ctx.message.author.id == 144986109804412928: ip = "192.168.1.188" + steps = 60 s = socket.socket(socket.AF_INET, socket.SOCK_STREAM) s.settimeout(1) try: @@ -93,7 +95,7 @@ class ActualUtils(commands.Cog): positives = prompt.split(";")[0] negatives = prompt.split(";")[1] file_path = await stable_diffusion.generate_image( - ip=ip, port=port, positives=positives, negatives=negatives + ip=ip, port=port, positives=positives, negatives=negatives, steps=steps ) await original_message.edit( content="", diff --git a/app/stable_diffusion.py b/app/stable_diffusion.py index aff1ba7f..7709d89f 100644 --- a/app/stable_diffusion.py +++ b/app/stable_diffusion.py @@ -5,7 +5,7 @@ import socket import tempfile -async def generate_image(ip, port, positives, negatives): +async def generate_image(ip, port, positives, negatives, steps): url = "http://" + ip + ":" + port + "/api/predict/" headers = { "User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0", @@ -22,7 +22,7 @@ async def generate_image(ip, port, positives, negatives): negatives, # Negative Prompt "None", "None", - 20, # Sampling Steps + steps, # Sampling Steps "Euler a", True, # enable face fix False,