diff --git a/src/App.vue b/src/App.vue index e0d8503094492c1c2a6ebfe2172e4646bfd0145a..e4a864dd45e22357133ece4a2372fe85967c4c74 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 ff870b1fc12de85709b4f3275e809912b8501f2d..1e55682ff1ecd681af815da4d2e754fa14689606 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 a09591147aef48ef4cd2d400b708228c9d8f5c63..04922f0c28db5d292c4cce666128b57e8021f3f5 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 => {