From 416d29fb839ecdae932e8f9a0907fd04fb5449ca Mon Sep 17 00:00:00 2001 From: Sergey Borisov Date: Wed, 24 Jul 2024 01:17:28 +0300 Subject: [PATCH] Ruff format --- invokeai/backend/stable_diffusion/extensions/inpaint.py | 3 ++- invokeai/backend/stable_diffusion/extensions/inpaint_model.py | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/invokeai/backend/stable_diffusion/extensions/inpaint.py b/invokeai/backend/stable_diffusion/extensions/inpaint.py index 6bf155b44f..7bdd9238df 100644 --- a/invokeai/backend/stable_diffusion/extensions/inpaint.py +++ b/invokeai/backend/stable_diffusion/extensions/inpaint.py @@ -17,6 +17,7 @@ class InpaintExt(ExtensionBase): """An extension for inpainting with non-inpainting models. See `InpaintModelExt` for inpainting with inpainting models. """ + def __init__( self, mask: torch.Tensor, @@ -42,7 +43,7 @@ class InpaintExt(ExtensionBase): @staticmethod def _is_normal_model(unet: UNet2DConditionModel): - """ Checks if the provided UNet belongs to a regular model. + """Checks if the provided UNet belongs to a regular model. The `in_channels` of a UNet vary depending on model type: - normal - 4 - depth - 5 diff --git a/invokeai/backend/stable_diffusion/extensions/inpaint_model.py b/invokeai/backend/stable_diffusion/extensions/inpaint_model.py index e1cadb0a2e..4a89f8223f 100644 --- a/invokeai/backend/stable_diffusion/extensions/inpaint_model.py +++ b/invokeai/backend/stable_diffusion/extensions/inpaint_model.py @@ -16,6 +16,7 @@ class InpaintModelExt(ExtensionBase): """An extension for inpainting with inpainting models. See `InpaintExt` for inpainting with non-inpainting models. """ + def __init__( self, mask: Optional[torch.Tensor], @@ -46,7 +47,7 @@ class InpaintModelExt(ExtensionBase): @staticmethod def _is_inpaint_model(unet: UNet2DConditionModel): - """ Checks if the provided UNet belongs to a regular model. + """Checks if the provided UNet belongs to a regular model. The `in_channels` of a UNet vary depending on model type: - normal - 4 - depth - 5