Skip to content

Commit

Permalink
Merge pull request #972 from Capsize-Games/devastator
Browse files Browse the repository at this point in the history
Devastator
  • Loading branch information
w4ffl35 authored Dec 1, 2024
2 parents 5ea69d4 + 476dc33 commit fcf40db
Show file tree
Hide file tree
Showing 21 changed files with 204 additions and 205 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.1.5",
version="3.1.6",
author="Capsize LLC",
description="A Stable Diffusion GUI",
long_description=open("README.md", "r", encoding="utf-8").read(),
Expand Down
357 changes: 179 additions & 178 deletions src/airunner/handlers/llm/agent/base_agent.py

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
Expand Up @@ -366,11 +366,10 @@ def _load_model_local(self):
if config:
params["quantization_config"] = config
try:
with torch.no_grad():
self._model = self.auto_class_.from_pretrained(
path,
**params
)
self._model = self.auto_class_.from_pretrained(
path,
**params
)
except Exception as e:
self.logger.error(f"Error loading model: {e}")
self._model = None
Expand Down
6 changes: 3 additions & 3 deletions src/airunner/handlers/stablediffusion/sd_handler.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,9 +36,9 @@
from airunner.handlers.stablediffusion.prompt_weight_bridge import PromptWeightBridge
from airunner.settings import MIN_NUM_INFERENCE_STEPS_IMG2IMG
from airunner.utils.clear_memory import clear_memory
from airunner.utils.convert_binary_to_image import convert_binary_to_image
from airunner.utils.convert_image_to_binary import convert_image_to_binary
from airunner.utils.export_image import export_images
from airunner.utils.image.convert_binary_to_image import convert_binary_to_image
from airunner.utils.image.convert_image_to_binary import convert_image_to_binary
from airunner.utils.image.export_image import export_images
from airunner.utils.get_torch_device import get_torch_device

