diff --git a/src/main.py b/src/main.py index 4a833d1..2ba4f35 100644 --- a/src/main.py +++ b/src/main.py @@ -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", ) diff --git a/src/window.py b/src/window.py index 5fd6a30..0d865ef 100644 --- a/src/window.py +++ b/src/window.py @@ -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) \ No newline at end of file + 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 + )