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:
@@ -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 });
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
@@ -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.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));
|
||||
|
||||
@@ -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: {
|
||||
|
||||
Reference in New Issue
Block a user