@melite/models-yue2 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: YuE2 music family — YuE2-3B style-plus-lyrics song generation with ABC planning, on the ComfyUI engine from the official Comfy-Org release.
3
- kind: package-library
4
- ---
5
-
6
1
  # @melite/models-yue2
7
2
 
8
3
  `@melite/models-yue2` is the model family package for YuE2-3B music generation (`form_music`, genre audio, engine comfyui): a style caption plus lyrics go in, an ABC plan is drafted, and a song comes out as mp3. The DECL boards the official Comfy-Org release (`Comfy-Org/YuE2`, the `audio_yue2_text2music` template) and declares the `compose` action, one provision, and the required `prompt` relation. The estate boot mounts it as a Cordis plugin through `ctx.models.registerFamily` inside `ctx.effect`; the music card binds the action. The lane is this package's own `actions.ts`, pinned to committed goldens in `tests/golden/`.
package/lib/actions.js CHANGED
@@ -31,6 +31,27 @@ export const compose = {
31
31
  ],
32
32
  facts: parseYue2Facts,
33
33
  build({ p, facts, g, runId }) {
34
+
35
+ // mode precedent, music3/actions.ts: the DECL surface drops the
36
+ // knob, the build refuses the legacy draft). guidance_scale +
37
+ // lm_cfg_scale are the MiniMax lane's vocabulary (KSampler cfg +
38
+ // MiniMaxMusic3TextEncode cfg_scale) — the yue2 DECL serves
39
+ // neither (index.ts params), YuE2GenerateABC/YuE2GenerateMusic
40
+ // declare no such input, and KSampler cfg is the lane's fixed 1.
41
+
42
+ // at compose — the SD-1 wedge (authored-on-music3, switched to
43
+ // yue2). Refuse loud in the knob's own voice; the schema
44
+ // default 1.7 rides (the stated default IS the unstated
45
+ // compose), and an absent knob (direct action callers) rides.
46
+ for (const [knob, lane] of [["guidance_scale", "KSampler cfg"], ["lm_cfg_scale", "the lyric-encoder guidance"]]) {
47
+ const v = p[knob];
48
+ if (v !== undefined && v !== 1.7) {
49
+ throw new Error(`yue2 compose: ${knob} '${String(v)}' fires nothing on this lane — ` +
50
+ `${knob} is the MiniMax lane's vocabulary (${lane}); ` +
51
+ "the YuE2 nodes read style+lyrics+mode only, KSampler cfg is the lane's fixed 1. " +
52
+ "Drop it, or switch lane (model=music3) to steer the MiniMax guidance");
53
+ }
54
+ }
34
55
  const seed = p.seed;
35
56
  const ckpt = g.node("CheckpointLoaderSimple", { ckpt_name: facts.checkpoint });
36
57
  const style = p.prompt;
@@ -40,6 +61,12 @@ export const compose = {
40
61
  // GenerateMusic rides an empty abc (the engine's own off mode);
41
62
  // full/melody ride YuE2GenerateABC with the same style + lyrics.
42
63
  let abc = "";
64
+ // Off is CARD vocabulary the node enum cannot spell (full|melody)
65
+ // and mode is engine-REQUIRED — the off arm wires the engine's
66
+ // own default 'full' over the EMPTY abc (the off semantics live
67
+ // in the missing conditioning, never in a mode literal the enum
68
+ // refuses).
69
+ const nodeMode = mode === "off" ? "full" : mode;
43
70
  if (mode !== "off") {
44
71
  abc = g.node("YuE2GenerateABC", {
45
72
  clip: ckpt.out(1), style, lyrics, seed, mode,
@@ -48,7 +75,7 @@ export const compose = {
48
75
  }).out(0);
49
76
  }
50
77
  const music = g.node("YuE2GenerateMusic", {
51
- clip: ckpt.out(1), style, lyrics, abc, seed, mode,
78
+ clip: ckpt.out(1), style, lyrics, abc, seed, mode: nodeMode,
52
79
  max_duration: p.duration, temperature: 1.0, top_p: 0.95, top_k: 100,
53
80
  repetition_penalty: 1.2,
54
81
  });
package/lib/index.js CHANGED
@@ -11,6 +11,15 @@ export const DECL = {
11
11
  "note": "The official Comfy-Org release (template audio_yue2_text2music); int8 convrot is the template's own quant pick. The bf16 cell and the SheetSage2 cover encoder stay unboarded until a cover lane exists."
12
12
  },
13
13
  "genre": "audio",
14
+
15
+ // user-provided seats (prompt, lyrics) — the compose caller
16
+ // provides them. No variant-class rows: this family's served
17
+ // face exposes no steps+cfg pair (the census's surface-derived
18
+ // carve).
19
+ "required_defaults": [
20
+ { "name": "prompt", "class": "user" },
21
+ { "name": "lyrics", "class": "user" }
22
+ ],
14
23
  "variants": [
15
24
  {
16
25
  "id": "standard",
@@ -21,7 +30,7 @@ export const DECL = {
21
30
  {
22
31
 
23
32
  // Comfy-Org checkpoint the provisions row carries.
24
- "quant": "int8",
33
+ "quant": "int8_convrot",
25
34
  "label": "INT8 ConvRot",
26
35
  "route": "yue2",
27
36
  "vram_peak_gb": 8,
@@ -29,7 +38,7 @@ export const DECL = {
29
38
  ]
30
39
  },
31
40
  {
32
- "id": "short_sting",
41
+ "id": "short-sting",
33
42
  "label": "Short Sting",
34
43
  "hint": "Duration 5s — the card schema's own floor (a sting or loop).",
35
44
  "group": "Recipe",
@@ -37,7 +46,7 @@ export const DECL = {
37
46
  "cells": [],
38
47
  },
39
48
  {
40
- "id": "full_length",
49
+ "id": "full-length",
41
50
  "label": "Full Length",
42
51
  "hint": "Duration 360s — the card schema's own ceiling (full-song length).",
43
52
  "group": "Recipe",
@@ -95,10 +104,17 @@ export const DECL = {
95
104
  ],
96
105
  },
97
106
  // THE LANE SURFACE (the z-image precedent): exactly the knobs the
98
- // music card serves.
107
+ // music card serves. guidance_scale + lm_cfg_scale are NOT served
108
+
109
+ // the MiniMax lane's vocabulary, unread on the YuE2 lane (KSampler
110
+ // cfg is the lane's fixed 1, neither YuE2 node takes the input).
111
+ // Dropping them from the surface makes the compose door refuse a
112
+ // legacy draft stating them (unknown-param refusal, layer 1);
113
+ // actions.ts refuses them at the card path (layer 2). The card
114
+ // schema keeps them (music3's seat) with visible_when music3.
99
115
  "params": [
100
116
  "prompt", "lyrics", "duration", "mode",
101
- "guidance_scale", "n_diffusion_steps", "lm_cfg_scale", "seed",
117
+ "n_diffusion_steps", "seed",
102
118
  ],
103
119
  // THE DECLARED ACTIONS (the atom vocabulary, stroke 3):
104
120
  // the compose action the music card binds (the YuE2-3B lane).
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@melite/models-yue2",
3
- "version": "0.1.5-pre-alpha",
4
- "license": "SSPL-1.0",
3
+ "version": "0.2.2-alpha",
4
+ "license": "AGPL-3.0-or-later",
5
5
  "type": "module",
6
6
  "exports": {
7
7
  ".": {
@@ -11,12 +11,7 @@
11
11
  "./package.json": "./package.json"
12
12
  },
13
13
  "dependencies": {
14
- "@melite/comfyui-card-kit": "0.1.5-pre-alpha"
15
- },
16
- "devDependencies": {
17
- "@types/node": "^22.20.0",
18
- "typescript": "^5.9.3",
19
- "@deepseek-ai/cordis": "^4.0.4"
14
+ "@melite/comfyui-card-kit": "0.2.2-alpha"
20
15
  },
21
16
  "files": [
22
17
  "lib/index.js",
@@ -24,12 +19,29 @@
24
19
  "lib/**/*.d.ts"
25
20
  ],
26
21
  "peerDependencies": {
27
- "@deepseek-ai/cordis": "^4.0.4"
22
+ "@deepseek-ai/cordis": "^4.0.5"
23
+ },
24
+ "description": "YuE2 music family — YuE2-3B style-plus-lyrics song generation with ABC planning, on the ComfyUI engine from the official Comfy-Org release.",
25
+ "repository": {
26
+ "type": "git",
27
+ "url": "https://github.com/JayDataEngineer/melite.git",
28
+ "directory": "packages/models/yue2"
28
29
  },
30
+ "keywords": [
31
+ "melite",
32
+ "comfyui",
33
+ "cordis",
34
+ "agent",
35
+ "media-generation",
36
+ "library"
37
+ ],
29
38
  "scripts": {
30
39
  "build": "tsc -p tsconfig.build.json",
31
40
  "typecheck": "tsc --noEmit"
32
41
  },
42
+ "engines": {
43
+ "node": ">=22.18.0"
44
+ },
33
45
  "publishConfig": {
34
46
  "access": "public"
35
47
  }