diff --git a/invokeai/app/invocations/ip_adapter.py b/invokeai/app/invocations/ip_adapter.py index 9857054b47..bf15115ed8 100644 --- a/invokeai/app/invocations/ip_adapter.py +++ b/invokeai/app/invocations/ip_adapter.py @@ -16,9 +16,7 @@ from invokeai.app.invocations.baseinvocation import ( ) from invokeai.app.invocations.primitives import ImageField from invokeai.backend.model_management.models.base import BaseModelType, ModelType -from invokeai.backend.model_management.models.ip_adapter import ( - get_ip_adapter_image_encoder_model_id, -) +from invokeai.backend.model_management.models.ip_adapter import get_ip_adapter_image_encoder_model_id class IPAdapterModelField(BaseModel): diff --git a/invokeai/app/invocations/latent.py b/invokeai/app/invocations/latent.py index 89912f9864..da7b819038 100644 --- a/invokeai/app/invocations/latent.py +++ b/invokeai/app/invocations/latent.py @@ -35,10 +35,7 @@ from invokeai.app.util.controlnet_utils import prepare_control_image from invokeai.app.util.step_callback import stable_diffusion_step_callback from invokeai.backend.ip_adapter.ip_adapter import IPAdapter, IPAdapterPlus from invokeai.backend.model_management.models import ModelType, SilenceWarnings -from invokeai.backend.stable_diffusion.diffusion.conditioning_data import ( - ConditioningData, - IPAdapterConditioningInfo, -) +from invokeai.backend.stable_diffusion.diffusion.conditioning_data import ConditioningData, IPAdapterConditioningInfo from ...backend.model_management.lora import ModelPatcher from ...backend.model_management.models import BaseModelType @@ -50,9 +47,7 @@ from ...backend.stable_diffusion.diffusers_pipeline import ( StableDiffusionGeneratorPipeline, image_resized_to_grid_as_tensor, ) -from ...backend.stable_diffusion.diffusion.shared_invokeai_diffusion import ( - PostprocessingSettings, -) +from ...backend.stable_diffusion.diffusion.shared_invokeai_diffusion import PostprocessingSettings from ...backend.stable_diffusion.schedulers import SCHEDULER_MAP from ...backend.util.devices import choose_precision, choose_torch_device from ..models.image import ImageCategory, ResourceOrigin diff --git a/invokeai/app/invocations/onnx.py b/invokeai/app/invocations/onnx.py index c73221f8a0..4c7fab44d8 100644 --- a/invokeai/app/invocations/onnx.py +++ b/invokeai/app/invocations/onnx.py @@ -13,12 +13,7 @@ from pydantic import BaseModel, Field, validator from tqdm import tqdm from invokeai.app.invocations.metadata import CoreMetadata -from invokeai.app.invocations.primitives import ( - ConditioningField, - ConditioningOutput, - ImageField, - ImageOutput, -) +from invokeai.app.invocations.primitives import ConditioningField, ConditioningOutput, ImageField, ImageOutput from invokeai.app.util.step_callback import stable_diffusion_step_callback from invokeai.backend import BaseModelType, ModelType, SubModelType @@ -40,13 +35,7 @@ from .baseinvocation import ( invocation_output, ) from .controlnet_image_processors import ControlField -from .latent import ( - SAMPLER_NAME_VALUES, - LatentsField, - LatentsOutput, - build_latents_output, - get_scheduler, -) +from .latent import SAMPLER_NAME_VALUES, LatentsField, LatentsOutput, build_latents_output, get_scheduler from .model import ClipField, ModelInfo, UNetField, VaeField ORT_TO_NP_TYPE = { diff --git a/invokeai/backend/ip_adapter/attention_processor.py b/invokeai/backend/ip_adapter/attention_processor.py index b2876620cd..f9854c978c 100644 --- a/invokeai/backend/ip_adapter/attention_processor.py +++ b/invokeai/backend/ip_adapter/attention_processor.py @@ -7,9 +7,7 @@ import torch import torch.nn as nn import torch.nn.functional as F from diffusers.models.attention_processor import AttnProcessor as DiffusersAttnProcessor -from diffusers.models.attention_processor import ( - AttnProcessor2_0 as DiffusersAttnProcessor2_0, -) +from diffusers.models.attention_processor import AttnProcessor2_0 as DiffusersAttnProcessor2_0 # Create versions of AttnProcessor and AttnProcessor2_0 that are sub-classes of nn.Module. This is required for diff --git a/invokeai/backend/model_management/models/ip_adapter.py b/invokeai/backend/model_management/models/ip_adapter.py index 208d5e7c4d..8e1e97c9e0 100644 --- a/invokeai/backend/model_management/models/ip_adapter.py +++ b/invokeai/backend/model_management/models/ip_adapter.py @@ -5,11 +5,7 @@ from typing import Literal, Optional import torch -from invokeai.backend.ip_adapter.ip_adapter import ( - IPAdapter, - IPAdapterPlus, - build_ip_adapter, -) +from invokeai.backend.ip_adapter.ip_adapter import IPAdapter, IPAdapterPlus, build_ip_adapter from invokeai.backend.model_management.models.base import ( BaseModelType, InvalidModelException,