Mon Jul 10 03:08:00 UTC 2023 inscode

上级 00434523
...@@ -487,6 +487,7 @@ export default { ...@@ -487,6 +487,7 @@ export default {
this.saveConfig() this.saveConfig()
}, },
recoverConfig () { recoverConfig () {
debugger
const config = localStorage.getItem('ai-config') const config = localStorage.getItem('ai-config')
if (config) { if (config) {
const configJSON = JSON.parse(config) const configJSON = JSON.parse(config)
...@@ -500,9 +501,9 @@ export default { ...@@ -500,9 +501,9 @@ export default {
document.title = this.name 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.config.common_sd_api = data.ext.common_sd_api
this.sdServerUrl = data.ext.common_sd_api
} }
} else { } else {
......
...@@ -20,7 +20,7 @@ export default { ...@@ -20,7 +20,7 @@ export default {
"prompt_template":"", "prompt_template":"",
"api_prompt_prefix":"", "api_prompt_prefix":"",
"show_profile_setting":false, "show_profile_setting":false,
"common_sd_api": "https://gpu-pod64a7c569f3b1573a4ae257e1-6006.node.inscode.run", "common_sd_api": "https://api.quickapi.cloud/common-sd/",
}, },
......
...@@ -19,7 +19,7 @@ export default { ...@@ -19,7 +19,7 @@ export default {
}; };
let api = config?.sd_api let api = config?.sd_api
if (api.indexOf('/sd') === -1) { if (api.indexOf('sd/') === -1) {
api += '/sdapi/v1/txt2img' api += '/sdapi/v1/txt2img'
} }
axios.post(api, data, { headers }).then(response => { axios.post(api, data, { headers }).then(response => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册