Tune ACE-Step XL-SFT test defaults

This commit is contained in:
Mikei386
2026-09-10 19:49:04 +02:00
parent 1d5a113158
commit 436dee6f1e
2 changed files with 20 additions and 10 deletions
@@ -72,6 +72,11 @@ function buildReleaseTaskPayload(params: GenerationParams): Record<string, unkno
const thinking = params.thinking ?? true;
const enhance = params.enhance ?? false;
const taskType = params.taskType === 'audio2audio' ? 'cover' : (params.taskType || 'text2music');
// A reference in text-to-music mode is only a global style/timbre guide.
// ACE-Step's own API guide recommends a low value (~0.2) for style transfer.
// Cover/source-audio jobs retain the explicitly selected cover strength.
const isStyleReference = taskType === 'text2music' && Boolean(params.referenceAudioUrl) && !params.sourceAudioUrl;
const effectiveAudioStrength = isStyleReference ? 0.2 : (params.audioCoverStrength ?? 1.0);
return {
prompt,
@@ -82,9 +87,9 @@ function buildReleaseTaskPayload(params: GenerationParams): Record<string, unkno
key_scale: params.keyScale || '',
time_signature: params.timeSignature || '',
audio_duration: params.duration && params.duration > 0 ? params.duration : -1,
inference_steps: params.inferenceSteps ?? 50,
guidance_scale: params.guidanceScale ?? 7.0,
shift: params.shift ?? 1.0,
inference_steps: params.inferenceSteps ?? 80,
guidance_scale: params.guidanceScale ?? 8.0,
shift: params.shift ?? 3.0,
infer_method: params.inferMethod || 'ode',
batch_size: Math.min(Math.max(params.batchSize ?? 1, 1), 16),
use_random_seed: params.randomSeed !== false,
@@ -109,7 +114,7 @@ function buildReleaseTaskPayload(params: GenerationParams): Record<string, unkno
audio_codes: params.audioCodes || '',
repainting_start: params.repaintingStart ?? 0.0,
repainting_end: params.repaintingEnd ?? -1,
audio_cover_strength: params.audioCoverStrength ?? 1.0,
audio_cover_strength: effectiveAudioStrength,
use_adg: params.useAdg ?? false,
cfg_interval_start: params.cfgIntervalStart ?? 0.0,
cfg_interval_end: params.cfgIntervalEnd ?? 1.0,
@@ -324,7 +329,7 @@ patch('App.tsx', (text) => {
});
patch('components/CreatePanel.tsx', (text) => {
text = replaceOnce(text, 'useState(9.0);', 'useState(7.0);', 'guidance default');
text = replaceOnce(text, 'useState(9.0);', 'useState(8.0);', 'guidance default');
text = replaceOnce(
text,
'useState(false); // Default false for GPU compatibility',
@@ -332,9 +337,9 @@ patch('components/CreatePanel.tsx', (text) => {
'thinking default',
);
text = replaceOnce(text, "useState<'mp3' | 'flac'>('mp3');", "useState<'mp3' | 'flac'>('flac');", 'lossless default');
text = replaceOnce(text, 'useState(12);', 'useState(50);', 'XL-SFT steps default');
text = replaceOnce(text, 'useState(12);', 'useState(80);', 'XL-SFT steps default');
text = replaceOnce(text, "localStorage.getItem('ace-lmModel') || 'acestep-5Hz-lm-0.6B'", "localStorage.getItem('ace-lmModel') || 'acestep-5Hz-lm-1.7B'", 'planner model default');
text = replaceOnce(text, 'useState(3.0);', 'useState(1.0);', 'shift default');
// Upstream already defaults to Shift 3. Keep it instead of replacing it.
text = replaceOnce(
text,
@@ -347,6 +352,10 @@ patch('components/CreatePanel.tsx', (text) => {
window.alert('Widerspruch: Der Auftrag verlangt Gesang, aber das Liedtextfeld ist leer. Bitte Text eintragen oder „Instrumental“ wählen.');
return;
}
if (instrumental && asksForVocals) {
window.alert('Widerspruch: „Instrumental“ ist aktiv, aber die Beschreibung verlangt Gesang. Bitte Gesangsbegriffe aus der Beschreibung entfernen oder „Instrumental“ deaktivieren und einen Liedtext eintragen.');
return;
}
if ((taskType === 'cover' || taskType === 'audio2audio') && !sourceAudioUrl.trim() && !audioCodes.trim()) {
window.alert('Für einen Cover-Auftrag fehlt das Quellaudio. Bitte unter „Quellaudio / Cover“ eine Datei auswählen.');
return;
@@ -368,6 +377,7 @@ patch('components/CreatePanel.tsx', (text) => {
\`Gesang: \${instrumental ? 'nein (Instrumental)' : 'ja'}\`,
\`Referenzaudio (nur Klang/Produktion): \${referenceAudioUrl ? 'vorhanden' : 'keines'}\`,
\`Quellaudio (Melodie/Rhythmus/Akkorde): \${sourceAudioUrl ? 'vorhanden' : 'keines'}\`,
\`Audio-Einfluss: \${referenceAudioUrl && !sourceAudioUrl && taskType === 'text2music' ? '0,2 (sichere Stilreferenz)' : audioCoverStrength}\`,
\`Ausgabe: \${audioFormat.toUpperCase()}, \${batchSize} Variation(en), \${bulkCount} Auftrag/Aufträge\`,
'',
'Auftrag jetzt starten?',