full codespell coverage

Signed-off-by: Vladimir Mandic <mandic00@live.com>
This commit is contained in:
Vladimir Mandic
2026-06-04 12:36:10 +02:00
parent 0bfcdabbbb
commit 5e99dee3c2
103 changed files with 264 additions and 254 deletions
+1 -1
View File
@@ -16,7 +16,7 @@ class BaseModel(nn.Module):
"""Called when the training starts
Args:
device (Optional[torch.device], optional): The device to use. Usefull to set
device (Optional[torch.device], optional): The device to use. Useful to set
relevant parameters on the model and embedder to the right device only
once at the start of the training. Defaults to None.
"""
+4 -4
View File
@@ -21,10 +21,10 @@ class BaseConfig:
@classmethod
def from_dict(cls, config_dict: Dict[str, Any]) -> "BaseConfig":
"""Creates a BaseConfig instance from a dictionnary
"""Creates a BaseConfig instance from a dictionary
Args:
config_dict (dict): The Python dictionnary containing all the parameters
config_dict (dict): The Python dictionary containing all the parameters
Returns:
:class:`BaseConfig`: The created instance
@@ -78,10 +78,10 @@ class BaseConfig:
return cls.from_dict(config_dict)
def to_dict(self) -> dict:
"""Transforms object into a Python dictionnary
"""Transforms object into a Python dictionary
Returns:
(dict): The dictionnary containing all the parameters"""
(dict): The dictionary containing all the parameters"""
return asdict(self)
def to_json_string(self):
+5 -5
View File
@@ -84,7 +84,7 @@ class Tiler:
def merge_tiles(
self, tiles: List[List[torch.Tensor]], tiling_method: str = "gaussian"
) -> torch.Tensor:
"""Merge tiles by averaging the overlaping regions
"""Merge tiles by averaging the overlapping regions
Args:
tiles (Dict[str, Tile]): dictionary of processed tiles
tiling_method (str): tiling method. Can be "average", "gaussian" or "linear"
@@ -103,7 +103,7 @@ class Tiler:
)
def _average_merge_tiles(self, tiles: List[List[torch.Tensor]]) -> torch.Tensor:
"""Merge tiles by averaging the overlaping regions
"""Merge tiles by averaging the overlapping regions
Args:
tiles (Dict[str, Tile]): dictionary of processed tiles
Returns:
@@ -149,7 +149,7 @@ class Tiler:
] += 1
# outputs is summed up with this multiplicity
# so we need to divide by the weights wich is either 1, 2 or 4 depending on the region
# so we need to divide by the weights which is either 1, 2 or 4 depending on the region
output = output / weights
return output
@@ -204,7 +204,7 @@ class Tiler:
)
def _gaussian_merge_tiles(self, tiles: List[List[torch.Tensor]]) -> torch.Tensor:
"""Merge tiles by averaging the overlaping regions
"""Merge tiles by averaging the overlapping regions
Args:
List[List[torch.Tensor]]: List of processed tiles
Returns:
@@ -278,7 +278,7 @@ class Tiler:
return b
def _linear_merge_tiles(self, tiles: List[List[torch.Tensor]]) -> torch.Tensor:
"""Merge tiles by blending the overlaping regions
"""Merge tiles by blending the overlapping regions
Args:
tiles (List[List[torch.Tensor]]): List of processed tiles
Returns:
+1 -1
View File
@@ -111,7 +111,7 @@ class DiffusersUNet2DCondWrapper(UNet2DConditionModel):
down_intrablock_additional_residuals_clone = None
# Check diffusers.models.embeddings.py > MultiIPAdapterImageProjectionLayer > forward() for implementation
# Exepected format : List[torch.Tensor] of shape (batch_size, num_image_embeds, embed_dim)
# Expected format : List[torch.Tensor] of shape (batch_size, num_image_embeds, embed_dim)
# with length = number of ip_adapters loaded in the ip_adapter_wrapper
if ip_adapter_cond_embedding is not None:
added_cond_kwargs = {