diff --git a/.changelog/next/changed-minimax-music-progress.md b/.changelog/next/changed-minimax-music-progress.md new file mode 100644 index 0000000000..c2d760bdf3 --- /dev/null +++ b/.changelog/next/changed-minimax-music-progress.md @@ -0,0 +1 @@ +- Music generation now shows active processing feedback and elapsed time during long renders. diff --git a/client/src/components/music/MusicGenPanel.jsx b/client/src/components/music/MusicGenPanel.jsx index afb5341fca..487b90177f 100644 --- a/client/src/components/music/MusicGenPanel.jsx +++ b/client/src/components/music/MusicGenPanel.jsx @@ -40,6 +40,7 @@ export default function MusicGenPanel({ track, title = '', artistId = '', artist const [modelId, setModelId] = useState(''); const [durationSec, setDurationSec] = useState(null); const [generating, setGenerating] = useState(false); + const [generationElapsedSec, setGenerationElapsedSec] = useState(0); // Inline HF model install. const [installRepo, setInstallRepo] = useState(''); const [installing, setInstalling] = useState(false); @@ -64,6 +65,16 @@ export default function MusicGenPanel({ track, title = '', artistId = '', artist useEffect(() => { loadEngines(); }, []); + useEffect(() => { + if (!generating) return undefined; + const startedAt = Date.now(); + setGenerationElapsedSec(0); + const timer = setInterval(() => { + if (mountedRef.current) setGenerationElapsedSec(Math.floor((Date.now() - startedAt) / 1000)); + }, 1000); + return () => clearInterval(timer); + }, [generating]); + const engine = useMemo(() => engines.find((e) => e.id === engineId) || null, [engines, engineId]); // Remix: seed the engine / model / duration from a past render. Keyed on @@ -282,6 +293,26 @@ export default function MusicGenPanel({ track, title = '', artistId = '', artist ) : null} + {generating ? ( +
+ {engine?.id === 'minimax-music3' + ? 'MiniMax Music 3 does not report an exact percentage yet; a 60-second track can take tens of minutes on a 24 GB GPU.' + : 'Generation is still active. Longer requested durations take more time.'} +
+