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

remove unused imports #353

Merged
merged 1 commit into from
Jan 9, 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
9 changes: 2 additions & 7 deletions src/airunner/widgets/canvas_plus/standard_image_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
@@ -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


Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/airunner/widgets/image/image_widget.py
Original file line number Diff line number Diff line change
@@ -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
Expand All @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -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


Expand Down
1 change: 0 additions & 1 deletion src/airunner/widgets/layers/layer_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
6 changes: 0 additions & 6 deletions src/airunner/widgets/model_manager/model_manager_widget.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 0 additions & 3 deletions src/airunner/widgets/slider/slider_widget.py
Original file line number Diff line number Diff line change
@@ -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
Expand Down
1 change: 0 additions & 1 deletion src/airunner/widgets/status/status_widget.py
Original file line number Diff line number Diff line change
@@ -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

Expand Down
3 changes: 1 addition & 2 deletions src/airunner/windows/main/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -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 *
Expand Down
1 change: 0 additions & 1 deletion src/airunner/windows/theme_editor.py
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
from PyQt6 import uic
from PyQt6.QtWidgets import QWidget, QVBoxLayout
from airunner.windows.base_window import BaseWindow


Expand Down