From 67daf1751cf7ef8d64bb34af33685d0a55f2aea4 Mon Sep 17 00:00:00 2001 From: blessedcoolant <54517381+blessedcoolant@users.noreply.github.com> Date: Sat, 10 Feb 2024 04:02:05 +0530 Subject: [PATCH] fix: lint erros --- .../controlnet_image_processors.py | 45 ++++++++++++------- 1 file changed, 30 insertions(+), 15 deletions(-) diff --git a/invokeai/app/invocations/controlnet_image_processors.py b/invokeai/app/invocations/controlnet_image_processors.py index c463286261..722955843c 100644 --- a/invokeai/app/invocations/controlnet_image_processors.py +++ b/invokeai/app/invocations/controlnet_image_processors.py @@ -6,30 +6,45 @@ from typing import Dict, List, Literal, Union import cv2 import numpy as np -from controlnet_aux import (CannyDetector, ContentShuffleDetector, HEDdetector, - LeresDetector, LineartAnimeDetector, - LineartDetector, MediapipeFaceDetector, - MidasDetector, MLSDdetector, NormalBaeDetector, - OpenposeDetector, PidiNetDetector, SamDetector, - ZoeDetector) +from controlnet_aux import ( + CannyDetector, + ContentShuffleDetector, + HEDdetector, + LeresDetector, + LineartAnimeDetector, + LineartDetector, + MediapipeFaceDetector, + MidasDetector, + MLSDdetector, + NormalBaeDetector, + OpenposeDetector, + PidiNetDetector, + SamDetector, + ZoeDetector, +) from controlnet_aux.util import HWC3, ade_palette from PIL import Image -from pydantic import (BaseModel, ConfigDict, Field, field_validator, - model_validator) +from pydantic import BaseModel, ConfigDict, Field, field_validator, model_validator from invokeai.app.invocations.primitives import ImageField, ImageOutput -from invokeai.app.invocations.util import (validate_begin_end_step, - validate_weights) -from invokeai.app.services.image_records.image_records_common import ( - ImageCategory, ResourceOrigin) +from invokeai.app.invocations.util import validate_begin_end_step, validate_weights +from invokeai.app.services.image_records.image_records_common import ImageCategory, ResourceOrigin from invokeai.app.shared.fields import FieldDescriptions from invokeai.backend.image_util.depth_anything import DepthAnythingDetector from invokeai.backend.image_util.dwpose import DWPoseDetector from ...backend.model_management import BaseModelType -from .baseinvocation import (BaseInvocation, BaseInvocationOutput, Input, - InputField, InvocationContext, OutputField, - WithMetadata, invocation, invocation_output) +from .baseinvocation import ( + BaseInvocation, + BaseInvocationOutput, + Input, + InputField, + InvocationContext, + OutputField, + WithMetadata, + invocation, + invocation_output, +) CONTROLNET_MODE_VALUES = Literal["balanced", "more_prompt", "more_control", "unbalanced"] CONTROLNET_RESIZE_VALUES = Literal[