From a0a9630aba4b2d65824a16883e759ee2f3488bc5 Mon Sep 17 00:00:00 2001 From: zyc404 Date: Thu, 12 Oct 2023 16:59:50 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0bing=E7=AC=AC=E4=B8=89?= =?UTF-8?q?=E6=96=B9=E7=BB=98=E5=9B=BE=E9=87=87=E6=A0=B7=E9=85=8D=E7=BD=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- apps/chat.js | 3 ++- resources/view/setting_view.json | 5 +++++ utils/config.js | 1 + 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/apps/chat.js b/apps/chat.js index 26b65e9..52be7d4 100644 --- a/apps/chat.js +++ b/apps/chat.js @@ -1673,7 +1673,8 @@ export class chatgpt extends plugin { body: JSON.stringify({ prompt: response.details.imageTag, width: 512, - height: 512 + height: 512, + sampler_index: Config.bingDrawApi || 'DPM++ 2M SDE' }) } const drawData = await fetch(Config.bingDrawApi, drawOption) diff --git a/resources/view/setting_view.json b/resources/view/setting_view.json index cc183df..73b8f20 100644 --- a/resources/view/setting_view.json +++ b/resources/view/setting_view.json @@ -642,6 +642,11 @@ "label": "第三方绘图", "placeholder": "Stable Diffusion API地址", "data": "bingDrawApi" + }, + { + "type": "text", + "label": "第三方绘图采样方法", + "data": "bingDrawSampler" } ] }, diff --git a/utils/config.js b/utils/config.js index ed15408..ada1295 100644 --- a/utils/config.js +++ b/utils/config.js @@ -97,6 +97,7 @@ const defaultConfig = { sydneyApologyIgnored: true, enforceMaster: false, bingDrawApi: '', + bingDrawSampler: '', serverPort: 3321, serverHost: '', viewHost: '',