give me more image generation steps

This commit is contained in:
Luke Robles 2022-10-06 07:57:25 -07:00
parent b6ad86758c
commit 83e05c2b03
2 changed files with 5 additions and 3 deletions

View File

@ -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="",

View File

@ -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,