SKIP_RELOAD_CONSTS = (
Expand Down
Empty file.
File renamed without changes.
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from PIL.ImageQt import QPixmap

from airunner.utils.convert_pil_to_qimage import pil_to_qimage
from airunner.utils.image.convert_pil_to_qimage import pil_to_qimage


def convert_pil_to_qpixmap(image):
Expand Down
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions src/airunner/widgets/canvas/brush_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@

from airunner.data.models.settings_models import DrawingPadSettings
from airunner.enums import SignalCode, CanvasToolName
from airunner.utils.convert_binary_to_image import convert_binary_to_image
from airunner.utils.convert_image_to_binary import convert_image_to_binary
from airunner.utils.image.convert_binary_to_image import convert_binary_to_image
from airunner.utils.image.convert_image_to_binary import convert_image_to_binary
from airunner.widgets.canvas.custom_scene import CustomScene


Expand Down
6 changes: 3 additions & 3 deletions src/airunner/widgets/canvas/custom_scene.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,10 +14,10 @@
from airunner.mediator_mixin import MediatorMixin
from airunner.settings import VALID_IMAGE_FILES
from airunner.utils import platform_info
from airunner.utils.export_image import export_image
from airunner.utils.image.export_image import export_image
from airunner.utils.snap_to_grid import snap_to_grid
from airunner.utils.convert_binary_to_image import convert_binary_to_image
from airunner.utils.convert_image_to_binary import convert_image_to_binary
from airunner.utils.image.convert_binary_to_image import convert_binary_to_image
from airunner.utils.image.convert_image_to_binary import convert_image_to_binary
from airunner.widgets.canvas.draggables.draggable_pixmap import DraggablePixmap
from airunner.windows.main.settings_mixin import SettingsMixin

Expand Down
2 changes: 1 addition & 1 deletion src/airunner/widgets/canvas/custom_view.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

from airunner.enums import CanvasToolName, SignalCode, CanvasType
from airunner.mediator_mixin import MediatorMixin
from airunner.utils.convert_image_to_binary import convert_image_to_binary
from airunner.utils.image.convert_image_to_binary import convert_image_to_binary
from airunner.utils.snap_to_grid import snap_to_grid
from airunner.widgets.canvas.brush_scene import BrushScene
from airunner.widgets.canvas.custom_scene import CustomScene
Expand Down
5 changes: 2 additions & 3 deletions src/airunner/widgets/canvas/input_image.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,10 +7,9 @@
from PySide6.QtGui import QPixmap, QImage, Qt, QPen
from PySide6.QtWidgets import QGraphicsScene

from airunner.enums import SignalCode
from airunner.settings import VALID_IMAGE_FILES
from airunner.utils.convert_binary_to_image import convert_binary_to_image
from airunner.utils.convert_image_to_binary import convert_image_to_binary
from airunner.utils.image.convert_binary_to_image import convert_binary_to_image
from airunner.utils.image.convert_image_to_binary import convert_image_to_binary
from airunner.widgets.base_widget import BaseWidget
from airunner.widgets.canvas.templates.input_image_ui import Ui_input_image

Expand Down
4 changes: 2 additions & 2 deletions src/airunner/widgets/image/image_widget.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
from PIL import Image
from PIL.ImageQt import ImageQt
from airunner.enums import SignalCode, CanvasToolName
from airunner.utils.load_metadata_from_image import load_metadata_from_image
from airunner.utils.delete_image import delete_image
from airunner.utils.image.load_metadata_from_image import load_metadata_from_image
from airunner.utils.image.delete_image import delete_image
from airunner.widgets.base_widget import BaseWidget
from airunner.widgets.image.templates.image_widget_ui import Ui_image_widget
from PySide6.QtGui import QDrag
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def on_models_changed_signal(self):
self._load_pipelines()
self.load_versions()
self.load_models()
self.load_schedulers()
self.load_schedulers_dropdown()
except RuntimeError as e:
self.logger.error(f"Error loading models: {e}")

Expand Down Expand Up @@ -190,7 +190,7 @@ def load_models(self):
self.ui.model.setCurrentIndex(index)
self.ui.model.blockSignals(False)

def load_schedulers(self):
def load_schedulers_dropdown(self):
self.ui.scheduler.blockSignals(True)
scheduler_names = [s.display_name for s in self.schedulers]
self.ui.scheduler.clear()
Expand Down
2 changes: 1 addition & 1 deletion src/airunner/windows/main/main_window.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
VULNERABILITY_REPORT_LINK
)
from airunner.styles_mixin import StylesMixin
from airunner.utils.convert_image_to_binary import convert_image_to_binary
from airunner.utils.image.convert_image_to_binary import convert_image_to_binary
from airunner.utils.create_worker import create_worker
from airunner.workers.audio_capture_worker import AudioCaptureWorker
from airunner.workers.audio_processor_worker import AudioProcessorWorker
Expand Down
2 changes: 1 addition & 1 deletion src/airunner/windows/main/settings_mixin.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
LLMGeneratorSettings, TTSSettings, SpeechT5Settings, EspeakSettings, STTSettings, BrushSettings, GridSettings, \
MemorySettings, Message, Conversation, Summary, ImageFilterValue, TargetFiles, WhisperSettings, Base, User
from airunner.enums import SignalCode
from airunner.utils.convert_binary_to_image import convert_binary_to_image
from airunner.utils.image.convert_binary_to_image import convert_binary_to_image


class SettingsMixinSharedInstance:
Expand Down
4 changes: 2 additions & 2 deletions src/airunner/workers/mask_generator_worker.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import numpy as np
from PIL import Image, ImageDraw
from PIL import Image
from PySide6.QtCore import QRect
from airunner.enums import SignalCode
from airunner.utils.convert_binary_to_image import convert_binary_to_image
from airunner.utils.image.convert_binary_to_image import convert_binary_to_image
from airunner.workers.worker import Worker


Expand Down

0 comments on commit fcf40db

Please sign in to comment.