From 03d88dff5fc8e41a9aaa9eeae8979d3893ae21c6 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sat, 28 Jan 2023 23:50:41 -0600 Subject: [PATCH] log pipeline stage count, add outpaint example --- api/onnx_web/serve.py | 2 ++ .../pipelines/{example.json => complex.json} | 0 common/pipelines/outpaint.json | 26 +++++++++++++++++++ 3 files changed, 28 insertions(+) rename common/pipelines/{example.json => complex.json} (100%) create mode 100644 common/pipelines/outpaint.json diff --git a/api/onnx_web/serve.py b/api/onnx_web/serve.py index de8b82b6..18c79cc3 100644 --- a/api/onnx_web/serve.py +++ b/api/onnx_web/serve.py @@ -594,6 +594,8 @@ def chain(): pipeline.append((callback, stage, kwargs)) + logger.info('running chain pipeline with %s stages', len(pipeline.stages)) + # build and run chain pipeline fake_source = Image.new('RGB', (1, 1)) executor.submit_stored(output, pipeline, context, diff --git a/common/pipelines/example.json b/common/pipelines/complex.json similarity index 100% rename from common/pipelines/example.json rename to common/pipelines/complex.json diff --git a/common/pipelines/outpaint.json b/common/pipelines/outpaint.json new file mode 100644 index 00000000..adc57120 --- /dev/null +++ b/common/pipelines/outpaint.json @@ -0,0 +1,26 @@ +{ + "stages": [ + { + "name": "start", + "type": "source-txt2img", + "params": { + "prompt": "a magical wizard" + } + }, + { + "name": "expand", + "type": "upscale-outpaint", + "params": { + "border": 256, + "prompt": "a magical wizard in a robe fighting a dragon" + } + }, + { + "name": "save-local", + "type": "persist-disk", + "params": { + "tile_size": "hd8k" + } + } + ] +} \ No newline at end of file