mirror of
https://github.com/ikechan8370/chatgpt-plugin.git
synced 2025-12-18 06:17:06 +00:00
添加bing第三方绘图图片大小配置
This commit is contained in:
parent
c5421bb5a0
commit
096bcbca56
3 changed files with 16 additions and 2 deletions
|
|
@ -1672,8 +1672,8 @@ export class chatgpt extends plugin {
|
||||||
headers: {'content-type': 'application/json'},
|
headers: {'content-type': 'application/json'},
|
||||||
body: JSON.stringify({
|
body: JSON.stringify({
|
||||||
prompt: response.details.imageTag,
|
prompt: response.details.imageTag,
|
||||||
width: 512,
|
width: Config.bingDrawWidth || 512,
|
||||||
height: 512,
|
height: Config.bingDrawHeight || 512,
|
||||||
sampler_index: Config.bingDrawSampler || 'DPM++ 2M SDE'
|
sampler_index: Config.bingDrawSampler || 'DPM++ 2M SDE'
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -647,6 +647,18 @@
|
||||||
"type": "text",
|
"type": "text",
|
||||||
"label": "第三方绘图采样方法",
|
"label": "第三方绘图采样方法",
|
||||||
"data": "bingDrawSampler"
|
"data": "bingDrawSampler"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "number",
|
||||||
|
"label": "第三方绘图宽度",
|
||||||
|
"placeholder": "图片宽度",
|
||||||
|
"data": "bingDrawWidth"
|
||||||
|
},
|
||||||
|
{
|
||||||
|
"type": "bingDrawWidth",
|
||||||
|
"label": "第三方绘图高度",
|
||||||
|
"placeholder": "图片高度",
|
||||||
|
"data": "bingDrawHeight"
|
||||||
}
|
}
|
||||||
]
|
]
|
||||||
},
|
},
|
||||||
|
|
|
||||||
|
|
@ -98,6 +98,8 @@ const defaultConfig = {
|
||||||
enforceMaster: false,
|
enforceMaster: false,
|
||||||
bingDrawApi: '',
|
bingDrawApi: '',
|
||||||
bingDrawSampler: '',
|
bingDrawSampler: '',
|
||||||
|
bingDrawWidth: 512,
|
||||||
|
bingDrawHeight: 512,
|
||||||
serverPort: 3321,
|
serverPort: 3321,
|
||||||
serverHost: '',
|
serverHost: '',
|
||||||
viewHost: '',
|
viewHost: '',
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue