Skip to content

The all-in-one local AI studio for your desktop: chat, image and video generation and a coding agent in one free, open source app. Windows and Linux. No Docker, no terminal, no cloud required.

fix(music): the local tab stops printing cloud facts at local users

purple6ccb41b44a4b
diff --git a/src/components/create/experimental/ParamGroups.tsx b/src/components/create/experimental/ParamGroups.tsx
index 9dd94711..c9149aaa 100644
--- a/src/components/create/experimental/ParamGroups.tsx
+++ b/src/components/create/experimental/ParamGroups.tsx
@@ -33,6 +33,11 @@ export function ParamGroups() {
const isVideo = meta.isVideo
const isEdit = meta.id === 'edit'
const isCloud = s.backend === 'cloud'
+ // Music has no canvas. The size fields, the resolution chips and the
+ // orientation flip all sat on the Music tab doing nothing, which is the first
+ // oddity in #108 ("width and height options which make no sense for audio").
+ // Length lives on the Music controls, where it belongs.
+ const isAudio = meta.id === 'music'
// The Mac's MLX pipeline only honours prompt/steps/seed/size/negative — every
// Expert knob (sampler, scheduler, VAE, clip-skip; LoRA has no list without
// ComfyUI, and denoise/mask belong to intents that aren't local there) is
@@ -77,13 +82,16 @@ export function ParamGroups() {
>
{showSteps && <Slider label="Steps" min={1} max={60} step={1} value={s.steps} onChange={s.setSteps} />}
{showCfg && <Slider label={isVideo ? 'Guidance' : 'CFG scale'} min={0} max={30} step={0.5} value={s.cfgScale} onChange={s.setCfgScale} format={(v) => v.toFixed(1)} />}
+ {!isAudio && (
<div className="grid grid-cols-2 gap-2">
<NumberField label="Width" value={s.width} min={64} max={4096} step={64} mono onChange={(v) => s.setSize(v, s.height)} suffix="px" />
<NumberField label="Height" value={s.height} min={64} max={4096} step={64} mono onChange={(v) => s.setSize(s.width, v)} suffix="px" />
</div>
+ )}
{/* D#93 (stasicby): Wan's native sizes as one-click chips, an
orientation flip, and ratio chips that respend the current pixel
budget. Everything just writes the same width/height fields. */}
+ {!isAudio && (
<div className="flex flex-wrap items-center gap-1 pt-1">
{isVideo && VIDEO_RES_PRESETS.map((p) => (
<button
@@ -114,6 +122,7 @@ export function ParamGroups() {
>{r.label}</button>
))}
</div>
+ )}
{showHiresFix && (
<div className={cn(
'overflow-hidden rounded-lg border transition-colors',
diff --git a/src/components/create/experimental/SpecialIntentControls.tsx b/src/components/create/experimental/SpecialIntentControls.tsx
index 9d3972d3..39224f9e 100644
--- a/src/components/create/experimental/SpecialIntentControls.tsx
+++ b/src/components/create/experimental/SpecialIntentControls.tsx
@@ -21,6 +21,7 @@ import {
import { startModelDownload, getDownloadProgress } from '../../../api/discover'
import { useDownloadStore } from '../../../stores/downloadStore'
import { getLoraModels } from '../../../api/comfyui'
+import { musicTakesLyrics, musicHowtoLines } from '../../../lib/render/music-ui'
import { useCreateExp } from './CreateContext'
import { loadImageRef } from './loadImage'
import { fetchGalleryItemBlob } from './galleryUrl'
@@ -692,10 +693,20 @@ function MusicControls() {
const musicLyrics = useCreateStore((s) => s.musicLyrics)
const setMusicLyrics = useCreateStore((s) => s.setMusicLyrics)
const cloudOpModel = useCreateStore((s) => s.cloudOpModel)
- // Only ace-step-1.5 has a lyrics input on the wire (catalog `lyrics` flag);
- // the other music endpoints write their own lyrics from the prompt, so
- // offering the box there would be a lie.
- const canLyrics = cloudModelById(modelForOp('audio', 'music', cloudOpModel))?.lyrics === true
+ const isCloud = useCreateStore((s) => s.backend) === 'cloud'
+ // Cloud: only ace-step-1.5 has a lyrics input on the wire (catalog `lyrics`
+ // flag); the other music endpoints write their own lyrics from the prompt,
+ // so offering the box there would be a lie.
+ // Local: every music checkpoint runs through buildMusicWorkflow, which feeds
+ // `lyrics` straight into the ACE-Step encoder. Asking the CLOUD catalog about
+ // a local checkpoint returns undefined, which is how the local tab ended up
+ // hiding the lyrics box and claiming the model writes its own, while sitting
+ // on the one model that sings yours (#108, ElBiggus).
+ const canLyrics = musicTakesLyrics(
+ isCloud ? 'cloud' : 'local',
+ cloudModelById(modelForOp('audio', 'music', cloudOpModel))?.lyrics === true,
+ )
+ const howtoLines = musicHowtoLines(isCloud ? 'cloud' : 'local')
const musicHowtoSeen = useCreateStore((s) => s.musicHowtoSeen)
const setMusicHowtoSeen = useCreateStore((s) => s.setMusicHowtoSeen)
const [lyricsOpen, setLyricsOpen] = useState(musicLyrics.length > 0)
@@ -761,12 +772,12 @@ function MusicControls() {
className="overflow-hidden"
>
<div className="t-control px-3 py-2 rounded-md bg-white/[0.03] border border-white/[0.06] text-gray-400 space-y-1 text-left">
- <p className="text-gray-200">Make it sing your words</p>
- <p>The prompt sets the style: comma-separated tags like slow jazz, smoky female vocals, upright bass.</p>
- <p>Only ACE-Step 1.5 sings your own lyrics. The other music models write theirs from the prompt.</p>
- <p>Structure your lines with [Verse], [Chorus] and [Bridge] markers so the model sings them. Plain lines get wrapped in a [Verse] for you.</p>
- <p>Leave the lyrics box empty for an instrumental track, and write in the language you want sung.</p>
- <p>The length slider bills per second, tracks can run up to 4 minutes.</p>
+ {/* Copy lives in music-ui.ts so the claims are asserted, not
+ eyeballed. The local panel used to promise other downloadable
+ models and per-second billing (#108). */}
+ {howtoLines.map((line, i) => (
+ <p key={i} className={i === 0 ? 'text-gray-200' : undefined}>{line}</p>
+ ))}
</div>
</motion.div>
)}
diff --git a/src/lib/render/__tests__/music-ui.test.ts b/src/lib/render/__tests__/music-ui.test.ts
new file mode 100644
index 00000000..954a1b18
--- /dev/null
+++ b/src/lib/render/__tests__/music-ui.test.ts
@@ -0,0 +1,53 @@
+// Regression guard for #108 (ElBiggus): the local Music tab printed cloud
+// facts. It hid the lyrics box while claiming the model writes its own lyrics,
+// described a box that was not on screen, implied other music models were
+// downloadable, and said the length slider bills per second on a machine where
+// nothing is billed.
+import { describe, it, expect } from 'vitest'
+import { musicTakesLyrics, musicHowtoLines } from '../music-ui'
+
+describe('musicTakesLyrics', () => {
+ it('always offers the box locally, because every local checkpoint takes lyrics', () => {
+ expect(musicTakesLyrics('local', false)).toBe(true)
+ expect(musicTakesLyrics('local', true)).toBe(true)
+ })
+
+ it('follows the catalog flag on cloud, where only ace-step-1.5 has the input', () => {
+ expect(musicTakesLyrics('cloud', true)).toBe(true)
+ expect(musicTakesLyrics('cloud', false)).toBe(false)
+ })
+})
+
+describe('musicHowtoLines', () => {
+ const local = musicHowtoLines('local').join('\n').toLowerCase()
+ const cloud = musicHowtoLines('cloud').join('\n').toLowerCase()
+
+ it('never talks about billing on the local tab', () => {
+ expect(local).not.toContain('bill')
+ expect(cloud).toContain('bills per second')
+ })
+
+ it('never promises other music models on the local tab, where there is one', () => {
+ expect(local).not.toContain('other music models')
+ expect(cloud).toContain('other music models')
+ })
+
+ it('only describes the lyrics box where the box exists', () => {
+ // Locally the box is always there, so mentioning it is fair.
+ expect(musicTakesLyrics('local', false)).toBe(true)
+ expect(local).toContain('lyrics box')
+ })
+
+ it('keeps the advice that actually applies to both, the tags and the markers', () => {
+ for (const text of [local, cloud]) {
+ expect(text).toContain('comma-separated tags')
+ expect(text).toContain('[verse]')
+ }
+ })
+
+ it('leads with the heading and stays a short panel', () => {
+ expect(musicHowtoLines('local')[0]).toBe('Make it sing your words')
+ expect(musicHowtoLines('local').length).toBe(5)
+ expect(musicHowtoLines('cloud').length).toBe(6)
+ })
+})
diff --git a/src/lib/render/music-ui.ts b/src/lib/render/music-ui.ts
new file mode 100644
index 00000000..6e88f80a
--- /dev/null
+++ b/src/lib/render/music-ui.ts
@@ -0,0 +1,39 @@
+// What the Music tab may claim, per backend.
+//
+// #108 (ElBiggus) was a page of cloud facts printed at a local user: the tab
+// said the model writes its own lyrics while hiding the lyrics box, the how-to
+// described a box that was not there, promised other downloadable music
+// models, and said the length slider "bills per second" on a machine where
+// nothing is billed. The copy lives here so those claims can be asserted
+// instead of eyeballed.
+
+export type CreateBackendKind = 'local' | 'cloud'
+
+/**
+ * Local music always runs an ACE-Step checkpoint through buildMusicWorkflow,
+ * and that builder feeds `lyrics` into the encoder for every one of them, so
+ * the box is always right locally. Cloud depends on the catalog flag, because
+ * only ace-step-1.5 has a lyrics input on the wire.
+ */
+export function musicTakesLyrics(backend: CreateBackendKind, cloudModelTakesLyrics: boolean): boolean {
+ return backend === 'cloud' ? cloudModelTakesLyrics : true
+}
+
+/** The how-to panel, as lines. First line is the heading. */
+export function musicHowtoLines(backend: CreateBackendKind): string[] {
+ const lines = [
+ 'Make it sing your words',
+ 'The prompt sets the style: comma-separated tags like slow jazz, smoky female vocals, upright bass.',
+ ]
+ if (backend === 'cloud') {
+ lines.push('Only ACE-Step 1.5 sings your own lyrics. The other music models write theirs from the prompt.')
+ }
+ lines.push(
+ 'Structure your lines with [Verse], [Chorus] and [Bridge] markers so the model sings them. Plain lines get wrapped in a [Verse] for you.',
+ 'Leave the lyrics box empty for an instrumental track, and write in the language you want sung.',
+ backend === 'cloud'
+ ? 'The length slider bills per second, tracks can run up to 4 minutes.'
+ : 'The length slider sets the track length, up to 4 minutes. Local runs cost nothing but time.',
+ )
+ return lines
+}