From 66e83c2f2ff07eee370f029642da60379a377db8 Mon Sep 17 00:00:00 2001 From: aszc-dev Date: Mon, 22 Apr 2024 10:24:14 +0200 Subject: [PATCH] Change syntax to support older Python versions --- coreml_suite/converter.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/coreml_suite/converter.py b/coreml_suite/converter.py index 875e6f1..dec7a64 100644 --- a/coreml_suite/converter.py +++ b/coreml_suite/converter.py @@ -2,6 +2,7 @@ import gc import os import shutil import time +from typing import Union import coremltools as ct import numpy as np @@ -315,7 +316,7 @@ def convert( batch_size: int = 1, sample_size: tuple[int, int] = (64, 64), controlnet_support: bool = False, - lora_weights: list[tuple[str | os.PathLike, float]] = None, + lora_weights: list[tuple[Union[str, os.PathLike], float]] = None, attn_impl: str = AttentionImplementations.SPLIT_EINSUM.name, config_path: str = None, ):