diff --git a/src/refiners/fluxion/utils.py b/src/refiners/fluxion/utils.py index 2b4fcc9..b0d83c5 100644 --- a/src/refiners/fluxion/utils.py +++ b/src/refiners/fluxion/utils.py @@ -1,4 +1,4 @@ -from typing import Dict, Iterable, Literal, TypeVar +from typing import Iterable, Literal, TypeVar from PIL import Image from numpy import array, float32 from pathlib import Path @@ -34,10 +34,6 @@ def interpolate(x: Tensor, factor: float | torch.Size, mode: str = "nearest") -> ) # type: ignore -def bidirectional_mapping(mapping: Dict[str, str]) -> Dict[str, str]: - return {**mapping, **{value: key for key, value in mapping.items()}} - - def image_to_tensor(image: Image.Image, device: Device | str | None = None, dtype: DType | None = None) -> Tensor: return torch.tensor(array(image).astype(float32).transpose(2, 0, 1) / 255.0, device=device, dtype=dtype).unsqueeze( 0