From 3fea317a4387ceaf3c69d30fa6b1f307577eee56 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sun, 11 Feb 2024 16:25:34 -0600 Subject: [PATCH] put prompt filters behind a feature flag for now --- api/onnx_web/diffusers/run.py | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/api/onnx_web/diffusers/run.py b/api/onnx_web/diffusers/run.py index e4b553a9..63f2cb95 100644 --- a/api/onnx_web/diffusers/run.py +++ b/api/onnx_web/diffusers/run.py @@ -9,6 +9,7 @@ from ..chain import ( BlendMaskStage, ChainPipeline, SourceTxt2ImgStage, + TextPromptStage, UpscaleOutpaintStage, ) from ..chain.highres import stage_highres @@ -76,6 +77,13 @@ def run_txt2img_pipeline( # prepare the chain pipeline and first stage chain = ChainPipeline() + + if server.has_feature("prompt-filter"): + chain.stage( + TextPromptStage(), + StageParams(), + ) + chain.stage( SourceTxt2ImgStage(), StageParams(