Fixing sd to work with latest update
This commit is contained in:
parent
452554a27c
commit
7ce3145ec5
@ -30,7 +30,7 @@ class StableDiffusion(commands.Cog):
|
||||
self, ctx: commands.Context, positive_prompt: str, negative_prompt: str
|
||||
):
|
||||
|
||||
if ctx.channel.name == "stable-diffusion":
|
||||
if ctx.channel.name == "stable-diffusion" or "bot-testing":
|
||||
import socket
|
||||
import stable_diffusion
|
||||
|
||||
@ -40,7 +40,8 @@ class StableDiffusion(commands.Cog):
|
||||
|
||||
# Send my requests to my gaming computer with the 3080 (if its up)
|
||||
if ctx.author.id == core_utils.my_id:
|
||||
ip = "192.168.1.188"
|
||||
# ip = "192.168.1.29"
|
||||
ip = "DESKTOP-KF5M0SD"
|
||||
steps = 60
|
||||
s = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
|
||||
s.settimeout(1)
|
@ -8,9 +8,9 @@ import tempfile
|
||||
|
||||
|
||||
async def generate_image(ip, port, positives, negatives, steps):
|
||||
url = "http://" + ip + ":" + port + "/api/predict/"
|
||||
url = "http://" + ip + ":" + port + "/run/predict/"
|
||||
headers = {
|
||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:105.0) Gecko/20100101 Firefox/105.0",
|
||||
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:108.0) Gecko/20100101 Firefox/108.0",
|
||||
"Accept": "*/*",
|
||||
"Accept-Language": "en-US,en;q=0.5",
|
||||
"DNT": "1",
|
||||
@ -18,7 +18,7 @@ async def generate_image(ip, port, positives, negatives, steps):
|
||||
}
|
||||
|
||||
json_data = {
|
||||
"fn_index": 51,
|
||||
"fn_index": 52,
|
||||
"data": [
|
||||
positives,
|
||||
negatives,
|
||||
@ -47,6 +47,7 @@ async def generate_image(ip, port, positives, negatives, steps):
|
||||
False,
|
||||
False,
|
||||
False,
|
||||
False,
|
||||
"",
|
||||
"Seed",
|
||||
"",
|
||||
|
Loading…
x
Reference in New Issue
Block a user