From 8a59508ff91d6b2d9ca287ef1c054ec5755337a4 Mon Sep 17 00:00:00 2001 From: melMass Date: Fri, 21 Jul 2023 23:37:12 +0200 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20tensor2pil?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- utils.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/utils.py b/utils.py index cafe31d..9bc7788 100644 --- a/utils.py +++ b/utils.py @@ -53,7 +53,8 @@ def tensor2pil(image: torch.Tensor) -> List[Image.Image]: if batch_count > 1: out = [] - out.extend([tensor2pil(image[i]) for i in range(batch_count)]) + for i in range(batch_count): + out.extend(tensor2pil(image[i])) return out return [