diff --git a/inference/core/workflows/core_steps/models/foundation/clip_comparison/v2.py b/inference/core/workflows/core_steps/models/foundation/clip_comparison/v2.py index 28f4b83b8..a1ee4b52c 100644 --- a/inference/core/workflows/core_steps/models/foundation/clip_comparison/v2.py +++ b/inference/core/workflows/core_steps/models/foundation/clip_comparison/v2.py @@ -204,7 +204,7 @@ def run_remotely( tasks = [ partial( client.clip_compare, - subject=single_image.numpy_image, + subject=single_image.base64_image, prompt=classes, clip_version=version, ) diff --git a/inference/core/workflows/core_steps/models/foundation/ocr/v1.py b/inference/core/workflows/core_steps/models/foundation/ocr/v1.py index 0f540a9a5..b560032e8 100644 --- a/inference/core/workflows/core_steps/models/foundation/ocr/v1.py +++ b/inference/core/workflows/core_steps/models/foundation/ocr/v1.py @@ -169,7 +169,7 @@ def run_remotely( max_concurrent_requests=WORKFLOWS_REMOTE_EXECUTION_MAX_STEP_CONCURRENT_REQUESTS, ) client.configure(configuration) - non_empty_inference_images = [i.numpy_image for i in images] + non_empty_inference_images = [i.base64_image for i in images] predictions = client.ocr_image( inference_input=non_empty_inference_images, ) diff --git a/inference/core/workflows/core_steps/models/foundation/yolo_world/v1.py b/inference/core/workflows/core_steps/models/foundation/yolo_world/v1.py index b54474a4f..da3c890f0 100644 --- a/inference/core/workflows/core_steps/models/foundation/yolo_world/v1.py +++ b/inference/core/workflows/core_steps/models/foundation/yolo_world/v1.py @@ -214,7 +214,7 @@ def run_remotely( client.configure(inference_configuration=configuration) if WORKFLOWS_REMOTE_API_TARGET == "hosted": client.select_api_v0() - inference_images = [i.to_inference_format(numpy_preferred=True) for i in images] + inference_images = [i.to_inference_format() for i in images] image_sub_batches = list( make_batches( iterable=inference_images, diff --git a/inference/core/workflows/core_steps/models/roboflow/instance_segmentation/v1.py b/inference/core/workflows/core_steps/models/roboflow/instance_segmentation/v1.py index 3abc2d9cc..8d529e595 100644 --- a/inference/core/workflows/core_steps/models/roboflow/instance_segmentation/v1.py +++ b/inference/core/workflows/core_steps/models/roboflow/instance_segmentation/v1.py @@ -328,7 +328,7 @@ def run_remotely( source="workflow-execution", ) client.configure(inference_configuration=client_config) - inference_images = [i.numpy_image for i in images] + inference_images = [i.base64_image for i in images] predictions = client.infer( inference_input=inference_images, model_id=model_id, diff --git a/inference/core/workflows/core_steps/models/roboflow/keypoint_detection/v1.py b/inference/core/workflows/core_steps/models/roboflow/keypoint_detection/v1.py index aacbae6af..f95d7c04d 100644 --- a/inference/core/workflows/core_steps/models/roboflow/keypoint_detection/v1.py +++ b/inference/core/workflows/core_steps/models/roboflow/keypoint_detection/v1.py @@ -313,7 +313,7 @@ def run_remotely( source="workflow-execution", ) client.configure(inference_configuration=client_config) - inference_images = [i.numpy_image for i in images] + inference_images = [i.base64_image for i in images] predictions = client.infer( inference_input=inference_images, model_id=model_id, diff --git a/inference/core/workflows/core_steps/models/roboflow/multi_class_classification/v1.py b/inference/core/workflows/core_steps/models/roboflow/multi_class_classification/v1.py index 4e33f5fd2..4ff050018 100644 --- a/inference/core/workflows/core_steps/models/roboflow/multi_class_classification/v1.py +++ b/inference/core/workflows/core_steps/models/roboflow/multi_class_classification/v1.py @@ -225,7 +225,7 @@ def run_remotely( source="workflow-execution", ) client.configure(inference_configuration=client_config) - non_empty_inference_images = [i.numpy_image for i in images] + non_empty_inference_images = [i.base64_image for i in images] predictions = client.infer( inference_input=non_empty_inference_images, model_id=model_id, diff --git a/inference/core/workflows/core_steps/models/roboflow/multi_label_classification/v1.py b/inference/core/workflows/core_steps/models/roboflow/multi_label_classification/v1.py index b13d75f7f..41de72787 100644 --- a/inference/core/workflows/core_steps/models/roboflow/multi_label_classification/v1.py +++ b/inference/core/workflows/core_steps/models/roboflow/multi_label_classification/v1.py @@ -225,7 +225,7 @@ def run_remotely( source="workflow-execution", ) client.configure(inference_configuration=client_config) - non_empty_inference_images = [i.numpy_image for i in images] + non_empty_inference_images = [i.base64_image for i in images] predictions = client.infer( inference_input=non_empty_inference_images, model_id=model_id, diff --git a/inference/core/workflows/core_steps/models/roboflow/object_detection/v1.py b/inference/core/workflows/core_steps/models/roboflow/object_detection/v1.py index 608a083df..486752a63 100644 --- a/inference/core/workflows/core_steps/models/roboflow/object_detection/v1.py +++ b/inference/core/workflows/core_steps/models/roboflow/object_detection/v1.py @@ -295,7 +295,7 @@ def run_remotely( source="workflow-execution", ) client.configure(inference_configuration=client_config) - non_empty_inference_images = [i.numpy_image for i in images] + non_empty_inference_images = [i.base64_image for i in images] predictions = client.infer( inference_input=non_empty_inference_images, model_id=model_id, diff --git a/inference/core/workflows/execution_engine/entities/base.py b/inference/core/workflows/execution_engine/entities/base.py index a60b5f8ef..97579f0fe 100644 --- a/inference/core/workflows/execution_engine/entities/base.py +++ b/inference/core/workflows/execution_engine/entities/base.py @@ -397,7 +397,7 @@ def base64_image(self) -> str: return self._base64_image numpy_image = self.numpy_image self._base64_image = base64.b64encode( - encode_image_to_jpeg_bytes(numpy_image) + encode_image_to_jpeg_bytes(numpy_image, jpeg_quality=95) ).decode("ascii") return self._base64_image