feat(backend): rename realesrgan class & upscale method

This commit is contained in:
psychedelicious
2023-11-28 07:37:39 +11:00
parent 46a2d83b84
commit 7653d21cf5
2 changed files with 5 additions and 5 deletions

View File

@ -32,7 +32,7 @@ class ImageMode(str, Enum):
RGBA = "RGBA"
class RealESRGANer:
class RealESRGAN:
"""A helper class for upsampling images with RealESRGAN.
Args:
@ -202,7 +202,7 @@ class RealESRGANer:
return self.output
@torch.no_grad()
def enhance(self, img: MatLike, esrgan_alpha_upscale: bool = True) -> npt.NDArray[Any]:
def upscale(self, img: MatLike, esrgan_alpha_upscale: bool = True) -> npt.NDArray[Any]:
np_img = img.astype(np.float32)
alpha: Optional[np.ndarray] = None
if np.max(np_img) > 256: