Skip to content

Commit

Permalink
Merge pull request #949 from Capsize-Games/devastator
Browse files Browse the repository at this point in the history
Devastator
  • Loading branch information
w4ffl35 authored Oct 23, 2024
2 parents 799f375 + 3785fc2 commit 1e96bb4
Show file tree
Hide file tree
Showing 47 changed files with 881 additions and 1,316 deletions.
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

0 comments on commit 1e96bb4

Please sign in to comment.