From e6bd5af6a8e306a1cdef63402a77a980a04ad6e1 Mon Sep 17 00:00:00 2001 From: Grafting Rayman <156515434+GraftingRayman@users.noreply.github.com> Date: Fri, 17 Jan 2025 11:06:44 +0000 Subject: Add files via upload --- r_chainner/types.py | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100644 r_chainner/types.py (limited to 'r_chainner/types.py') diff --git a/r_chainner/types.py b/r_chainner/types.py new file mode 100644 index 0000000..73e6a28 --- /dev/null +++ b/r_chainner/types.py @@ -0,0 +1,18 @@ +from typing import Union + +from r_chainner.archs.face.gfpganv1_clean_arch import GFPGANv1Clean + + +PyTorchFaceModels = (GFPGANv1Clean,) +PyTorchFaceModel = Union[GFPGANv1Clean] + + +def is_pytorch_face_model(model: object): + return isinstance(model, PyTorchFaceModels) + +PyTorchModels = (*PyTorchFaceModels, ) +PyTorchModel = Union[PyTorchFaceModel] + + +def is_pytorch_model(model: object): + return isinstance(model, PyTorchModels) -- cgit v1.2.3