stable-diffuse-api #2

Merged
benjamyn merged 20 commits from stable-diffuse-api into master 2022-12-11 05:01:12 -05:00
Showing only changes of commit 0de4e22975 - Show all commits

View File

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