From da625009c8e45b6db453ce65a0db0db21ffde91d Mon Sep 17 00:00:00 2001 From: Kabir Kalsi <26483873+ASparkOfFire@users.noreply.github.com> Date: Thu, 10 Apr 2025 18:43:59 +0530 Subject: [PATCH] fix: mlx: Wrong type annotation for latent_size MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Pyright: Argument of type "tuple[Literal[64], Literal[64]]" cannot be assigned to parameter "latent_size" of type "Tuple[int]" in function "generate_image"   "tuple[Literal[64], Literal[64]]" is not assignable to "Tuple[int]"     Tuple size mismatch; expected 1 but received 2 --- python/src/diffusionkit/mlx/__init__.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/src/diffusionkit/mlx/__init__.py b/python/src/diffusionkit/mlx/__init__.py index 6c6499a..3d41ab3 100644 --- a/python/src/diffusionkit/mlx/__init__.py +++ b/python/src/diffusionkit/mlx/__init__.py @@ -256,7 +256,7 @@ def denoise_latents( pooled_conditioning, num_steps: int = 2, cfg_weight: float = 0.0, - latent_size: Tuple[int] = (64, 64), + latent_size: Tuple[int, int] = (64, 64), seed=None, image_path: Optional[str] = None, denoise: float = 1.0, @@ -297,7 +297,7 @@ def generate_image( num_steps: int = 2, cfg_weight: float = 0.0, negative_text: str = "", - latent_size: Tuple[int] = (64, 64), + latent_size: Tuple[int, int] = (64, 64), seed=None, verbose: bool = True, image_path: Optional[str] = None,