diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 12eb4e7..b44cbd2 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -16,4 +16,4 @@ jobs: - run: pip install flake8-import-order - run: pip install mypy - run: flake8 facefusion_api - - run: mypy facefusion_api + - run: mypy facefusion_api --explicit-package-bases diff --git a/facefusion_api/core.py b/facefusion_api/core.py index c9ad542..84badfd 100644 --- a/facefusion_api/core.py +++ b/facefusion_api/core.py @@ -54,7 +54,7 @@ class SwapFaceImage: return (output_tensor,) @staticmethod - def swap_face(source_tensor : Tensor, target_tensor, api_token : str, face_swapper_model : FaceSwapperModel) -> Tensor: + def swap_face(source_tensor : Tensor, target_tensor : Tensor, api_token : str, face_swapper_model : FaceSwapperModel) -> Tensor: source_buffer : BytesIO = tensor_to_bytesio(source_tensor, mime_type = 'image/webp') target_buffer : BytesIO = tensor_to_bytesio(target_tensor, mime_type = 'image/webp') diff --git a/facefusion_api/types.py b/facefusion_api/types.py index 342ebea..42fc070 100644 --- a/facefusion_api/types.py +++ b/facefusion_api/types.py @@ -1,7 +1,7 @@ -from typing import Any, Dict, Literal, Type, TypeAlias +from typing import Any, Dict, Literal, TypeAlias NodeInputTypes : TypeAlias = Dict[str, Any] -NodeClassMapping : TypeAlias = Dict[str, Type] +NodeClassMapping : TypeAlias = Dict[str, Any] NodeDisplayNameMapping : TypeAlias = Dict[str, str] Image : TypeAlias = Any