summaryrefslogtreecommitdiffstats
path: root/r_chainner/types.py
diff options
context:
space:
mode:
authorGrafting Rayman <156515434+GraftingRayman@users.noreply.github.com>2025-01-17 11:06:44 +0000
committerGitHub <noreply@github.com>2025-01-17 11:06:44 +0000
commite6bd5af6a8e306a1cdef63402a77a980a04ad6e1 (patch)
treed0732226bbc22feedad9e834b2218d7d0b0eff54 /r_chainner/types.py
parent495ffc4777522e40941753e3b1b79c02f84b25b4 (diff)
downloadComfyui-reactor-node-e6bd5af6a8e306a1cdef63402a77a980a04ad6e1.tar.gz
Add files via uploadHEADmain
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)