添加bing第三方绘图图片大小配置

This commit is contained in:
zyc404 2023-10-12 17:18:26 +08:00
parent c5421bb5a0
commit 096bcbca56
3 changed files with 16 additions and 2 deletions

View file

@ -1672,8 +1672,8 @@ export class chatgpt extends plugin {
headers: {'content-type': 'application/json'},
body: JSON.stringify({
prompt: response.details.imageTag,
width: 512,
height: 512,
width: Config.bingDrawWidth || 512,
height: Config.bingDrawHeight || 512,
sampler_index: Config.bingDrawSampler || 'DPM++ 2M SDE'
})
}

View file

@ -647,6 +647,18 @@
"type": "text",
"label": "第三方绘图采样方法",
"data": "bingDrawSampler"
},
{
"type": "number",
"label": "第三方绘图宽度",
"placeholder": "图片宽度",
"data": "bingDrawWidth"
},
{
"type": "bingDrawWidth",
"label": "第三方绘图高度",
"placeholder": "图片高度",
"data": "bingDrawHeight"
}
]
},

View file

@ -98,6 +98,8 @@ const defaultConfig = {
enforceMaster: false,
bingDrawApi: '',
bingDrawSampler: '',
bingDrawWidth: 512,
bingDrawHeight: 512,
serverPort: 3321,
serverHost: '',
viewHost: '',