@melite/audio-music 0.1.5-pre-alpha → 0.2.2-alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -1,8 +1,3 @@
1
- ---
2
- description: Text-to-music card and agent tool over the MiniMax Music 3 and YuE2-3B stock ComfyUI nodes.
3
- kind: package-library
4
- ---
5
-
6
1
  # @melite/audio-music
7
2
 
8
3
  `@melite/audio-music` is the music card plus the `music` agent tool. Two families board: `music3` (MiniMax Music 3) and `yue2` (YuE2-3B), both on the `compose` action. The lane is stock-only — the nodes live in upstream core (`comfy_extras.nodes_minimax_music`, `nodes_yue2`), so the card declares no `requires`. The cardPackages SSOT composes the card from `./card`; the tool registers through melite-tools' cardTools gate from `./tool`.
package/lib/card.d.ts CHANGED
@@ -12,6 +12,7 @@ export declare const schema: z<Schemastery.ObjectS<NoInfer<{
12
12
  n_diffusion_steps: z<number, number, "defined">;
13
13
  lm_cfg_scale: z<number, number, "defined">;
14
14
  seed: z<number, number, "defined">;
15
+ tiled_decode: z<boolean, boolean, "plain">;
15
16
  }>>, Schemastery.ObjectT<NoInfer<{
16
17
  prompt: z<string, string, "plain">;
17
18
  lyrics: z<string, string, "plain">;
@@ -21,6 +22,7 @@ export declare const schema: z<Schemastery.ObjectS<NoInfer<{
21
22
  n_diffusion_steps: z<number, number, "defined">;
22
23
  lm_cfg_scale: z<number, number, "defined">;
23
24
  seed: z<number, number, "defined">;
25
+ tiled_decode: z<boolean, boolean, "plain">;
24
26
  }>>, "plain">;
25
27
  export declare const BOARDED: string[];
26
28
  /** THE ACTION BINDINGS (the atom vocabulary, stroke 3): the owning
package/lib/card.js CHANGED
@@ -1,20 +1,26 @@
1
1
  import z from '@deepseek-ai/schemastery';
2
2
  import { declaredAction, instantiateAction } from '@melite/comfyui-card-kit';
3
3
  import { DECL as music3Decl } from '@melite/models-music3';
4
+ import { MUSIC3_FULL_STEPS } from '@melite/models-music3';
4
5
  import { DECL as yue2Decl } from '@melite/models-yue2';
5
6
  import { vocabulary } from '@melite/comfyui-card-kit/vocab';
6
7
  import { bag } from '@melite/contracts/extraKeys';
7
8
  import { seedExtra } from '@melite/comfyui-card-kit/fields';
8
9
  import { callableSchema, gatedResolve } from '@melite/comfyui-card-kit/admission';
9
10
  export const schema = z.object({
10
- prompt: z.string().description("Tags / Description").extra('extra', bag({ order: 0, group: "prompt", columns: 1, tooltip: "Structured caption: Genre + Vocal Details + Arrangement. E.g. 'funk, pop, soul, guitar, 105 BPM'.", required: true, wtype: 'textarea', })),
11
- lyrics: z.string().description("Lyrics").extra('extra', bag({ order: 1, group: "prompt", tooltip: "Lyrics with structure tags: [verse], [chorus], [bridge]. Empty = instrumental.", wtype: 'textarea' })),
12
- duration: z.number().description("Duration (s)").min(5).max(360).step(1).default(30).extra('extra', bag({ order: 0, group: "generation", width: 1, tooltip: "Target audio length in seconds (5-360). music3: exact length; YuE2: max length (the song may end earlier).", wtype: 'slider' })),
11
+ prompt: z.string().description("Tags / Description").extra('extra', bag({ order: 0, group: "prompt", columns: 1, tooltip: "Structured caption, three sections: Global Metadata (genre, mood, BPM) + Vocal Details (gender, timbre, range) + Arrangement (instruments, structure). Weak one-word captions end the song early — the tail turns to noise. E.g. 'A funk-pop soul track at 105 BPM; male baritone, warm rasp; clean guitar riff, brass stabs, tight pocket drums'.", required: true, wtype: 'textarea', })),
12
+ lyrics: z.string().description("Lyrics").extra('extra', bag({ order: 1, group: "prompt", tooltip: "The song's PLAN — length lives here, not in Duration. Sung words with structure tags ([verse], [chorus]) for a song. Instrumental: sequential section tags only, each on its own line — [intro] / [instrumental] / [solo] / [instrumental] / [outro] — the model grants ~20-40s per block; repeat blocks to reach target length. An EMPTY box (or a lone [instrumental]) plans one ~35s phrase and ends. Keep 'no vocals, no choir, no humming' in the caption so extended blocks stay instrumental.", wtype: 'textarea' })),
13
+ duration: z.number().description("Duration (s)").min(5).max(360).step(1).default(30).extra('extra', bag({ order: 0, group: "generation", width: 1, tooltip: "Audio length CEILING in seconds (5-360) — never a floor: the model ends the song when its plan ends, not when this number arrives. The plan lives in the LYRICS field — sung words for a song, sequential section tags ([intro] / [instrumental] / [solo] blocks, one per line, ~20-40s each) for an instrumental. An empty or single-tag lyrics box plans ONE phrase and wraps ~35s no matter how high this sits. Long track (>2min) + CUDA OOM: state tiled_decode.", wtype: 'slider' })),
13
14
  mode: vocabulary(["full", "melody", "off"]).description("ABC Planning").default("full").extra('extra', bag({ order: 1, group: "generation", width: 1, tooltip: "YuE2 only: plan a symbolic score before generating. full = melody + chords; melody = melody only (cover-recommended); off = direct generation.", wtype: 'select', visible_when: 'model=yue2' })),
14
- guidance_scale: z.number().description("CFG").min(0.1).max(10).step(0.1).default(1.7).extra('extra', bag({ order: 2, group: "generation", width: 1, tooltip: "Classifier-free guidance (KSampler cfg). 1.7 = lane default.", visible_when: 'model=music3' })),
15
- n_diffusion_steps: z.number().description("Diffusion Steps").min(1).max(200).step(1).default(30).extra('extra', bag({ order: 3, group: "generation", width: 1, tooltip: "Denoising steps. 30 = lane default. Never 0.", wtype: 'number' })),
16
- lm_cfg_scale: z.number().description("LM CFG").min(0.1).max(10).step(0.1).default(1.7).extra('extra', bag({ order: 4, group: "generation", width: 1, tooltip: "Lyric-encoder guidance (MiniMaxMusic3TextEncode cfg_scale). 1.7 = lane default.", visible_when: 'model=music3' })),
15
+ guidance_scale: z.number().description("CFG").min(0.1).max(10).step(0.1).default(1.7).extra('extra', bag({ order: 2, group: "generation", width: 1, tooltip: "Classifier-free guidance (KSampler cfg). 1.7 = the default.", visible_when: 'model=music3' })),
16
+ n_diffusion_steps: z.number().description("Diffusion Steps").min(1).max(200).step(1).default(MUSIC3_FULL_STEPS.default).extra('extra', bag({ order: 3, group: "generation", width: 1, tooltip: "Denoising steps. 30 = the default (the full-schedule checkpoint tier's own default — the step↔checkpoint pairing). A distilled checkpoint states its own tier's window. Never 0.", wtype: 'number' })),
17
+ lm_cfg_scale: z.number().description("LM CFG").min(0.1).max(10).step(0.1).default(1.7).extra('extra', bag({ order: 4, group: "generation", width: 1, tooltip: "Lyric-encoder guidance (MiniMaxMusic3TextEncode cfg_scale). 1.7 = the default.", visible_when: 'model=music3' })),
17
18
  seed: z.number().description("Seed").step(1).default(-1).extra('extra', bag(seedExtra({ order: 0, group: 'seed', width: 1 }))),
19
+ // THE DECODE TIER KNOB (audit 014 C3): NO .default() — absence is
20
+ // the derivation's seat (the action derives plain/tiled from the
21
+ // lane's own VRAM/size signal; a stamped literal here would be the
22
+ // second default home the cure forbids). Stated, it overrides.
23
+ tiled_decode: z.boolean().description("Tiled VAE Decode").extra('extra', bag({ order: 5, group: "generation", width: 1, tooltip: "Decode the audio latent in segments (lower VRAM, no quality loss at the template's 1536/64 seats). Absent = derived from the checkpoint's own numbers — a low-VRAM checkpoint or a track past 90s tiles; a roomy checkpoint at a short track decodes plain.", visible_when: 'model=music3' })),
18
24
  });
19
25
  const schemaFn = callableSchema(schema);
20
26
  // THE FAMILY IDS COME FROM THEIR DECLS (the closure gate's RULE 5):
@@ -90,7 +96,7 @@ export function registerCard(ctx, comfy) {
90
96
  bound(doc, model, g, runId);
91
97
  }
92
98
  else {
93
- throw new Error(`no declared action for family '${String(model.family ?? model.id)}' on the music card — every boarded family (music3, yue2) composes its own declared segment; this address owns none`);
99
+ throw new Error(`no declared action for family '${String(model.family ?? model.id)}' on the music card — every boarded family (music3, yue2) composes its own declared segment; this address owns none. State params.model (one of the boarded families) on the stage to compose it`);
94
100
  }
95
101
  },
96
102
  }));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
- "version": "0.1.5-pre-alpha",
3
- "license": "SSPL-1.0",
2
+ "version": "0.2.2-alpha",
3
+ "license": "AGPL-3.0-or-later",
4
4
  "type": "module",
5
5
  "exports": {
6
6
  ".": {
@@ -18,33 +18,44 @@
18
18
  }
19
19
  },
20
20
  "dependencies": {
21
- "@deepseek-ai/dsh-tools": "0.2.0-rc.1",
22
- "@deepseek-ai/schemastery": "^3.18.4",
23
- "@melite/comfyui-card-kit": "0.1.5-pre-alpha",
24
- "@melite/estate-call": "0.1.5-pre-alpha",
25
- "@melite/contracts": "0.1.5-pre-alpha",
26
- "@melite/models-music3": "0.1.5-pre-alpha",
27
- "@melite/models-yue2": "0.1.5-pre-alpha"
28
- },
29
- "devDependencies": {
30
- "@types/node": "^22.20.0",
31
- "typescript": "^5.9.3",
32
- "@deepseek-ai/cordis": "^4.0.4"
21
+ "@deepseek-ai/dsh-tools": "0.2.1-rc.2",
22
+ "@deepseek-ai/schemastery": "^3.18.5",
23
+ "@melite/contracts": "0.2.2-alpha",
24
+ "@melite/comfyui-card-kit": "0.2.2-alpha",
25
+ "@melite/models-music3": "0.2.2-alpha",
26
+ "@melite/estate-call": "0.2.2-alpha",
27
+ "@melite/models-yue2": "0.2.2-alpha"
33
28
  },
34
29
  "name": "@melite/audio-music",
35
- "description": "the music card (the audio lane) — one card one package: card.ts host face + tool.ts flow face + agents/ context (no ui/ — the view is constructed by @melite/card-base from the emission)",
30
+ "description": "Text-to-music card and agent tool over the MiniMax Music 3 and YuE2-3B stock ComfyUI nodes.",
36
31
  "files": [
37
32
  "lib/index.js",
38
33
  "lib/**/*.js",
39
34
  "lib/**/*.d.ts"
40
35
  ],
41
36
  "peerDependencies": {
42
- "@deepseek-ai/cordis": "^4.0.4"
37
+ "@deepseek-ai/cordis": "^4.0.5"
38
+ },
39
+ "repository": {
40
+ "type": "git",
41
+ "url": "https://github.com/JayDataEngineer/melite.git",
42
+ "directory": "packages/audio/music"
43
43
  },
44
+ "keywords": [
45
+ "melite",
46
+ "comfyui",
47
+ "cordis",
48
+ "agent",
49
+ "media-generation",
50
+ "library"
51
+ ],
44
52
  "scripts": {
45
53
  "build": "tsc -p tsconfig.build.json",
46
54
  "typecheck": "tsc --noEmit"
47
55
  },
56
+ "engines": {
57
+ "node": ">=22.18.0"
58
+ },
48
59
  "publishConfig": {
49
60
  "access": "public"
50
61
  }