From 164765e55910898f46a24f1afe1a660afe9f925e Mon Sep 17 00:00:00 2001 From: ZiniuYu Date: Wed, 12 Apr 2023 19:21:19 +0800 Subject: [PATCH] fix: check empty blob --- server/clip_server/executors/helper.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/server/clip_server/executors/helper.py b/server/clip_server/executors/helper.py index 2f3d756f..fa3846ca 100644 --- a/server/clip_server/executors/helper.py +++ b/server/clip_server/executors/helper.py @@ -33,10 +33,9 @@ def preproc_image( for d in da: content = d.content - - if d.tensor: + if d.tensor is not None: d.convert_image_tensor_to_blob() - elif d.blob is None and d.uri: + elif d.content_type != 'blob' and d.uri: # in case user uses HTTP protocol and send data via curl not using .blob (base64), but in .uri d.load_uri_to_blob()