summaryrefslogtreecommitdiffstats
path: root/r_chainner/types.py
diff options
context:
space:
mode:
Diffstat (limited to 'r_chainner/types.py')
-rw-r--r--r_chainner/types.py18
1 files changed, 18 insertions, 0 deletions
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)