format: using black

This commit is contained in:
0xMRTT 2023-05-06 18:03:30 +02:00
parent 79c39894d3
commit fcd56e0a9b
Signed by: 0xMRTT
GPG Key ID: 19C1449A774028BD
2 changed files with 33 additions and 15 deletions

View File

@ -196,7 +196,9 @@ class ImaginerApplication(Adw.Application):
image_bytes = self.query(
{
"inputs": prompt,
"negative_prompts": negative_prompt if negative_prompt else "",
"negative_prompts": negative_prompt
if negative_prompt
else "",
},
f"{HUGGINGFACE_API}/stabilityai/stable-diffusion-2-1",
)
@ -205,7 +207,9 @@ class ImaginerApplication(Adw.Application):
image_bytes = self.query(
{
"inputs": prompt,
"negative_prompts": negative_prompt if negative_prompt else "",
"negative_prompts": negative_prompt
if negative_prompt
else "",
},
f"{HUGGINGFACE_API}/hakurei/waifu-diffusion",
)
@ -214,7 +218,9 @@ class ImaginerApplication(Adw.Application):
image_bytes = self.query(
{
"inputs": prompt,
"negative_prompts": negative_prompt if negative_prompt else "",
"negative_prompts": negative_prompt
if negative_prompt
else "",
},
f"{HUGGINGFACE_API}/prompthero/openjourney-v4",
)
@ -223,7 +229,9 @@ class ImaginerApplication(Adw.Application):
image_bytes = self.query(
{
"inputs": prompt,
"negative_prompts": negative_prompt if negative_prompt else "",
"negative_prompts": negative_prompt
if negative_prompt
else "",
},
f"{HUGGINGFACE_API}/nitrosocke/Nitro-Diffusion",
)
@ -232,7 +240,9 @@ class ImaginerApplication(Adw.Application):
image_bytes = self.query(
{
"inputs": prompt,
"negative_prompts": negative_prompt if negative_prompt else "",
"negative_prompts": negative_prompt
if negative_prompt
else "",
},
f"{HUGGINGFACE_API}/wavymulder/Analog-Diffusion",
)
@ -241,7 +251,9 @@ class ImaginerApplication(Adw.Application):
image_bytes = self.query(
{
"inputs": prompt,
"negative_prompts": negative_prompt if negative_prompt else "",
"negative_prompts": negative_prompt
if negative_prompt
else "",
},
f"{HUGGINGFACE_API}/wavymulder/portraitplus",
)
@ -250,7 +262,9 @@ class ImaginerApplication(Adw.Application):
image_bytes = self.query(
{
"inputs": prompt,
"negative_prompts": negative_prompt if negative_prompt else "",
"negative_prompts": negative_prompt
if negative_prompt
else "",
},
f"{HUGGINGFACE_API}/andite/anything-v4.0",
)

View File

@ -43,11 +43,15 @@ class ImaginerWindow(Adw.ApplicationWindow):
self.settings = Gio.Settings(schema_id="page.codeberg.Imaginer.Imaginer")
self.settings.bind("width", self, "default-width",
Gio.SettingsBindFlags.DEFAULT)
self.settings.bind("height", self, "default-height",
Gio.SettingsBindFlags.DEFAULT)
self.settings.bind("is-maximized", self, "maximized",
Gio.SettingsBindFlags.DEFAULT)
self.settings.bind("is-fullscreen", self, "fullscreened",
Gio.SettingsBindFlags.DEFAULT)
self.settings.bind(
"width", self, "default-width", Gio.SettingsBindFlags.DEFAULT
)
self.settings.bind(
"height", self, "default-height", Gio.SettingsBindFlags.DEFAULT
)
self.settings.bind(
"is-maximized", self, "maximized", Gio.SettingsBindFlags.DEFAULT
)
self.settings.bind(
"is-fullscreen", self, "fullscreened", Gio.SettingsBindFlags.DEFAULT
)