Fix more errors

This commit is contained in:
jordan 2022-12-10 22:46:42 +11:00
parent 6ba5bf90cc
commit 0de4e22975

View File

@ -115,7 +115,7 @@ class DiffuseAPI():
async with aiohttp.ClientSession(self.url) as session: async with aiohttp.ClientSession(self.url) as session:
async with session.head('/') as alive: async with session.head('/') as alive:
if alive.status != 200: if alive.status != 200:
return None return None
async with session.post("/sdapi/v1/txt2img", json=payload) as image_json: async with session.post("/sdapi/v1/txt2img", json=payload) as image_json:
image_data = await image_json.json() image_data = await image_json.json()
return image_data["images"][0] return image_data["images"][0]