Fix more errors
This commit is contained in:
parent
6ba5bf90cc
commit
0de4e22975
@ -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]
|
||||||
Loading…
x
Reference in New Issue
Block a user