From 52585aea74470548c35eb75bcb46d6789b13a356 Mon Sep 17 00:00:00 2001 From: Yeuoly <45712896+Yeuoly@users.noreply.github.com> Date: Thu, 6 Jun 2024 17:08:49 +0800 Subject: [PATCH] fix: typo in sd3 (#5000) --- .../provider/builtin/stability/tools/text2image.py | 2 +- .../provider/builtin/stability/tools/text2image.yaml | 12 ++++++------ 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/api/core/tools/provider/builtin/stability/tools/text2image.py b/api/core/tools/provider/builtin/stability/tools/text2image.py index 10f6b62110..e8aa22d413 100644 --- a/api/core/tools/provider/builtin/stability/tools/text2image.py +++ b/api/core/tools/provider/builtin/stability/tools/text2image.py @@ -23,7 +23,7 @@ class StableDiffusionTool(BuiltinTool, BaseStabilityAuthorization): """ payload = { 'prompt': tool_parameters.get('prompt', ''), - 'aspect_radio': tool_parameters.get('aspect_radio', '16:9'), + 'aspect_ratio': tool_parameters.get('aspect_ratio', '16:9') or tool_parameters.get('aspect_radio', '16:9'), 'mode': 'text-to-image', 'seed': tool_parameters.get('seed', 0), 'output_format': 'png', diff --git a/api/core/tools/provider/builtin/stability/tools/text2image.yaml b/api/core/tools/provider/builtin/stability/tools/text2image.yaml index 51da193a03..21345f9f18 100644 --- a/api/core/tools/provider/builtin/stability/tools/text2image.yaml +++ b/api/core/tools/provider/builtin/stability/tools/text2image.yaml @@ -85,7 +85,7 @@ parameters: min: 0 max: 4294967294 form: form - - name: aspect_radio + - name: aspect_ratio type: select default: '16:9' options: @@ -131,12 +131,12 @@ parameters: pt_BR: '9:21' required: false label: - en_US: Aspect Radio + en_US: Aspect Ratio zh_Hans: 长宽比 - pt_BR: Aspect Radio + pt_BR: Aspect Ratio human_description: - en_US: Aspect Radio + en_US: Aspect Ratio zh_Hans: 长宽比 - pt_BR: Aspect Radio - llm_description: Aspect Radio + pt_BR: Aspect Ratio + llm_description: Aspect Ratio form: form