From 848159352c8db58a37cc8f344fb8efc70cd23a57 Mon Sep 17 00:00:00 2001 From: w4ffl35 <25737761+w4ffl35@users.noreply.github.com> Date: Sat, 26 Oct 2024 15:17:31 -0600 Subject: [PATCH 1/4] move image util functions to utils/image for better organization --- src/airunner/handlers/stablediffusion/sd_handler.py | 6 +++--- src/airunner/utils/image/__init__.py | 0 src/airunner/utils/{ => image}/convert_binary_to_image.py | 0 src/airunner/utils/{ => image}/convert_image_to_binary.py | 0 src/airunner/utils/{ => image}/convert_pil_to_qimage.py | 0 src/airunner/utils/{ => image}/convert_pil_to_qpixmap.py | 2 +- src/airunner/utils/{ => image}/delete_image.py | 0 src/airunner/utils/{ => image}/export_image.py | 0 src/airunner/utils/{ => image}/load_metadata_from_image.py | 0 src/airunner/widgets/canvas/brush_scene.py | 4 ++-- src/airunner/widgets/canvas/custom_scene.py | 6 +++--- src/airunner/widgets/canvas/custom_view.py | 2 +- src/airunner/widgets/canvas/input_image.py | 5 ++--- src/airunner/widgets/image/image_widget.py | 4 ++-- src/airunner/windows/main/main_window.py | 2 +- src/airunner/windows/main/settings_mixin.py | 2 +- src/airunner/workers/mask_generator_worker.py | 4 ++-- 17 files changed, 18 insertions(+), 19 deletions(-) create mode 100644 src/airunner/utils/image/__init__.py rename src/airunner/utils/{ => image}/convert_binary_to_image.py (100%) rename src/airunner/utils/{ => image}/convert_image_to_binary.py (100%) rename src/airunner/utils/{ => image}/convert_pil_to_qimage.py (100%) rename src/airunner/utils/{ => image}/convert_pil_to_qpixmap.py (70%) rename src/airunner/utils/{ => image}/delete_image.py (100%) rename src/airunner/utils/{ => image}/export_image.py (100%) rename src/airunner/utils/{ => image}/load_metadata_from_image.py (100%) diff --git a/src/airunner/handlers/stablediffusion/sd_handler.py b/src/airunner/handlers/stablediffusion/sd_handler.py index 9aa042a77..c0c40596d 100644 --- a/src/airunner/handlers/stablediffusion/sd_handler.py +++ b/src/airunner/handlers/stablediffusion/sd_handler.py @@ -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 = ( diff --git a/src/airunner/utils/image/__init__.py b/src/airunner/utils/image/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/airunner/utils/convert_binary_to_image.py b/src/airunner/utils/image/convert_binary_to_image.py similarity index 100% rename from src/airunner/utils/convert_binary_to_image.py rename to src/airunner/utils/image/convert_binary_to_image.py diff --git a/src/airunner/utils/convert_image_to_binary.py b/src/airunner/utils/image/convert_image_to_binary.py similarity index 100% rename from src/airunner/utils/convert_image_to_binary.py rename to src/airunner/utils/image/convert_image_to_binary.py diff --git a/src/airunner/utils/convert_pil_to_qimage.py b/src/airunner/utils/image/convert_pil_to_qimage.py similarity index 100% rename from src/airunner/utils/convert_pil_to_qimage.py rename to src/airunner/utils/image/convert_pil_to_qimage.py diff --git a/src/airunner/utils/convert_pil_to_qpixmap.py b/src/airunner/utils/image/convert_pil_to_qpixmap.py similarity index 70% rename from src/airunner/utils/convert_pil_to_qpixmap.py rename to src/airunner/utils/image/convert_pil_to_qpixmap.py index 927d57a20..e07ad4b25 100644 --- a/src/airunner/utils/convert_pil_to_qpixmap.py +++ b/src/airunner/utils/image/convert_pil_to_qpixmap.py @@ -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): diff --git a/src/airunner/utils/delete_image.py b/src/airunner/utils/image/delete_image.py similarity index 100% rename from src/airunner/utils/delete_image.py rename to src/airunner/utils/image/delete_image.py diff --git a/src/airunner/utils/export_image.py b/src/airunner/utils/image/export_image.py similarity index 100% rename from src/airunner/utils/export_image.py rename to src/airunner/utils/image/export_image.py diff --git a/src/airunner/utils/load_metadata_from_image.py b/src/airunner/utils/image/load_metadata_from_image.py similarity index 100% rename from src/airunner/utils/load_metadata_from_image.py rename to src/airunner/utils/image/load_metadata_from_image.py diff --git a/src/airunner/widgets/canvas/brush_scene.py b/src/airunner/widgets/canvas/brush_scene.py index 584de6627..af2e97159 100644 --- a/src/airunner/widgets/canvas/brush_scene.py +++ b/src/airunner/widgets/canvas/brush_scene.py @@ -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 diff --git a/src/airunner/widgets/canvas/custom_scene.py b/src/airunner/widgets/canvas/custom_scene.py index 9ecca60e7..4f89cc5c3 100644 --- a/src/airunner/widgets/canvas/custom_scene.py +++ b/src/airunner/widgets/canvas/custom_scene.py @@ -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 diff --git a/src/airunner/widgets/canvas/custom_view.py b/src/airunner/widgets/canvas/custom_view.py index e1ec79013..01b237c85 100644 --- a/src/airunner/widgets/canvas/custom_view.py +++ b/src/airunner/widgets/canvas/custom_view.py @@ -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 diff --git a/src/airunner/widgets/canvas/input_image.py b/src/airunner/widgets/canvas/input_image.py index 9432d4637..3c88d5ff8 100644 --- a/src/airunner/widgets/canvas/input_image.py +++ b/src/airunner/widgets/canvas/input_image.py @@ -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 diff --git a/src/airunner/widgets/image/image_widget.py b/src/airunner/widgets/image/image_widget.py index 9e5ed0467..83c5aab53 100644 --- a/src/airunner/widgets/image/image_widget.py +++ b/src/airunner/widgets/image/image_widget.py @@ -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 diff --git a/src/airunner/windows/main/main_window.py b/src/airunner/windows/main/main_window.py index 9f2f7f798..e05fe67e1 100644 --- a/src/airunner/windows/main/main_window.py +++ b/src/airunner/windows/main/main_window.py @@ -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 diff --git a/src/airunner/windows/main/settings_mixin.py b/src/airunner/windows/main/settings_mixin.py index 18ff87c98..caa079bb9 100644 --- a/src/airunner/windows/main/settings_mixin.py +++ b/src/airunner/windows/main/settings_mixin.py @@ -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: diff --git a/src/airunner/workers/mask_generator_worker.py b/src/airunner/workers/mask_generator_worker.py index ba74575bb..171ef6e1b 100644 --- a/src/airunner/workers/mask_generator_worker.py +++ b/src/airunner/workers/mask_generator_worker.py @@ -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 From 0552da6597a783a5c194eefc9e500b92919ac92c Mon Sep 17 00:00:00 2001 From: w4ffl35 <25737761+w4ffl35@users.noreply.github.com> Date: Tue, 19 Nov 2024 07:19:02 -0700 Subject: [PATCH 2/4] Move torch.no_grad to run_with_thread --- src/airunner/handlers/llm/agent/base_agent.py | 357 +++++++++--------- .../llm/causal_lm_transformer_base_handler.py | 9 +- 2 files changed, 183 insertions(+), 183 deletions(-) diff --git a/src/airunner/handlers/llm/agent/base_agent.py b/src/airunner/handlers/llm/agent/base_agent.py index de8e80df0..0da34c40a 100644 --- a/src/airunner/handlers/llm/agent/base_agent.py +++ b/src/airunner/handlers/llm/agent/base_agent.py @@ -548,213 +548,214 @@ def run_with_thread( action: LLMActionType, **kwargs, ): - # Generate the response - self.logger.debug("Generating...") + with torch.no_grad(): + # Generate the response + self.logger.debug("Generating...") - self.emit_signal(SignalCode.UNBLOCK_TTS_GENERATOR_SIGNAL) + self.emit_signal(SignalCode.UNBLOCK_TTS_GENERATOR_SIGNAL) - if self.do_interrupt: - self.do_interrupt = False + if self.do_interrupt: + self.do_interrupt = False - stopping_criteria = ExternalConditionStoppingCriteria(self.do_interrupt_process) - data = self.prepare_generate_data(model_inputs, stopping_criteria) + stopping_criteria = ExternalConditionStoppingCriteria(self.do_interrupt_process) + data = self.prepare_generate_data(model_inputs, stopping_criteria) - data["streamer"] = kwargs.get("streamer", self.streamer) + data["streamer"] = kwargs.get("streamer", self.streamer) - if action is not LLMActionType.PERFORM_RAG_SEARCH: - try: - self.response_worker.add_to_queue({ - "model": self.model, - "kwargs": data, - "prompt": self.prompt, - "botname": self.botname, - }) - except Exception as e: - self.logger.error("545: An error occurred in model.generate:") - self.logger.error(str(e)) - self.logger.error(traceback.format_exc()) - - # strip all new lines from rendered_template: - #self.rendered_template = self.rendered_template.replace("\n", " ") - eos_token = self.tokenizer.eos_token - bos_token = self.tokenizer.bos_token - if self.is_mistral: - self.rendered_template = bos_token + self.rendered_template - skip = True - streamed_template = "" - replaced = False - is_end_of_message = False - is_first_message = True - - if action == LLMActionType.GENERATE_IMAGE: - self.emit_signal( - SignalCode.LLM_TEXT_STREAMED_SIGNAL, - dict( - message="Generating image prompt.\n", - is_first_message=is_first_message, - is_end_of_message=False, - name=self.botname, - action=LLMActionType.CHAT - ) - ) - is_first_message = False - - if action in ( - LLMActionType.CHAT, - LLMActionType.GENERATE_IMAGE, - LLMActionType.UPDATE_MOOD, - LLMActionType.SUMMARIZE, - LLMActionType.APPLICATION_COMMAND - ): - for new_text in self.streamer: - # strip all newlines from new_text - streamed_template += new_text - if self.is_mistral: - streamed_template = streamed_template.replace(f"{bos_token} [INST]", f"{bos_token}[INST]") - streamed_template = streamed_template.replace(" [INST]", " [INST]") - # iterate over every character in rendered_template and - # check if we have the same character in streamed_template - if not replaced: - for i, char in enumerate(self.rendered_template): - try: - if char == streamed_template[i]: - skip = False - else: - skip = True - break - except IndexError: - skip = True - break - if skip: - continue - elif not replaced: - replaced = True - streamed_template = streamed_template.replace(self.rendered_template, "") - else: - if eos_token in new_text: - streamed_template = streamed_template.replace(eos_token, "") - new_text = new_text.replace(eos_token, "") - is_end_of_message = True - # strip botname from new_text - new_text = new_text.replace(f"{self.botname}:", "") - if action in ( - LLMActionType.CHAT, - LLMActionType.PERFORM_RAG_SEARCH, - LLMActionType.GENERATE_IMAGE - ): - self.emit_signal( - SignalCode.LLM_TEXT_STREAMED_SIGNAL, - dict( - message=new_text, - is_first_message=is_first_message, - is_end_of_message=is_end_of_message, - name=self.botname, - action=action - ) - ) - else: - self.emit_signal( - SignalCode.LLM_TEXT_STREAMED_SIGNAL, - dict( - message="", - is_first_message=is_first_message, - is_end_of_message=is_end_of_message, - name=self.botname, - action=action - ) - ) - is_first_message = False - elif action is LLMActionType.PERFORM_RAG_SEARCH: + if action is not LLMActionType.PERFORM_RAG_SEARCH: + try: + self.response_worker.add_to_queue({ + "model": self.model, + "kwargs": data, + "prompt": self.prompt, + "botname": self.botname, + }) + except Exception as e: + self.logger.error("545: An error occurred in model.generate:") + self.logger.error(str(e)) + self.logger.error(traceback.format_exc()) + + # strip all new lines from rendered_template: + #self.rendered_template = self.rendered_template.replace("\n", " ") + eos_token = self.tokenizer.eos_token + bos_token = self.tokenizer.bos_token + if self.is_mistral: + self.rendered_template = bos_token + self.rendered_template + skip = True streamed_template = "" - data = dict( - **self.generator_settings, - stopping_criteria=[stopping_criteria] - ) - data.update(self.override_parameters) - self.llm.generate_kwargs = data - response = self.chat_engine.stream_chat( - message=self.prompt, - system_prompt=self.rendered_template - ) - is_first_message = True + replaced = False is_end_of_message = False - for new_text in response.response_gen: - streamed_template += new_text + is_first_message = True + if action == LLMActionType.GENERATE_IMAGE: self.emit_signal( SignalCode.LLM_TEXT_STREAMED_SIGNAL, dict( - message=" " +new_text, + message="Generating image prompt.\n", is_first_message=is_first_message, - is_end_of_message=is_end_of_message, + is_end_of_message=False, name=self.botname, - action=action + action=LLMActionType.CHAT ) ) is_first_message = False - self.emit_signal( - SignalCode.LLM_TEXT_STREAMED_SIGNAL, - dict( - message="", - is_first_message=False, - is_end_of_message=True, - name=self.botname, - action=action - ) - ) - if streamed_template is not None: if action in ( LLMActionType.CHAT, - LLMActionType.PERFORM_RAG_SEARCH, + LLMActionType.GENERATE_IMAGE, + LLMActionType.UPDATE_MOOD, + LLMActionType.SUMMARIZE, + LLMActionType.APPLICATION_COMMAND ): - self.add_message_to_history( - streamed_template, - LLMChatRole.ASSISTANT - ) - - elif action is LLMActionType.UPDATE_MOOD: - self.bot_mood = streamed_template - return self.run( - prompt=self.prompt, - action=LLMActionType.CHAT, - **kwargs, + for new_text in self.streamer: + # strip all newlines from new_text + streamed_template += new_text + if self.is_mistral: + streamed_template = streamed_template.replace(f"{bos_token} [INST]", f"{bos_token}[INST]") + streamed_template = streamed_template.replace(" [INST]", " [INST]") + # iterate over every character in rendered_template and + # check if we have the same character in streamed_template + if not replaced: + for i, char in enumerate(self.rendered_template): + try: + if char == streamed_template[i]: + skip = False + else: + skip = True + break + except IndexError: + skip = True + break + if skip: + continue + elif not replaced: + replaced = True + streamed_template = streamed_template.replace(self.rendered_template, "") + else: + if eos_token in new_text: + streamed_template = streamed_template.replace(eos_token, "") + new_text = new_text.replace(eos_token, "") + is_end_of_message = True + # strip botname from new_text + new_text = new_text.replace(f"{self.botname}:", "") + if action in ( + LLMActionType.CHAT, + LLMActionType.PERFORM_RAG_SEARCH, + LLMActionType.GENERATE_IMAGE + ): + self.emit_signal( + SignalCode.LLM_TEXT_STREAMED_SIGNAL, + dict( + message=new_text, + is_first_message=is_first_message, + is_end_of_message=is_end_of_message, + name=self.botname, + action=action + ) + ) + else: + self.emit_signal( + SignalCode.LLM_TEXT_STREAMED_SIGNAL, + dict( + message="", + is_first_message=is_first_message, + is_end_of_message=is_end_of_message, + name=self.botname, + action=action + ) + ) + is_first_message = False + elif action is LLMActionType.PERFORM_RAG_SEARCH: + streamed_template = "" + data = dict( + **self.generator_settings, + stopping_criteria=[stopping_criteria] ) - - elif action is LLMActionType.SUMMARIZE: - self._update_conversation_title(streamed_template) - return self.run( - prompt=self.prompt, - action=self._requested_action, - **kwargs, + data.update(self.override_parameters) + self.llm.generate_kwargs = data + response = self.chat_engine.stream_chat( + message=self.prompt, + system_prompt=self.rendered_template ) - - elif action is LLMActionType.GENERATE_IMAGE: + is_first_message = True + is_end_of_message = False + for new_text in response.response_gen: + streamed_template += new_text + + self.emit_signal( + SignalCode.LLM_TEXT_STREAMED_SIGNAL, + dict( + message=" " +new_text, + is_first_message=is_first_message, + is_end_of_message=is_end_of_message, + name=self.botname, + action=action + ) + ) + is_first_message = False self.emit_signal( - SignalCode.LLM_IMAGE_PROMPT_GENERATED_SIGNAL, - { - "message": streamed_template, - "type": "photo" - } + SignalCode.LLM_TEXT_STREAMED_SIGNAL, + dict( + message="", + is_first_message=False, + is_end_of_message=True, + name=self.botname, + action=action + ) ) - elif action is LLMActionType.APPLICATION_COMMAND: - index = ''.join(c for c in streamed_template if c.isdigit()) - try: - index = int(index) - except ValueError: - index = 0 - try: - action = self.available_actions[index] - except KeyError: - action = LLMActionType.CHAT + if streamed_template is not None: + if action in ( + LLMActionType.CHAT, + LLMActionType.PERFORM_RAG_SEARCH, + ): + self.add_message_to_history( + streamed_template, + LLMChatRole.ASSISTANT + ) + + elif action is LLMActionType.UPDATE_MOOD: + self.bot_mood = streamed_template + return self.run( + prompt=self.prompt, + action=LLMActionType.CHAT, + **kwargs, + ) - if action is not None: + elif action is LLMActionType.SUMMARIZE: + self._update_conversation_title(streamed_template) return self.run( prompt=self.prompt, - action=action, + action=self._requested_action, + **kwargs, + ) + + elif action is LLMActionType.GENERATE_IMAGE: + self.emit_signal( + SignalCode.LLM_IMAGE_PROMPT_GENERATED_SIGNAL, + { + "message": streamed_template, + "type": "photo" + } ) - return streamed_template + elif action is LLMActionType.APPLICATION_COMMAND: + index = ''.join(c for c in streamed_template if c.isdigit()) + try: + index = int(index) + except ValueError: + index = 0 + + try: + action = self.available_actions[index] + except KeyError: + action = LLMActionType.CHAT + + if action is not None: + return self.run( + prompt=self.prompt, + action=action, + ) + return streamed_template def get_db_connection(self): return sqlite3.connect('airunner.db') diff --git a/src/airunner/handlers/llm/causal_lm_transformer_base_handler.py b/src/airunner/handlers/llm/causal_lm_transformer_base_handler.py index 5cf51b801..cd954a6ce 100644 --- a/src/airunner/handlers/llm/causal_lm_transformer_base_handler.py +++ b/src/airunner/handlers/llm/causal_lm_transformer_base_handler.py @@ -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 From b4869e365d70d34689ce03c7ca36656d5759c3ee Mon Sep 17 00:00:00 2001 From: w4ffl35 <25737761+w4ffl35@users.noreply.github.com> Date: Sat, 30 Nov 2024 18:35:36 -0700 Subject: [PATCH 3/4] fixes load schedulers --- .../stablediffusion/stable_diffusion_settings_widget.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/airunner/widgets/stablediffusion/stable_diffusion_settings_widget.py b/src/airunner/widgets/stablediffusion/stable_diffusion_settings_widget.py index 60ea48a50..4bfc2f6d9 100644 --- a/src/airunner/widgets/stablediffusion/stable_diffusion_settings_widget.py +++ b/src/airunner/widgets/stablediffusion/stable_diffusion_settings_widget.py @@ -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}") @@ -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() From 476dc33a8fe69649413252d2754eb1106543b64b Mon Sep 17 00:00:00 2001 From: w4ffl35 <25737761+w4ffl35@users.noreply.github.com> Date: Sat, 30 Nov 2024 18:36:23 -0700 Subject: [PATCH 4/4] bump version --- setup.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup.py b/setup.py index 26ad2c511..39553d8ef 100644 --- a/setup.py +++ b/setup.py @@ -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(),