summaryrefslogtreecommitdiffstats
path: root/r_chainner/types.py
blob: 73e6a28882d04d1a365ce3880a4f97597e8a9ec2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
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)