Fix typos

This commit is contained in:
jordan 2022-12-10 22:11:44 +11:00
parent 991c592086
commit ac3485d59e
2 changed files with 10 additions and 10 deletions

View File

@ -43,7 +43,7 @@ class DiffuseAPI():
return False
def set_styles(self, styles):
if type styles = list:
if type(styles) == list:
self.styles = styles
return True
return False
@ -74,7 +74,7 @@ class DiffuseAPI():
return ("portrait", self.width, self.height)
def set_nsfw_filter(self, filter_state):
if type filter_state = bool:
if type(filter_state) == bool:
self.nsfw_enabled = filter_state
return True
return False
@ -85,9 +85,9 @@ class DiffuseAPI():
async def generate_image(self, prompt, neg_prompt=""):
payload = {
"prompt": prompt,
"styles": main_settings.styles,
"steps": main_settings.num_steps,
"seed": main_settings.ai_seed,
"styles": self.styles,
"steps": self.num_steps,
"seed": self.ai_seed,
"n_iter": 1,
"height": self.height,
"width": self.width,
@ -105,7 +105,7 @@ class DiffuseAPI():
payload.update(override_payload)
sess = aiohttp.ClientSession(main_settings.url)
sess = aiohttp.ClientSession(self.url)
alive = await sess.head('/')
if alive.status != 200:

View File

@ -100,9 +100,9 @@
" async def generate_image(self, prompt, neg_prompt=\"\"):\n",
" payload = {\n",
" \"prompt\": prompt,\n",
" \"styles\": main_settings.styles,\n",
" \"steps\": main_settings.num_steps,\n",
" \"seed\": main_settings.ai_seed,\n",
" \"styles\": self.styles,\n",
" \"steps\": self.num_steps,\n",
" \"seed\": self.ai_seed,\n",
" \"n_iter\": 1,\n",
" \"height\": self.height,\n",
" \"width\": self.width,\n",
@ -120,7 +120,7 @@
"\n",
" payload.update(override_payload)\n",
"\n",
" sess = aiohttp.ClientSession(main_settings.url)\n",
" sess = aiohttp.ClientSession(self.url)\n",
" alive = await sess.head('/')\n",
"\n",
" if alive.status != 200:\n",