Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Devastator #949

Merged
merged 19 commits into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

setup(
name="airunner",
version="3.0.21",
version="3.1.0",
author="Capsize LLC",
description="A Stable Diffusion GUI",
long_description=open("README.md", "r", encoding="utf-8").read(),
Expand Down
10 changes: 2 additions & 8 deletions src/airunner/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
from airunner.windows.main.settings_mixin import SettingsMixin
from airunner.data.models.settings_models import ApplicationSettings, AIModels
from airunner.windows.main.main_window import MainWindow
from airunner.handlers.logger import Logger


class App(
Expand All @@ -55,7 +54,6 @@ def __init__(
"""
self.main_window_class_ = main_window_class or MainWindow
self.app = None
self.logger = Logger(prefix=self.__class__.__name__)
self.defendatron = defendatron
self.splash = None

Expand Down Expand Up @@ -95,9 +93,7 @@ def create_paths(self):
"images"
)
))
session = self.db_handler.get_db_session()
versions = session.query(distinct(AIModels.version)).filter(AIModels.category == 'stablediffusion').all()
session.close()
versions = self.session.query(distinct(AIModels.version)).filter(AIModels.category == 'stablediffusion').all()
for version in versions:
os.makedirs(
os.path.join(models_path, version[0], "embeddings"),
Expand All @@ -110,9 +106,7 @@ def create_paths(self):
os.makedirs(images_path, exist_ok=True)

def run_setup_wizard(self):
session = self.db_handler.get_db_session()
application_settings = session.query(ApplicationSettings).first()
session.close()
application_settings = self.session.query(ApplicationSettings).first()
if application_settings.run_setup_wizard:
AppInstaller()

Expand Down
2 changes: 0 additions & 2 deletions src/airunner/app_installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
from airunner.windows.download_wizard.download_wizard_window import DownloadWizardWindow
from airunner.windows.main.settings_mixin import SettingsMixin
from airunner.windows.setup_wizard.setup_wizard_window import SetupWizardWindow
from airunner.handlers.logger import Logger


class AppInstaller(
Expand All @@ -43,7 +42,6 @@ def __init__(
self.download_wizard = None
self.app = None
self.close_on_cancel = close_on_cancel
self.logger = Logger(prefix=self.__class__.__name__)

"""
Mediator and Settings mixins are initialized here, enabling the application
Expand Down
24 changes: 0 additions & 24 deletions src/airunner/data/models/database_handler.py

This file was deleted.

Loading