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(