diff --git a/src/airunner/widgets/canvas_plus/standard_image_widget.py b/src/airunner/widgets/canvas_plus/standard_image_widget.py index 64960656a..845e9b017 100644 --- a/src/airunner/widgets/canvas_plus/standard_image_widget.py +++ b/src/airunner/widgets/canvas_plus/standard_image_widget.py @@ -2,23 +2,18 @@ from PyQt6.QtWidgets import QLabel from PyQt6.QtGui import QPixmap from PyQt6.QtWidgets import QVBoxLayout -from PyQt6.QtWidgets import QTableWidgetItem -from PyQt6.QtWidgets import QApplication from PyQt6.QtWidgets import QDialog from PyQt6.QtGui import QImage from PIL import Image -from PIL.ImageQt import ImageQt -from PIL.PngImagePlugin import PngInfo from airunner.utils import get_session from airunner.data.models import AIModel from airunner.widgets.canvas_plus.standard_base_widget import StandardBaseWidget from airunner.widgets.canvas_plus.templates.standard_image_widget_ui import Ui_standard_image_widget -from airunner.utils import delete_image, load_metadata_from_image, prepare_metadata -from airunner.settings import CONTROLNET_OPTIONS +from airunner.utils import load_metadata_from_image, prepare_metadata from airunner.widgets.slider.slider_widget import SliderWidget -from airunner.data.models import ActionScheduler, Pipeline, GeneratorSetting +from airunner.data.models import ActionScheduler, Pipeline class StandardImageWidget(StandardBaseWidget): diff --git a/src/airunner/widgets/controlnet_settings/controlnet_settings_widget.py b/src/airunner/widgets/controlnet_settings/controlnet_settings_widget.py index 0222dad8f..cab521dfd 100644 --- a/src/airunner/widgets/controlnet_settings/controlnet_settings_widget.py +++ b/src/airunner/widgets/controlnet_settings/controlnet_settings_widget.py @@ -1,14 +1,11 @@ import os -from functools import partial from PIL import Image from PyQt6.QtCore import pyqtSlot -from PyQt6.QtWidgets import QComboBox, QWidget, QHBoxLayout from airunner.utils import image_to_pixmap, auto_export_image, open_file_path from airunner.widgets.controlnet_settings.templates.controlnet_settings_ui import Ui_controlnet_settings from airunner.widgets.input_image.input_image_settings_widget import InputImageSettingsWidget -from airunner.widgets.slider.slider_widget import SliderWidget from airunner.settings import CONTROLNET_OPTIONS diff --git a/src/airunner/widgets/embeddings/embeddings_container_widget.py b/src/airunner/widgets/embeddings/embeddings_container_widget.py index bd24eb442..b11e4a11c 100644 --- a/src/airunner/widgets/embeddings/embeddings_container_widget.py +++ b/src/airunner/widgets/embeddings/embeddings_container_widget.py @@ -5,7 +5,7 @@ from airunner.aihandler.enums import MessageCode from airunner.data.models import Embedding -from airunner.utils import get_session, save_session +from airunner.utils import get_session from airunner.widgets.base_widget import BaseWidget from airunner.widgets.embeddings.embedding_widget import EmbeddingWidget from airunner.widgets.embeddings.templates.embeddings_container_ui import Ui_embeddings_container diff --git a/src/airunner/widgets/generator_form/generator_tab_widget.py b/src/airunner/widgets/generator_form/generator_tab_widget.py index 66d274d2b..a949f7a2c 100644 --- a/src/airunner/widgets/generator_form/generator_tab_widget.py +++ b/src/airunner/widgets/generator_form/generator_tab_widget.py @@ -1,5 +1,5 @@ from PyQt6.QtCore import pyqtSignal -from PyQt6.QtWidgets import QWidget, QGridLayout, QProgressBar, QTabWidget +from PyQt6.QtWidgets import QWidget, QGridLayout, QProgressBar from airunner.widgets.base_widget import BaseWidget from airunner.widgets.generator_form.templates.generator_tab_ui import Ui_generator_tab diff --git a/src/airunner/widgets/image/image_widget.py b/src/airunner/widgets/image/image_widget.py index 2e7a0c91b..8336a338e 100644 --- a/src/airunner/widgets/image/image_widget.py +++ b/src/airunner/widgets/image/image_widget.py @@ -1,11 +1,8 @@ -import os import json from PyQt6.QtGui import QPixmap from PyQt6.QtWidgets import QLabel from PyQt6.QtCore import Qt -from PyQt6.QtWidgets import QVBoxLayout -from PyQt6.QtWidgets import QDialog from PyQt6.QtCore import pyqtSignal from PyQt6.QtWidgets import QMenu from PyQt6.QtWidgets import QMessageBox @@ -18,7 +15,6 @@ from airunner.utils import delete_image from airunner.widgets.base_widget import BaseWidget from airunner.widgets.image.templates.image_widget_ui import Ui_image_widget -from airunner.aihandler.logger import Logger from PyQt6.QtGui import QDrag from PyQt6.QtCore import QMimeData from PyQt6.QtCore import QByteArray diff --git a/src/airunner/widgets/input_image/input_image_settings_widget.py b/src/airunner/widgets/input_image/input_image_settings_widget.py index 0558e51c9..48f41cfd2 100644 --- a/src/airunner/widgets/input_image/input_image_settings_widget.py +++ b/src/airunner/widgets/input_image/input_image_settings_widget.py @@ -1,12 +1,9 @@ -from functools import partial - from PIL import Image from PyQt6.QtGui import QIcon from PyQt6.QtWidgets import QHBoxLayout, QWidget -from airunner.utils import get_session, image_to_pixmap +from airunner.utils import image_to_pixmap from airunner.widgets.input_image.templates.input_image_ui import Ui_input_image -from airunner.widgets.slider.slider_widget import SliderWidget from airunner.widgets.base_widget import BaseWidget diff --git a/src/airunner/widgets/layers/layer_widget.py b/src/airunner/widgets/layers/layer_widget.py index 5a5067329..b648fb5fd 100644 --- a/src/airunner/widgets/layers/layer_widget.py +++ b/src/airunner/widgets/layers/layer_widget.py @@ -4,7 +4,6 @@ from PyQt6.QtCore import Qt, QPoint from airunner.widgets.base_widget import BaseWidget -from airunner.widgets.layers.layer_image_widget import LayerImageWidget from airunner.widgets.layers.templates.layer_ui import Ui_LayerWidget from airunner.utils import get_session, image_to_pixmap diff --git a/src/airunner/widgets/model_manager/model_manager_widget.py b/src/airunner/widgets/model_manager/model_manager_widget.py index bedfccf3a..4e9a6dbc1 100644 --- a/src/airunner/widgets/model_manager/model_manager_widget.py +++ b/src/airunner/widgets/model_manager/model_manager_widget.py @@ -1,11 +1,5 @@ -import os -import threading - -from PyQt6 import QtGui -from PyQt6 import uic from PyQt6.QtWidgets import QFileDialog -from airunner.aihandler.download_civitai import DownloadCivitAI from airunner.models.modeldata import ModelData from airunner.widgets.base_widget import BaseWidget from airunner.widgets.model_manager.templates.model_manager_ui import Ui_model_manager diff --git a/src/airunner/widgets/prompt_builder/prompt_builder_form_widget.py b/src/airunner/widgets/prompt_builder/prompt_builder_form_widget.py index 9001c0f86..2959d6638 100644 --- a/src/airunner/widgets/prompt_builder/prompt_builder_form_widget.py +++ b/src/airunner/widgets/prompt_builder/prompt_builder_form_widget.py @@ -6,7 +6,7 @@ from airunner.widgets.base_widget import BaseWidget from airunner.widgets.prompt_builder.templates.prompt_builder_form_ui import Ui_prompt_builder_form -from airunner.data.models import PromptVariableCategory, PromptCategory, PromptVariableCategoryWeight, PromptVariable, Prompt +from airunner.data.models import PromptVariableCategory, PromptCategory, PromptVariable, Prompt from airunner.utils import get_session class PromptBuilderForm(BaseWidget): diff --git a/src/airunner/widgets/prompt_builder/prompt_builder_widget.py b/src/airunner/widgets/prompt_builder/prompt_builder_widget.py index fd6ef0d17..3bbf0c3db 100644 --- a/src/airunner/widgets/prompt_builder/prompt_builder_widget.py +++ b/src/airunner/widgets/prompt_builder/prompt_builder_widget.py @@ -2,7 +2,7 @@ from airunner.aihandler.settings import MAX_SEED from airunner.data.db import session -from airunner.data.models import TabSection, PromptBuilder, PromptCategory, PromptStyle, Prompt +from airunner.data.models import TabSection, PromptBuilder from airunner.utils import save_session from airunner.widgets.base_widget import BaseWidget from airunner.widgets.prompt_builder.prompt_builder_form_widget import PromptBuilderForm diff --git a/src/airunner/widgets/slider/slider_widget.py b/src/airunner/widgets/slider/slider_widget.py index 153acec0b..dcd7c9b1f 100644 --- a/src/airunner/widgets/slider/slider_widget.py +++ b/src/airunner/widgets/slider/slider_widget.py @@ -1,8 +1,5 @@ -from functools import partial - from PyQt6.QtCore import Qt from PyQt6.QtWidgets import QLabel -from PyQt6.QtCore import QTimer from airunner.widgets.base_widget import BaseWidget from airunner.widgets.slider.templates.slider_ui import Ui_slider_widget diff --git a/src/airunner/widgets/status/status_widget.py b/src/airunner/widgets/status/status_widget.py index 462c5b04c..c7a4a52b6 100644 --- a/src/airunner/widgets/status/status_widget.py +++ b/src/airunner/widgets/status/status_widget.py @@ -1,7 +1,6 @@ import psutil import torch -from airunner.aihandler.enums import Mode from airunner.widgets.base_widget import BaseWidget from airunner.widgets.status.templates.status_ui import Ui_status_widget diff --git a/src/airunner/windows/main/main_window.py b/src/airunner/windows/main/main_window.py index f80793fc1..fc6356c68 100644 --- a/src/airunner/windows/main/main_window.py +++ b/src/airunner/windows/main/main_window.py @@ -7,12 +7,11 @@ from functools import partial from PyQt6 import uic, QtCore -from PyQt6.QtCore import pyqtSlot, Qt, QThread, pyqtSignal, QObject, QTimer +from PyQt6.QtCore import pyqtSlot, Qt, pyqtSignal, QTimer from PyQt6.QtGui import QGuiApplication from PyQt6.QtWidgets import QApplication, QFileDialog, QMainWindow, QWidget, QSpacerItem, QSizePolicy from PyQt6.QtCore import Qt from PyQt6 import QtGui -from PyQt6.QtCore import QEvent from PyQt6.QtCore import QTimer from airunner.resources_light_rc import * diff --git a/src/airunner/windows/theme_editor.py b/src/airunner/windows/theme_editor.py index 294ddd3cb..5f8fa8182 100644 --- a/src/airunner/windows/theme_editor.py +++ b/src/airunner/windows/theme_editor.py @@ -1,5 +1,4 @@ from PyQt6 import uic -from PyQt6.QtWidgets import QWidget, QVBoxLayout from airunner.windows.base_window import BaseWindow