From 7966f001e1996b5101eec42c8b8bf05d5bc37a99 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Fri, 12 Jan 2024 22:28:59 -0600 Subject: [PATCH] fix(api): make sure a controlnet has been selected when using that pipeline --- api/onnx_web/diffusers/load.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/api/onnx_web/diffusers/load.py b/api/onnx_web/diffusers/load.py index bafdd032..e2df4866 100644 --- a/api/onnx_web/diffusers/load.py +++ b/api/onnx_web/diffusers/load.py @@ -231,6 +231,9 @@ def load_pipeline( ) else: if params.is_control(): + if "controlnet" not in components or components["controlnet"] is None: + raise ValueError("ControlNet is required for control pipelines") + logger.debug( "assembling SD pipeline for %s with ControlNet", pipeline_class.__name__,