From e92a35584fad9429249521622e656f15c76c1c08 Mon Sep 17 00:00:00 2001 From: tazlin Date: Fri, 29 Mar 2024 13:11:43 -0400 Subject: [PATCH] style: fix --- convert_config_to_env.py | 1 + horde_worker_regen/bridge_data/load_config.py | 2 +- horde_worker_regen/download_models.py | 2 +- horde_worker_regen/process_management/main_entry_point.py | 1 + horde_worker_regen/process_management/process_manager.py | 6 +++--- horde_worker_regen/run_worker.py | 2 +- tests/test_bridge_data.py | 2 +- 7 files changed, 9 insertions(+), 7 deletions(-) diff --git a/convert_config_to_env.py b/convert_config_to_env.py index d6c738f4..c0712c60 100644 --- a/convert_config_to_env.py +++ b/convert_config_to_env.py @@ -12,6 +12,7 @@ import argparse from horde_model_reference.model_reference_manager import ModelReferenceManager + from horde_worker_regen.bridge_data.load_config import BridgeDataLoader, ConfigFormat diff --git a/horde_worker_regen/bridge_data/load_config.py b/horde_worker_regen/bridge_data/load_config.py index 56eced63..6da41d6d 100644 --- a/horde_worker_regen/bridge_data/load_config.py +++ b/horde_worker_regen/bridge_data/load_config.py @@ -6,13 +6,13 @@ from enum import auto from pathlib import Path +from horde_model_reference.model_reference_manager import ModelReferenceManager from horde_sdk.ai_horde_api.ai_horde_clients import AIHordeAPIManualClient from horde_sdk.ai_horde_worker.model_meta import ImageModelLoadResolver from loguru import logger from ruamel.yaml import YAML from strenum import StrEnum -from horde_model_reference.model_reference_manager import ModelReferenceManager from horde_worker_regen.bridge_data import AIWORKER_REGEN_PREFIX from horde_worker_regen.bridge_data.data_model import reGenBridgeData diff --git a/horde_worker_regen/download_models.py b/horde_worker_regen/download_models.py index a4b5cc2e..0f0cdbc1 100644 --- a/horde_worker_regen/download_models.py +++ b/horde_worker_regen/download_models.py @@ -12,9 +12,9 @@ def download_all_models( if not load_config_from_env_vars: load_env_vars_from_config() + from horde_model_reference.model_reference_manager import ModelReferenceManager from loguru import logger - from horde_model_reference.model_reference_manager import ModelReferenceManager from horde_worker_regen.bridge_data.load_config import BridgeDataLoader, reGenBridgeData from horde_worker_regen.consts import BRIDGE_CONFIG_FILENAME diff --git a/horde_worker_regen/process_management/main_entry_point.py b/horde_worker_regen/process_management/main_entry_point.py index 65d3cadc..73051216 100644 --- a/horde_worker_regen/process_management/main_entry_point.py +++ b/horde_worker_regen/process_management/main_entry_point.py @@ -1,6 +1,7 @@ from multiprocessing.context import BaseContext from horde_model_reference.model_reference_manager import ModelReferenceManager + from horde_worker_regen.bridge_data.data_model import reGenBridgeData from horde_worker_regen.process_management.process_manager import HordeWorkerProcessManager diff --git a/horde_worker_regen/process_management/process_manager.py b/horde_worker_regen/process_management/process_manager.py index f7f6633d..b49a4341 100644 --- a/horde_worker_regen/process_management/process_manager.py +++ b/horde_worker_regen/process_management/process_manager.py @@ -26,6 +26,9 @@ import psutil import yarl from aiohttp import ClientSession +from horde_model_reference.meta_consts import MODEL_REFERENCE_CATEGORY, STABLE_DIFFUSION_BASELINE_CATEGORY +from horde_model_reference.model_reference_manager import ModelReferenceManager +from horde_model_reference.model_reference_records import StableDiffusion_ModelReference from horde_sdk import RequestErrorResponse from horde_sdk.ai_horde_api import GENERATION_STATE from horde_sdk.ai_horde_api.ai_horde_clients import AIHordeAPIAsyncClientSession, AIHordeAPIAsyncSimpleClient @@ -44,9 +47,6 @@ from typing_extensions import override import horde_worker_regen -from horde_model_reference.meta_consts import MODEL_REFERENCE_CATEGORY, STABLE_DIFFUSION_BASELINE_CATEGORY -from horde_model_reference.model_reference_manager import ModelReferenceManager -from horde_model_reference.model_reference_records import StableDiffusion_ModelReference from horde_worker_regen.bridge_data.data_model import reGenBridgeData from horde_worker_regen.bridge_data.load_config import BridgeDataLoader from horde_worker_regen.consts import ( diff --git a/horde_worker_regen/run_worker.py b/horde_worker_regen/run_worker.py index 9515a320..68d9c6c9 100644 --- a/horde_worker_regen/run_worker.py +++ b/horde_worker_regen/run_worker.py @@ -14,9 +14,9 @@ def main(ctx: BaseContext, load_from_env_vars: bool = False) -> None: """Check for a valid config and start the driver ('main') process for the reGen worker.""" + from horde_model_reference.model_reference_manager import ModelReferenceManager from pydantic import ValidationError - from horde_model_reference.model_reference_manager import ModelReferenceManager from horde_worker_regen.bridge_data.load_config import BridgeDataLoader, reGenBridgeData from horde_worker_regen.consts import BRIDGE_CONFIG_FILENAME from horde_worker_regen.process_management.main_entry_point import start_working diff --git a/tests/test_bridge_data.py b/tests/test_bridge_data.py index 4a24551c..8218e6f7 100644 --- a/tests/test_bridge_data.py +++ b/tests/test_bridge_data.py @@ -2,10 +2,10 @@ import pathlib import pytest +from horde_model_reference.model_reference_manager import ModelReferenceManager from horde_sdk.generic_api.consts import ANON_API_KEY from ruamel.yaml import YAML -from horde_model_reference.model_reference_manager import ModelReferenceManager from horde_worker_regen.bridge_data.data_model import reGenBridgeData from horde_worker_regen.bridge_data.load_config import BridgeDataLoader, ConfigFormat