From 479499ba8400c739d9a936e2c657abad0d334e78 Mon Sep 17 00:00:00 2001 From: 622aa39c1f9b166ab1a38c05 <622aa39c1f9b166ab1a38c05@devide> Date: Mon, 10 Jul 2023 03:08:00 +0000 Subject: [PATCH] Mon Jul 10 03:08:00 UTC 2023 inscode --- src/App.vue | 5 +++-- src/js/config.js | 2 +- src/js/sd.js | 2 +- 3 files changed, 5 insertions(+), 4 deletions(-) diff --git a/src/App.vue b/src/App.vue index e0d8503..e4a864d 100644 --- a/src/App.vue +++ b/src/App.vue @@ -487,6 +487,7 @@ export default { this.saveConfig() }, recoverConfig () { + debugger const config = localStorage.getItem('ai-config') if (config) { const configJSON = JSON.parse(config) @@ -500,9 +501,9 @@ export default { document.title = this.name - if (data.ext) { + if (data.ext && data.ext.common_sd_api) { this.config.common_sd_api = data.ext.common_sd_api - + this.sdServerUrl = data.ext.common_sd_api } } else { diff --git a/src/js/config.js b/src/js/config.js index ff870b1..1e55682 100644 --- a/src/js/config.js +++ b/src/js/config.js @@ -20,7 +20,7 @@ export default { "prompt_template":"", "api_prompt_prefix":"", "show_profile_setting":false, - "common_sd_api": "https://gpu-pod64a7c569f3b1573a4ae257e1-6006.node.inscode.run", + "common_sd_api": "https://api.quickapi.cloud/common-sd/", }, diff --git a/src/js/sd.js b/src/js/sd.js index a095911..04922f0 100644 --- a/src/js/sd.js +++ b/src/js/sd.js @@ -19,7 +19,7 @@ export default { }; let api = config?.sd_api - if (api.indexOf('/sd') === -1) { + if (api.indexOf('sd/') === -1) { api += '/sdapi/v1/txt2img' } axios.post(api, data, { headers }).then(response => { -- GitLab