Fix audio2audio task type, demucs-web proxy, and health endpoint

- Map audio2audio to cover in Gradio args and Python spawn fallback
  (audio2audio is not a valid ACE-Step task type, cover is the equivalent)
- Add /demucs-web to Vite proxy so stem extractor opens correctly in Pinokio
  (in Pinokio, Vite runs on a dynamic port and /demucs-web was not proxied)
- Expose aceStepUrl in /api/generate/health response for debugging
This commit is contained in:
fspecii
2026-03-02 17:58:09 +02:00
parent e1625a717d
commit a5879e60a5
3 changed files with 9 additions and 4 deletions
+2 -2
View File
@@ -696,9 +696,9 @@ router.get('/random-description', authMiddleware, async (_req: AuthenticatedRequ
router.get('/health', async (_req, res: Response) => { router.get('/health', async (_req, res: Response) => {
try { try {
const healthy = await checkSpaceHealth(); const healthy = await checkSpaceHealth();
res.json({ healthy }); res.json({ healthy, aceStepUrl: config.acestep.apiUrl });
} catch (error) { } catch (error) {
res.json({ healthy: false, error: (error as Error).message }); res.json({ healthy: false, aceStepUrl: config.acestep.apiUrl, error: (error as Error).message });
} }
}); });
+3 -2
View File
@@ -165,7 +165,7 @@ async function buildGradioArgs(params: GenerationParams): Promise<unknown[]> {
params.instruction || 'Fill the audio semantic mask with the style described in the text prompt.', // 17: Instruction 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 params.audioCoverStrength ?? 1.0, // 18: Audio Cover Strength
0.0, // 19: Cover Noise Strength (ACE-Step v1.5 new param, default 0.0) 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.useAdg ?? false, // 21: Use ADG
params.cfgIntervalStart ?? 0.0, // 22: CFG Interval Start params.cfgIntervalStart ?? 0.0, // 22: CFG Interval Start
params.cfgIntervalEnd ?? 1.0, // 23: CFG Interval End 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.vocalLanguage) args.push('--vocal-language', params.vocalLanguage);
if (params.seed !== undefined && params.seed >= 0 && !params.randomSeed) args.push('--seed', String(params.seed)); 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.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) { if (params.referenceAudioUrl) {
args.push('--reference-audio', resolveAudioPath(params.referenceAudioUrl)); args.push('--reference-audio', resolveAudioPath(params.referenceAudioUrl));
+4
View File
@@ -25,6 +25,10 @@ export default defineConfig(({ mode }) => {
target: 'http://127.0.0.1:3001', target: 'http://127.0.0.1:3001',
changeOrigin: true, changeOrigin: true,
}, },
'/demucs-web': {
target: 'http://127.0.0.1:3001',
changeOrigin: true,
},
}, },
}, },
optimizeDeps: { optimizeDeps: {