Ruff format

This commit is contained in:
Sergey Borisov 2024-07-24 01:17:28 +03:00
parent 19c00241c6
commit 416d29fb83
2 changed files with 4 additions and 2 deletions

View File

@ -17,6 +17,7 @@ class InpaintExt(ExtensionBase):
"""An extension for inpainting with non-inpainting models. See `InpaintModelExt` for inpainting with inpainting """An extension for inpainting with non-inpainting models. See `InpaintModelExt` for inpainting with inpainting
models. models.
""" """
def __init__( def __init__(
self, self,
mask: torch.Tensor, mask: torch.Tensor,
@ -42,7 +43,7 @@ class InpaintExt(ExtensionBase):
@staticmethod @staticmethod
def _is_normal_model(unet: UNet2DConditionModel): 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: The `in_channels` of a UNet vary depending on model type:
- normal - 4 - normal - 4
- depth - 5 - depth - 5

View File

@ -16,6 +16,7 @@ class InpaintModelExt(ExtensionBase):
"""An extension for inpainting with inpainting models. See `InpaintExt` for inpainting with non-inpainting """An extension for inpainting with inpainting models. See `InpaintExt` for inpainting with non-inpainting
models. models.
""" """
def __init__( def __init__(
self, self,
mask: Optional[torch.Tensor], mask: Optional[torch.Tensor],
@ -46,7 +47,7 @@ class InpaintModelExt(ExtensionBase):
@staticmethod @staticmethod
def _is_inpaint_model(unet: UNet2DConditionModel): 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: The `in_channels` of a UNet vary depending on model type:
- normal - 4 - normal - 4
- depth - 5 - depth - 5