From fadb295d4dbec37d806d3b8fd922cddb976adbdc Mon Sep 17 00:00:00 2001 From: oobabooga <112222186+oobabooga@users.noreply.github.com> Date: Tue, 19 Dec 2023 21:36:57 -0800 Subject: [PATCH] Lint --- extensions/coqui_tts/script.py | 1 - modules/logging_colors.py | 4 ++-- modules/models.py | 2 +- 3 files changed, 3 insertions(+), 4 deletions(-) diff --git a/extensions/coqui_tts/script.py b/extensions/coqui_tts/script.py index 3b241c58..26d6b76a 100644 --- a/extensions/coqui_tts/script.py +++ b/extensions/coqui_tts/script.py @@ -10,7 +10,6 @@ from TTS.api import TTS from TTS.utils.synthesizer import Synthesizer from modules import chat, shared, ui_chat -from modules.logging_colors import logger from modules.ui import create_refresh_button from modules.utils import gradio diff --git a/modules/logging_colors.py b/modules/logging_colors.py index ba760a2c..b9791e26 100644 --- a/modules/logging_colors.py +++ b/modules/logging_colors.py @@ -27,10 +27,10 @@ def setup_logging(): def get(self): return self.buffer - from rich.theme import Theme - from rich.logging import RichHandler from rich.console import Console + from rich.logging import RichHandler from rich.pretty import install as pretty_install + from rich.theme import Theme from rich.traceback import install as traceback_install level = logging.DEBUG diff --git a/modules/models.py b/modules/models.py index 70316952..cad6a165 100644 --- a/modules/models.py +++ b/modules/models.py @@ -414,8 +414,8 @@ def ExLlamav2_HF_loader(model_name): def HQQ_loader(model_name): try: + from hqq.core.quantize import HQQBackend, HQQLinear from hqq.engine.hf import HQQModelForCausalLM - from hqq.core.quantize import HQQLinear, HQQBackend except ModuleNotFoundError: logger.error("HQQ is not installed. You can install it with:\n\npip install hqq") return None