diff --git a/server/src/routes/generate.ts b/server/src/routes/generate.ts index dc60bd3..34e6d27 100644 --- a/server/src/routes/generate.ts +++ b/server/src/routes/generate.ts @@ -696,9 +696,9 @@ router.get('/random-description', authMiddleware, async (_req: AuthenticatedRequ router.get('/health', async (_req, res: Response) => { try { const healthy = await checkSpaceHealth(); - res.json({ healthy }); + res.json({ healthy, aceStepUrl: config.acestep.apiUrl }); } catch (error) { - res.json({ healthy: false, error: (error as Error).message }); + res.json({ healthy: false, aceStepUrl: config.acestep.apiUrl, error: (error as Error).message }); } }); diff --git a/server/src/services/acestep.ts b/server/src/services/acestep.ts index c37a6f6..a8a40d4 100644 --- a/server/src/services/acestep.ts +++ b/server/src/services/acestep.ts @@ -165,7 +165,7 @@ async function buildGradioArgs(params: GenerationParams): Promise { params.instruction || 'Fill the audio semantic mask with the style described in the text prompt.', // 17: Instruction params.audioCoverStrength ?? 1.0, // 18: Audio Cover Strength 0.0, // 19: Cover Noise Strength (ACE-Step v1.5 new param, default 0.0) - params.taskType || 'text2music', // 20: Task Type + (params.taskType === 'audio2audio' ? 'cover' : params.taskType) || 'text2music', // 20: Task Type params.useAdg ?? false, // 21: Use ADG params.cfgIntervalStart ?? 0.0, // 22: CFG Interval Start params.cfgIntervalEnd ?? 1.0, // 23: CFG Interval End @@ -679,7 +679,8 @@ async function processGenerationViaPython( if (params.vocalLanguage) args.push('--vocal-language', params.vocalLanguage); if (params.seed !== undefined && params.seed >= 0 && !params.randomSeed) args.push('--seed', String(params.seed)); if (params.shift !== undefined) args.push('--shift', String(params.shift)); - if (params.taskType && params.taskType !== 'text2music') args.push('--task-type', params.taskType); + const resolvedTaskType = params.taskType === 'audio2audio' ? 'cover' : params.taskType; + if (resolvedTaskType && resolvedTaskType !== 'text2music') args.push('--task-type', resolvedTaskType); if (params.referenceAudioUrl) { args.push('--reference-audio', resolveAudioPath(params.referenceAudioUrl)); diff --git a/vite.config.ts b/vite.config.ts index a5068a3..867a9f5 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -25,6 +25,10 @@ export default defineConfig(({ mode }) => { target: 'http://127.0.0.1:3001', changeOrigin: true, }, + '/demucs-web': { + target: 'http://127.0.0.1:3001', + changeOrigin: true, + }, }, }, optimizeDeps: {