remove: 移除 image-01-live 模型及相关代码

This commit is contained in:
zwbcc
2026-03-28 21:07:29 +08:00
parent e20f53e253
commit 04068da6b0
4 changed files with 6 additions and 78 deletions

11
app.js
View File

@@ -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`;