From 48d0d3e22d22b58283790519802dce343f5b17a1 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Wed, 29 Nov 2023 21:52:32 -0600 Subject: [PATCH] use presence of stage mask to trigger tiling --- api/onnx_web/chain/pipeline.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/api/onnx_web/chain/pipeline.py b/api/onnx_web/chain/pipeline.py index ee7015ab..60554071 100644 --- a/api/onnx_web/chain/pipeline.py +++ b/api/onnx_web/chain/pipeline.py @@ -146,7 +146,7 @@ class ChainPipeline: kwargs.pop("params") # the stage must be split and tiled if any image is larger than the selected/max tile size - must_tile = any( + must_tile = "mask" in stage_kwargs or any( [ needs_tile( stage_pipe.max_tile, @@ -162,7 +162,7 @@ class ChainPipeline: if stage_pipe.max_tile > 0: tile = min(stage_pipe.max_tile, stage_params.tile_size) - if must_tile or len(stage_sources) > 0: + if must_tile: logger.info( "image contains sources or is larger than tile size of %s, tiling stage", tile,