Add ACE-Step music generation to the studio and library.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-09-02 23:58:18 -05:00
co-authored by Cursor
parent c79cca39ae
commit 5555155884
25 changed files with 2157 additions and 44 deletions
+12 -2
View File
@@ -11,10 +11,20 @@ export default defineEventHandler(async (event) => {
const params = new URLSearchParams({ filename, subfolder, type })
const res = await comfyFetch(`/view?${params.toString()}`)
if (!res.ok) {
throw createError({ statusCode: res.status, statusMessage: 'Failed to fetch video from ComfyUI' })
throw createError({ statusCode: res.status, statusMessage: 'Failed to fetch media from ComfyUI' })
}
const buf = Buffer.from(await res.arrayBuffer())
return sendBufferWithRange(event, buf, res.headers.get('content-type') || 'video/mp4', {
const lower = filename.toLowerCase()
const fallbackType = lower.endsWith('.wav')
? 'audio/wav'
: lower.endsWith('.flac')
? 'audio/flac'
: lower.endsWith('.mp3')
? 'audio/mpeg'
: lower.endsWith('.ogg') || lower.endsWith('.opus')
? 'audio/ogg'
: 'video/mp4'
return sendBufferWithRange(event, buf, res.headers.get('content-type') || fallbackType, {
'Content-Disposition': `inline; filename="${filename}"`,
'Cache-Control': 'private, max-age=0, must-revalidate'
})