From 09c9b2c028363d7a03045abd905d67525fc9b41a Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 14 Jan 2023 18:30:04 -0600 Subject: [PATCH] fix(api): restore inpainting without outpainting --- api/onnx_web/serve.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/onnx_web/serve.py b/api/onnx_web/serve.py index b2756f68..3a53e978 100644 --- a/api/onnx_web/serve.py +++ b/api/onnx_web/serve.py @@ -445,10 +445,10 @@ def inpaint(): (model, provider, scheduler, prompt, negative_prompt, cfg, steps, height, width, seed) = pipeline_from_request() - left = get_and_clamp_int(request.args, 'left', 0, config_params.get('width').get('max')) - right = get_and_clamp_int(request.args, 'right', 0, config_params.get('width').get('max')) - top = get_and_clamp_int(request.args, 'top', 0, config_params.get('height').get('max')) - bottom = get_and_clamp_int(request.args, 'bottom', 0, config_params.get('height').get('max')) + left = get_and_clamp_int(request.args, 'left', 0, config_params.get('width').get('max'), 0) + right = get_and_clamp_int(request.args, 'right', 0, config_params.get('width').get('max'), 0) + top = get_and_clamp_int(request.args, 'top', 0, config_params.get('height').get('max'), 0) + bottom = get_and_clamp_int(request.args, 'bottom', 0, config_params.get('height').get('max'), 0) (output_file, output_full) = make_output_path( 'inpaint', seed, (prompt, cfg, steps, height, width, seed, left, right, top, bottom))