from typing import Any, Dict, Literal, Tuple, TypeAlias from torch import Tensor from torch.nn import Module Batch : TypeAlias = Tuple[Tensor, Tensor] BatchMode = Literal['equal', 'same', 'different'] Feature : TypeAlias = Tensor Embedding : TypeAlias = Tensor Mask : TypeAlias = Tensor Loss : TypeAlias = Tensor Padding : TypeAlias = Tuple[int, int, int, int] GeneratorModule : TypeAlias = Module EmbedderModule : TypeAlias = Module GazerModule : TypeAlias = Module FaceMaskerModule : TypeAlias = Module OptimizerSet : TypeAlias = Any WarpTemplate = Literal['arcface_128_v2_to_arcface_112_v2', 'ffhq_512_to_arcface_128_v2', 'vggfacehq_256_to_arcface_128_v2'] WarpTemplateSet : TypeAlias = Dict[WarpTemplate, Tensor]