remove: 移除 image-01-live 模型及相关代码
This commit is contained in:
11
app.js
11
app.js
@@ -55,7 +55,7 @@ app.post('/api/generate', async (req, res) => {
|
||||
if (!prompt || typeof prompt !== 'string' || !prompt.trim()) {
|
||||
return res.status(400).json({ error: '请输入图片描述' });
|
||||
}
|
||||
if (model !== 'image-01' && model !== 'image-01-live') {
|
||||
if (model !== 'image-01') {
|
||||
return res.status(400).json({ error: 'model 参数无效' });
|
||||
}
|
||||
|
||||
@@ -78,15 +78,6 @@ app.post('/api/generate', async (req, res) => {
|
||||
if (prompt_optimizer) payload.prompt_optimizer = true;
|
||||
if (aigc_watermark) payload.aigc_watermark = true;
|
||||
|
||||
// style only for image-01-live
|
||||
if (model === 'image-01-live' && style) {
|
||||
const { style_type, style_weight } = style;
|
||||
if (style_type) {
|
||||
payload.style = { style_type };
|
||||
if (style_weight != null) payload.style.style_weight = style_weight;
|
||||
}
|
||||
}
|
||||
|
||||
const baseUrl = cfg.baseUrl || 'https://api.minimaxi.com';
|
||||
const endpoint = `${baseUrl}/v1/image_generation`;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user