mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
chore: Black linting
This commit is contained in:
parent
b18695df6f
commit
3f8d17d6b7
@ -8,21 +8,27 @@ import numpy as np
|
|||||||
import torch
|
import torch
|
||||||
import torchvision.transforms as T
|
import torchvision.transforms as T
|
||||||
from diffusers.image_processor import VaeImageProcessor
|
from diffusers.image_processor import VaeImageProcessor
|
||||||
from diffusers.models.attention_processor import (AttnProcessor2_0,
|
from diffusers.models.attention_processor import (
|
||||||
LoRAAttnProcessor2_0,
|
AttnProcessor2_0,
|
||||||
LoRAXFormersAttnProcessor,
|
LoRAAttnProcessor2_0,
|
||||||
XFormersAttnProcessor)
|
LoRAXFormersAttnProcessor,
|
||||||
|
XFormersAttnProcessor,
|
||||||
|
)
|
||||||
from diffusers.schedulers import DPMSolverSDEScheduler
|
from diffusers.schedulers import DPMSolverSDEScheduler
|
||||||
from diffusers.schedulers import SchedulerMixin as Scheduler
|
from diffusers.schedulers import SchedulerMixin as Scheduler
|
||||||
from pydantic import validator
|
from pydantic import validator
|
||||||
from torchvision.transforms.functional import resize as tv_resize
|
from torchvision.transforms.functional import resize as tv_resize
|
||||||
|
|
||||||
from invokeai.app.invocations.metadata import CoreMetadata
|
from invokeai.app.invocations.metadata import CoreMetadata
|
||||||
from invokeai.app.invocations.primitives import (DenoiseMaskField,
|
from invokeai.app.invocations.primitives import (
|
||||||
DenoiseMaskOutput, ImageField,
|
DenoiseMaskField,
|
||||||
ImageOutput, LatentsField,
|
DenoiseMaskOutput,
|
||||||
LatentsOutput,
|
ImageField,
|
||||||
build_latents_output)
|
ImageOutput,
|
||||||
|
LatentsField,
|
||||||
|
LatentsOutput,
|
||||||
|
build_latents_output,
|
||||||
|
)
|
||||||
from invokeai.app.util.controlnet_utils import prepare_control_image
|
from invokeai.app.util.controlnet_utils import prepare_control_image
|
||||||
from invokeai.app.util.step_callback import stable_diffusion_step_callback
|
from invokeai.app.util.step_callback import stable_diffusion_step_callback
|
||||||
from invokeai.backend.model_management.models import ModelType, SilenceWarnings
|
from invokeai.backend.model_management.models import ModelType, SilenceWarnings
|
||||||
@ -31,16 +37,16 @@ from ...backend.model_management.lora import ModelPatcher
|
|||||||
from ...backend.model_management.models import BaseModelType
|
from ...backend.model_management.models import BaseModelType
|
||||||
from ...backend.stable_diffusion import PipelineIntermediateState
|
from ...backend.stable_diffusion import PipelineIntermediateState
|
||||||
from ...backend.stable_diffusion.diffusers_pipeline import (
|
from ...backend.stable_diffusion.diffusers_pipeline import (
|
||||||
ConditioningData, ControlNetData, StableDiffusionGeneratorPipeline,
|
ConditioningData,
|
||||||
image_resized_to_grid_as_tensor)
|
ControlNetData,
|
||||||
from ...backend.stable_diffusion.diffusion.shared_invokeai_diffusion import \
|
StableDiffusionGeneratorPipeline,
|
||||||
PostprocessingSettings
|
image_resized_to_grid_as_tensor,
|
||||||
|
)
|
||||||
|
from ...backend.stable_diffusion.diffusion.shared_invokeai_diffusion import PostprocessingSettings
|
||||||
from ...backend.stable_diffusion.schedulers import SCHEDULER_MAP
|
from ...backend.stable_diffusion.schedulers import SCHEDULER_MAP
|
||||||
from ...backend.util.devices import choose_precision, choose_torch_device
|
from ...backend.util.devices import choose_precision, choose_torch_device
|
||||||
from ..models.image import ImageCategory, ResourceOrigin
|
from ..models.image import ImageCategory, ResourceOrigin
|
||||||
from .baseinvocation import (BaseInvocation, FieldDescriptions, Input,
|
from .baseinvocation import BaseInvocation, FieldDescriptions, Input, InputField, InvocationContext, UIType, tags, title
|
||||||
InputField, InvocationContext, UIType, tags,
|
|
||||||
title)
|
|
||||||
from .compel import ConditioningField
|
from .compel import ConditioningField
|
||||||
from .controlnet_image_processors import ControlField
|
from .controlnet_image_processors import ControlField
|
||||||
from .model import ModelInfo, UNetField, VaeField
|
from .model import ModelInfo, UNetField, VaeField
|
||||||
@ -60,11 +66,7 @@ class CreateDenoiseMaskInvocation(BaseInvocation):
|
|||||||
type: Literal["create_denoise_mask"] = "create_denoise_mask"
|
type: Literal["create_denoise_mask"] = "create_denoise_mask"
|
||||||
|
|
||||||
# Inputs
|
# Inputs
|
||||||
vae: VaeField = InputField(
|
vae: VaeField = InputField(description=FieldDescriptions.vae, input=Input.Connection, ui_order=0)
|
||||||
description=FieldDescriptions.vae,
|
|
||||||
input=Input.Connection,
|
|
||||||
ui_order=0
|
|
||||||
)
|
|
||||||
image: Optional[ImageField] = InputField(default=None, description="Image which will be masked", ui_order=1)
|
image: Optional[ImageField] = InputField(default=None, description="Image which will be masked", ui_order=1)
|
||||||
mask: ImageField = InputField(description="The mask to use when pasting", ui_order=2)
|
mask: ImageField = InputField(description="The mask to use when pasting", ui_order=2)
|
||||||
tiled: bool = InputField(default=False, description=FieldDescriptions.tiled, ui_order=3)
|
tiled: bool = InputField(default=False, description=FieldDescriptions.tiled, ui_order=3)
|
||||||
|
Loading…
Reference in New Issue
Block a user