format: using black
This commit is contained in:
parent
79c39894d3
commit
fcd56e0a9b
28
src/main.py
28
src/main.py
@ -196,7 +196,9 @@ class ImaginerApplication(Adw.Application):
|
|||||||
image_bytes = self.query(
|
image_bytes = self.query(
|
||||||
{
|
{
|
||||||
"inputs": prompt,
|
"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",
|
f"{HUGGINGFACE_API}/stabilityai/stable-diffusion-2-1",
|
||||||
)
|
)
|
||||||
@ -205,7 +207,9 @@ class ImaginerApplication(Adw.Application):
|
|||||||
image_bytes = self.query(
|
image_bytes = self.query(
|
||||||
{
|
{
|
||||||
"inputs": prompt,
|
"inputs": prompt,
|
||||||
"negative_prompts": negative_prompt if negative_prompt else "",
|
"negative_prompts": negative_prompt
|
||||||
|
if negative_prompt
|
||||||
|
else "",
|
||||||
},
|
},
|
||||||
f"{HUGGINGFACE_API}/hakurei/waifu-diffusion",
|
f"{HUGGINGFACE_API}/hakurei/waifu-diffusion",
|
||||||
)
|
)
|
||||||
@ -214,7 +218,9 @@ class ImaginerApplication(Adw.Application):
|
|||||||
image_bytes = self.query(
|
image_bytes = self.query(
|
||||||
{
|
{
|
||||||
"inputs": prompt,
|
"inputs": prompt,
|
||||||
"negative_prompts": negative_prompt if negative_prompt else "",
|
"negative_prompts": negative_prompt
|
||||||
|
if negative_prompt
|
||||||
|
else "",
|
||||||
},
|
},
|
||||||
f"{HUGGINGFACE_API}/prompthero/openjourney-v4",
|
f"{HUGGINGFACE_API}/prompthero/openjourney-v4",
|
||||||
)
|
)
|
||||||
@ -223,7 +229,9 @@ class ImaginerApplication(Adw.Application):
|
|||||||
image_bytes = self.query(
|
image_bytes = self.query(
|
||||||
{
|
{
|
||||||
"inputs": prompt,
|
"inputs": prompt,
|
||||||
"negative_prompts": negative_prompt if negative_prompt else "",
|
"negative_prompts": negative_prompt
|
||||||
|
if negative_prompt
|
||||||
|
else "",
|
||||||
},
|
},
|
||||||
f"{HUGGINGFACE_API}/nitrosocke/Nitro-Diffusion",
|
f"{HUGGINGFACE_API}/nitrosocke/Nitro-Diffusion",
|
||||||
)
|
)
|
||||||
@ -232,7 +240,9 @@ class ImaginerApplication(Adw.Application):
|
|||||||
image_bytes = self.query(
|
image_bytes = self.query(
|
||||||
{
|
{
|
||||||
"inputs": prompt,
|
"inputs": prompt,
|
||||||
"negative_prompts": negative_prompt if negative_prompt else "",
|
"negative_prompts": negative_prompt
|
||||||
|
if negative_prompt
|
||||||
|
else "",
|
||||||
},
|
},
|
||||||
f"{HUGGINGFACE_API}/wavymulder/Analog-Diffusion",
|
f"{HUGGINGFACE_API}/wavymulder/Analog-Diffusion",
|
||||||
)
|
)
|
||||||
@ -241,7 +251,9 @@ class ImaginerApplication(Adw.Application):
|
|||||||
image_bytes = self.query(
|
image_bytes = self.query(
|
||||||
{
|
{
|
||||||
"inputs": prompt,
|
"inputs": prompt,
|
||||||
"negative_prompts": negative_prompt if negative_prompt else "",
|
"negative_prompts": negative_prompt
|
||||||
|
if negative_prompt
|
||||||
|
else "",
|
||||||
},
|
},
|
||||||
f"{HUGGINGFACE_API}/wavymulder/portraitplus",
|
f"{HUGGINGFACE_API}/wavymulder/portraitplus",
|
||||||
)
|
)
|
||||||
@ -250,7 +262,9 @@ class ImaginerApplication(Adw.Application):
|
|||||||
image_bytes = self.query(
|
image_bytes = self.query(
|
||||||
{
|
{
|
||||||
"inputs": prompt,
|
"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",
|
f"{HUGGINGFACE_API}/andite/anything-v4.0",
|
||||||
)
|
)
|
||||||
|
@ -43,11 +43,15 @@ class ImaginerWindow(Adw.ApplicationWindow):
|
|||||||
|
|
||||||
self.settings = Gio.Settings(schema_id="page.codeberg.Imaginer.Imaginer")
|
self.settings = Gio.Settings(schema_id="page.codeberg.Imaginer.Imaginer")
|
||||||
|
|
||||||
self.settings.bind("width", self, "default-width",
|
self.settings.bind(
|
||||||
Gio.SettingsBindFlags.DEFAULT)
|
"width", self, "default-width", Gio.SettingsBindFlags.DEFAULT
|
||||||
self.settings.bind("height", self, "default-height",
|
)
|
||||||
Gio.SettingsBindFlags.DEFAULT)
|
self.settings.bind(
|
||||||
self.settings.bind("is-maximized", self, "maximized",
|
"height", self, "default-height", Gio.SettingsBindFlags.DEFAULT
|
||||||
Gio.SettingsBindFlags.DEFAULT)
|
)
|
||||||
self.settings.bind("is-fullscreen", self, "fullscreened",
|
self.settings.bind(
|
||||||
Gio.SettingsBindFlags.DEFAULT)
|
"is-maximized", self, "maximized", Gio.SettingsBindFlags.DEFAULT
|
||||||
|
)
|
||||||
|
self.settings.bind(
|
||||||
|
"is-fullscreen", self, "fullscreened", Gio.SettingsBindFlags.DEFAULT
|
||||||
|
)
|
||||||
|
Loading…
Reference in New Issue
Block a user