@melite/models-h3 0.1.4-alpha → 0.1.5-pre-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 ADDED
@@ -0,0 +1,39 @@
1
+ ---
2
+ description: MiniMax H3 family, joint video and audio generation across timeline, single-shot, and keyframe lanes.
3
+ kind: package-library
4
+ ---
5
+
6
+ # @melite/models-h3
7
+
8
+ The MiniMax H3 family — joint video and audio generation, one family owning three lanes (the one-model law): multi-window timeline films on route `h3-timeline`, single-shot FL2VA and Ref2VA clips on route `h3-fl2va`, and the keyframe lane. The survivor-id correction (2026-09-22) fixed the fold: the family is `h3`, a model names a checkpoint, and a variant names a lane — the old `h3-timeline` address survives as the timeline lane's route, and a dead-era draft addressing `h3` resolves to the family default, the timeline lane, the one deliberate behavior shift. The family serves a catalog row (offered, comfyui) with a studio block: the `video/h3-timeline` tenant owns the card's parameters — calls, keyframes, sampling, SLA sparsity, sharpen, interpolation, super-resolution, audio, loras, document.
9
+
10
+ Provisions pin the downloaded weights with sha256 digests, byte sizes, and target folders. The mods row boards the loras pack and marries steps with max: eleven user-picked distill and refiner rows (LightX2V, Kijai, the arena winners, DMAD, TaoMate) — no recipe stamps them; the absent-bag default builds from the catalog's `h3_lightx2v_turbo` row, and a missing row refuses at load.
11
+
12
+ The film action is the single seat of the video lane: the card's schema gate runs card-side, then dispatches here; the action owns the t4r guide admission, the clips law, the lora steps, and both renderers, and returns the artifact handle. The timeline contract pins the frame math: 22-frame seam overlap, the 22+17k carried grid capped at 362 frames, and the 9-slot image bus with caps (8 images, 3 videos, 3 audios, 8 refmods). The film mix owns the audio placement math — one owner that both the compose stamps and the film-time overlay read; a positioned clip row without a numeric start frame refuses loud. The schema module mirrors the h3-timeline card's param schema 1:1 — one spelling, never a second copy.
13
+
14
+ Beyond the package entry, the manifest exports `./mods/loras` (the flavor rows), `./actions` (the film action), `./schema` (the param carrier), `./timelineContract` (the frame grid), and `./filmMix` (the audio mix).
15
+
16
+ ## Declaration
17
+
18
+ `src/index.ts` declares the DECL and the `family-h3` plugin; the subpath modules above are the family's published seams for the card, the flow, and the agents that read them.
19
+
20
+ ## Model Experience
21
+
22
+ #### What the model sees
23
+
24
+ None — the package contributes no model-visible input. The DECL serves the estate's model catalog (label, description, variants, defaults) and the h3-timeline card that boards the family; it registers no session events and writes no prompt segments.
25
+
26
+ #### Token effect
27
+
28
+ Zero-direct token effect — the package registers a model family and composes engine graphs; it writes no prompt text into any model request.
29
+
30
+ #### KV Cache effect
31
+
32
+ Independent — the package contributes no persistent prompt prefix, so registering or removing the family invalidates nothing cached.
33
+
34
+ ## Known Limitations and Deferred Work
35
+
36
+ - **LoRA steps marry at max** — while a counting bag row rides, steps are the bag's (the higher designed count wins across the rows); an authored step count loses to the designed one.
37
+ - **The carried grid refuses off-grid spans** — authored ranges must land on the 22+17k grid; the contract asserts and refuses with the legal neighboring end frames rather than snapping silently.
38
+ - **Ref caps are loud** — 9 image-bus slots (8 loose references, 7 with a last-frame anchor), 3 videos, 3 audios, 8 refmods; an over-cap stack refuses at the gate, never rides silent.
39
+ - **Dense-LoRA adaln drops are watched, not yet guarded** — a dense row can silently drop 51 adaln_proj keys on the pruned base; the guard rides the arena's first stacked load.
package/lib/actions.js CHANGED
@@ -1,21 +1,23 @@
1
+ import { fireControlNets } from '@melite/comfyui-card-kit/guard';
1
2
  import { saveAudio } from '@melite/comfyui-card-kit';
2
3
  import { FAMILIES, paramSchema, wireList, H3_RECOMMENDED_SAMPLERS } from "./schema.js";
3
4
  import { H3_LORA_ROWS } from '@melite/models-h3/mods/loras';
4
5
  import { SAMPLER_OPTIONS, SCHEDULER_OPTIONS } from '@melite/comfyui-card-kit/vocab';
5
6
  import { computeFilmMix, parseFilmMixClips, stanzaSecs } from "./filmMix.js";
6
- import { GRID_REMAINDER, GRID_STEP_FRAMES, IMAGE_BUS_SLOTS, REF_CAPS, assertGridLength, assertSpanGrid, imageReferenceCap, mergeDeclaredRefs, spanStanzaFrames, transitionOverlap, } from "./timelineContract.js";
7
+ import { GRID_REMAINDER, GRID_STEP_FRAMES, IMAGE_BUS_SLOTS, REF_CAPS, assertGridLength, assertSpanGrid, imageReferenceCap, spanStanzaFrames, transitionOverlap, } from "./timelineContract.js";
7
8
 
8
- // built from the family lora CATALOG (mods/loras.ts — the one owner
9
- // of every lora filename and default strength; the value was
10
- // restated as a literal here, which is how a catalog edit would
11
- // have silently missed the default). The wire shape matches a
12
- // resolved bag row: on, lora (filename), str (default_strength),
13
- // plus the four fixed mode flags. A missing catalog row refuses at
14
- // load — the default would have no source.
9
+ // the ByteDance DMAD row — operator: "the one from bytedance" is the
10
+ // default): the DMAD 4-step row, built from the family lora
11
+ // CATALOG (mods/loras.ts — the one owner of every lora filename and
12
+ // default strength; the value was restated as a literal here, which
13
+ // is how a catalog edit would have silently missed the default).
14
+ // The wire shape matches a resolved bag row: on, lora (filename),
15
+ // str (default_strength), plus the four fixed mode flags. A missing
16
+ // catalog row refuses at load — the default would have no source.
15
17
  const loraStackDefault = () => {
16
- const row = H3_LORA_ROWS.find((r) => r.id === 'h3_lightx2v_turbo');
18
+ const row = H3_LORA_ROWS.find((r) => r.id === 'h3_dmad_4step');
17
19
  if (row === undefined) {
18
- throw new Error("h3 action: the lora catalog has no 'h3_lightx2v_turbo' row — the absent-bag default has no source; fix the catalog row id");
20
+ throw new Error("h3 action: the lora catalog has no 'h3_dmad_4step' row — the absent-bag default has no source; fix the catalog row id");
19
21
  }
20
22
  return JSON.stringify([{ on: true, lora: row.filename, str: row.default_strength, v: 1, a: 1, t: 1 }]);
21
23
  };
@@ -97,7 +99,7 @@ export const assertOverlayGated = (doc, where) => {
97
99
  * (the node's context_frames arm). prev_sec scales the carry:
98
100
  * picture snapped to the node's legal context lengths (5/22/39/56
99
101
  * frames — only whole latent steps), audio at 24 frames/second. */
100
- function renderH3Film(p, g, facts) {
102
+ function renderH3Film(p, g, facts, model) {
101
103
  // (the compose dispatch guarantees calls is a non-empty array here)
102
104
  const calls = p.calls;
103
105
  const str = (v) => (typeof v === 'string' ? v : '');
@@ -307,8 +309,25 @@ function renderH3Film(p, g, facts) {
307
309
  '\n\noverall_soundscape:\nNo speech or dialogue in this shot — ambient and effects only; nobody speaks on screen and there is no voice-over.';
308
310
  }
309
311
  const stanza = { ...p, ...knobs, prompt: text, k };
312
+
313
+ // its media lanes DIRECTLY — last_frame / ref_images /
314
+ // ref_videos / ref_audios on the call row — and the schema
315
+ // admits them (the media gate walks them), so the compose MUST
316
+ // read them or they die schema-green and engine-blind. A stated
317
+ // lane REPLACES the declared (film) lane, an absent one
318
+ // inherits — the same per-seat canon the refs bag rides.
319
+ if (typeof call.last_frame === 'string' && call.last_frame.trim() !== '')
320
+ stanza.last_frame = call.last_frame;
321
+ if (wireList(call.ref_images).length > 0)
322
+ stanza.ref_images = call.ref_images;
323
+ if (wireList(call.ref_videos).length > 0)
324
+ stanza.ref_videos = call.ref_videos;
325
+ if (wireList(call.ref_audios).length > 0)
326
+ stanza.ref_audios = call.ref_audios;
327
+ const hasDirectRefs = wireList(call.ref_images).length + wireList(call.ref_videos).length + wireList(call.ref_audios).length > 0
328
+ || (typeof call.last_frame === 'string' && call.last_frame.trim() !== '');
310
329
  const anyStamp = stamps.dialogue !== undefined || stamps.sfx !== undefined || stamps.music !== undefined;
311
- stanza.variant = (guide !== '' || hasRefs || anyStamp) ? 't4r' : chainLike ? 't4_chain' : 't4_open';
330
+ stanza.variant = (guide !== '' || hasRefs || hasDirectRefs || anyStamp) ? 't4r' : chainLike ? 't4_chain' : 't4_open';
312
331
  // the distill's steps apply unless this call's knobs pinned steps
313
332
  if (knobs.steps === undefined && loraStepsApplied !== null)
314
333
  stanza.steps = loraStepsApplied;
@@ -319,7 +338,15 @@ function renderH3Film(p, g, facts) {
319
338
  const voicePinned = stamps.dialogue !== undefined || stamps.sfx !== undefined;
320
339
  if (voicePinned)
321
340
  delete stanza.ref_audios;
322
- if (hasRefs)
341
+
342
+ // ANY lane rides it — refs (bundle bus) OR mods (conditioning
343
+ // tokens). The operator caught the hole live: a mods-only call
344
+ // lost its whole bag (hasRefs counted only the bus lanes, so the
345
+ // reference packs silently died). Mods never flip the arm (the
346
+ // refmod seam's own law below), so the gate widened here is the
347
+ // one behavior change — a mods-only call stays FL2VA.
348
+ const callMods = wireList(rb.mods);
349
+ if (hasRefs || callMods.length > 0)
323
350
  stanza.refs = voicePinned && Array.isArray(call.refs?.audios)
324
351
  ? { ...call.refs, audios: undefined }
325
352
  : call.refs;
@@ -389,7 +416,7 @@ function renderH3Film(p, g, facts) {
389
416
  stanza.sfx_slice = stamps.sfx;
390
417
  if (stamps.music !== undefined)
391
418
  stanza.music_slice = stamps.music;
392
- const h = g.scoped(`window${k}_`, (w) => renderH3Window(stanza, w, facts));
419
+ const h = g.scoped(`window${k}_`, (w) => renderH3Window(stanza, w, facts, model));
393
420
  prev = h;
394
421
  /* v8 ignore next 1 -- both family arms assign the passthrough (every path saves); a future arm that forgets is refused loud at the film tail */
395
422
  if (h.savePassthrough !== undefined)
@@ -545,7 +572,43 @@ function renderH3Film(p, g, facts) {
545
572
  format: 'mp4', codec: 'h264',
546
573
  }).out();
547
574
  }
548
- function renderH3Window(p, g, facts) {
575
+ /** THE FUN-CONTROLNET CHAIN (002 H2/H4 + 007 L7): family-owned,
576
+ * the LTX_lora_loader precedent — the node pair is the family's
577
+ * own (ModelPatchLoader + MiniMaxH3FunControlNetApply, the
578
+ * engine's model-patch spelling), spelled HERE, never swapped
579
+ * into the kit's still-image stackControlNets (whose node pair
580
+ * stays z-image's). One link per fired pick, array order = apply
581
+ * order, empty picks → the bare model (byte-stable). The control
582
+ * source rides the pick's clip channel (a staged video artifact —
583
+ * LoadVideo → GetVideoComponents' image stream) or its still
584
+ * image; the mask channel rides LoadImageMask (alpha; the node
585
+ * reads it with source_video unset — no presumption about the
586
+ * video behind the mask). The schedule window stamps verbatim:
587
+ * the row declares 'ranged' and the node carries the dials (the
588
+ * kit's schedule law already refused what the row forbids). */
589
+ function applyH3FunControlNets(g, model, vae, picks) {
590
+ let cur = model;
591
+ for (const pick of picks) {
592
+ const hasClip = pick.clip !== undefined && pick.clip !== '';
593
+ const control = hasClip
594
+ ? g.node('GetVideoComponents', { video: g.node('LoadVideo', { file: pick.clip }).out() }).out(0)
595
+ : pick.image !== ''
596
+ ? g.node('LoadImage', { image: pick.image, upload: 'image' }).out(0)
597
+ : undefined;
598
+ const hasMask = pick.mask !== undefined && pick.mask !== '';
599
+ const patch = g.node('ModelPatchLoader', { name: pick.model }).out();
600
+ cur = g.node('MiniMaxH3FunControlNetApply', {
601
+ model: cur, model_patch: patch, vae,
602
+ strength: pick.strength,
603
+ start_percent: pick.start_percent ?? 0,
604
+ end_percent: pick.end_percent ?? 1,
605
+ ...(control === undefined ? {} : { control_video: control }),
606
+ ...(hasMask ? { mask: g.node('LoadImageMask', { image: pick.mask, channel: 'alpha' }).out(0) } : {}),
607
+ }).out();
608
+ }
609
+ return cur;
610
+ }
611
+ function renderH3Window(p, g, facts, model) {
549
612
  // REFS IMPLY THE R2V LANE (the bundle IS the r2v input): a
550
613
  // refs-carrying window is t4r even without a guide still — the
551
614
  // same law the film renderer applies per call. The DECLARED input
@@ -554,12 +617,22 @@ function renderH3Window(p, g, facts) {
554
617
  const rb0 = (p.refs ?? {});
555
618
  const declaredCount = wireList(p.ref_images).length + wireList(p.ref_videos).length + wireList(p.ref_audios).length;
556
619
  const hasRefs = declaredCount + wireList(rb0.images).length + wireList(rb0.videos).length + wireList(rb0.audios).length > 0;
557
- if (hasRefs && p.variant !== 't4r')
558
- p = { ...p, variant: 't4r' };
559
- const family = p.variant;
560
- if (!FAMILIES.includes(family)) {
561
- throw new Error(`unknown window family '${String(p.variant)}' (known: ${[...FAMILIES].sort().join(', ')})`);
562
- }
620
+
621
+ // variant:'timeline' break): the window family is DERIVED from
622
+ // the window's own seats — a guide still or a reference bus makes
623
+ // the reference lane; everything else is text. SEATS BEAT STATED:
624
+ // refs coerce the lane even over a stated lawful family (the old
625
+ // refs-imply-r2v coercion — a refs-carrying window is t4r even
626
+ // without a guide still). A stated LAWFUL family rides only when
627
+ // the seats are silent (the film loop derives per stanza before
628
+ // calling here; the schema walk derives from the same seats); an
629
+ // axis-seeded string ('timeline' — the model axis the add door
630
+ // stamps onto every fresh stage) is not a family and never was:
631
+ // the seats own the lane, model metadata never picks one.
632
+ const statedFamily = typeof p.variant === 'string' && FAMILIES.includes(p.variant)
633
+ ? p.variant : undefined;
634
+ const guide0 = [p.image, p.image_name, p.ref_image].some((v) => typeof v === 'string' && v.trim() !== '');
635
+ const family = (hasRefs || guide0) ? 't4r' : (statedFamily ?? 't4_open');
563
636
  const k = (p.k ?? 1);
564
637
  // THE GRID GATE (§26, defense in depth): no window renders
565
638
  // off-grid — the film loop's pin check voices the call span, this
@@ -671,7 +744,11 @@ function renderH3Window(p, g, facts) {
671
744
  }).out();
672
745
  // THE ANCHOR + THE REFERENCE BUNDLE (the operator's distinction,
673
746
 
674
- // the frozen served shape); `refs` is the call's REFERENCE bundle
747
+ // the frozen served shape — ref_image_0 on the r2v node, the
748
+ // strongest identity pull; the window's literal first frame
749
+ // GENERATES under its guidance, it is never pinned — the i2v
750
+ // first-frame input is the orphaned marker below); `refs` is the
751
+ // call's REFERENCE bundle
675
752
  // — the upstream "Extra References" subgraph's own vocabulary
676
753
  // (LoadImage → the ref resizer; LoadVideo → GetVideoComponents →
677
754
  // the image+audio component pair; LoadAudio). Bundle layout (the
@@ -681,10 +758,17 @@ function renderH3Window(p, g, facts) {
681
758
  // the reference resizer (bundle → r2v refs) before the geometry
682
759
  // resizer (i2v) — creation mirrors the walk.
683
760
  const refBag = (p.refs ?? {});
684
- // THE DECLARED-SURFACE MERGE (the input rail's law): the typed
685
- // fields (ref_images/ref_videos/ref_audios — Layer A, stamped
686
- // onto every stanza) are PRIMARY; the legacy stanza bag's
687
- // entries append, deduped. One wire form, one reader.
761
+
762
+ // is the card's DEFAULTS; a call (Layer B) REPLACES a refs lane
763
+ // it states — per lane, never per bag — and inherits the
764
+ // declared lane when it states none. The pre-canon merge
765
+ // (declared PRIMARY + bag appended, deduped) made a call unable
766
+ // to override the run's references: the exact harm the operator
767
+ // named. LoRAs own the opposite pole — CALL_KEYS admits no
768
+ // loras key, so a call cannot even state one (film-level model
769
+ // configuration is Layer A's alone). One canon, per seat:
770
+ // replace (refs lanes), per-key replace (CALL_KNOB_KEYS), or
771
+ // none (loras, geometry, the bed).
688
772
  const declaredImages = wireList(p.ref_images);
689
773
  const declaredVideos = wireList(p.ref_videos);
690
774
  const declaredAudios = wireList(p.ref_audios);
@@ -697,14 +781,41 @@ function renderH3Window(p, g, facts) {
697
781
  // image stream — and be silently clobbered; the law refuses
698
782
  // LOUD instead.
699
783
  const lastFrame = (p.last_frame ?? '');
700
- const refImagesAll = mergeDeclaredRefs(declaredImages, wireList(refBag.images));
784
+ // THE CANON'S REPLACE ARM (per lane): a stated call lane rides
785
+ // INSTEAD of the declared lane; an absent call lane inherits it.
786
+ const bagImages = wireList(refBag.images);
787
+ const refImagesAll = bagImages.length > 0 ? bagImages : declaredImages;
701
788
  const imageCap = imageReferenceCap(lastFrame !== '');
702
789
  if (lastFrame !== '' && refImagesAll.length > imageCap) {
703
790
  throw new Error(`[h3-timeline] the image bus is full: a last frame (input 2) + ${String(refImagesAll.length)} references exceeds the ${IMAGE_BUS_SLOTS}-slot bus — keep references ≤ ${imageCap} with an end anchor (≤ ${REF_CAPS.images} without)`);
704
791
  }
705
792
  const refImages = refImagesAll.slice(0, imageCap);
706
- const refVideos = mergeDeclaredRefs(declaredVideos, wireList(refBag.videos)).slice(0, REF_CAPS.videos);
707
- const refAudios = mergeDeclaredRefs(declaredAudios, wireList(refBag.audios)).slice(0, REF_CAPS.audios);
793
+ const bagVideos = wireList(refBag.videos);
794
+ const refVideos = (bagVideos.length > 0 ? bagVideos : declaredVideos).slice(0, REF_CAPS.videos);
795
+ // THE TRIM SEAT'S READER (audit 003/V4): index-paired with
796
+ // ref_videos — schema resolve fills each entry's start_time/
797
+ // duration defaults, so a wire `{item:…}` or partial entry
798
+ // normalizes before it reaches the slice. A non-object entry
799
+ // refuses LOUD (the probe-proven law), never rides silent.
800
+ const rawTrims = Array.isArray(p.ref_video_trims) ? p.ref_video_trims : [];
801
+ if (rawTrims.length > REF_CAPS.videos) {
802
+ throw new Error(`ref_video_trims: expected at most ${REF_CAPS.videos} entries (the video lane's cap) — got ${rawTrims.length}`);
803
+ }
804
+ const videoTrims = rawTrims.map((e, i) => {
805
+ if (typeof e !== 'object' || e === null || Array.isArray(e)) {
806
+ throw new Error(`ref_video_trims: entry ${i} must be an object { start_time, duration } — got ${JSON.stringify(e).slice(0, 40)}`);
807
+ }
808
+ const row = e;
809
+ const start = row.start_time;
810
+ const dur = row.duration;
811
+ if (start !== undefined && typeof start !== 'number')
812
+ throw new Error(`ref_video_trims: entry ${i} start_time must be a number — got ${JSON.stringify(start).slice(0, 40)}`);
813
+ if (dur !== undefined && typeof dur !== 'number')
814
+ throw new Error(`ref_video_trims: entry ${i} duration must be a number — got ${JSON.stringify(dur).slice(0, 40)}`);
815
+ return { start_time: start ?? 0, duration: dur ?? 0 };
816
+ });
817
+ const bagAudios = wireList(refBag.audios);
818
+ const refAudios = (bagAudios.length > 0 ? bagAudios : declaredAudios).slice(0, REF_CAPS.audios);
708
819
  const bundleInputs = {};
709
820
 
710
821
  // it all"): a '$name' value names a WIRED STAGE INPUT, never a
@@ -758,7 +869,20 @@ function renderH3Window(p, g, facts) {
758
869
  // the spelled motion guide rides GetVideoComponents' tensor
759
870
  // input directly (the producer's pre-save video tensor); a
760
871
  // path keeps the LoadVideo disk handoff.
761
- const vid = isSpell(src) ? src : g.node('LoadVideo', { file: src }).out();
872
+ let vid = isSpell(src) ? src : g.node('LoadVideo', { file: src }).out();
873
+ // THE TRIM THREAD (audit 003/V4): entry i slices guide i
874
+ // through the engine's own Video Slice BEFORE conditioning —
875
+ // both arms (spelled tensor and disk path) trim the same,
876
+ // because the slice rides the VIDEO tensor either way. A
877
+ // zero/zero or absent entry builds no node: the whole clip
878
+ // stays the guide, byte-stable with the pre-trim graph.
879
+ const trim = videoTrims[i];
880
+ if (trim !== undefined && (trim.start_time > 0 || trim.duration > 0)) {
881
+ vid = g.node('Video Slice', {
882
+ video: vid, start_time: trim.start_time,
883
+ duration: trim.duration, strict_duration: false,
884
+ }).out();
885
+ }
762
886
  const comp = g.node('GetVideoComponents', { video: vid });
763
887
  bundleInputs[`input_${10 + 2 * i}`] = comp.out(0);
764
888
  bundleInputs[`input_${11 + 2 * i}`] = comp.out(1);
@@ -981,6 +1105,60 @@ function renderH3Window(p, g, facts) {
981
1105
  latent = r2v.out(1);
982
1106
  fpsInput = 24;
983
1107
  }
1108
+
1109
+ // mods — .safetensors packs extracted under the engine's
1110
+ // models/refmods/ — appended to the conditioning's reference
1111
+ // tokens through ALL DiT blocks (the pack rides the model's
1112
+ // native ref2va path; it spends conditioning-side tokens, never a
1113
+ // bundle-bus slot, so the refs-imply-r2v law does not fire on a
1114
+ // mod and BOTH arms share this one seam — Apply accepts the core
1115
+ // CONDITIONING either r2v arm emits and returns the same type).
1116
+ // Paths in, stems out: the loader's combo enumerates
1117
+ // models/refmods/ stems, so a path arrives as its basename minus
1118
+ // .safetensors — anything the engine cannot resolve refuses HERE,
1119
+ // loud, instead of dying server-side as a combo miss (the I2V
1120
+ // census-alignment law).
1121
+
1122
+ // the run-level list — the canon's refs-lane arm (a stated call
1123
+ // lane rides INSTEAD of the declared lane; absent inherits).
1124
+ // Comma strings (the UI wire form) and arrays (the agent form)
1125
+ // both resolve through wireList; the cap check below guards the
1126
+ // EFFECTIVE list.
1127
+ const bagMods = wireList(rb0.mods);
1128
+ const refModsAll = bagMods.length > 0 ? bagMods : wireList(p.ref_mods);
1129
+ if (refModsAll.length > 0) {
1130
+ if (refModsAll.length > REF_CAPS.refmods) {
1131
+ throw new Error(`[h3-timeline] ref_mods exceeds the loader's ${String(REF_CAPS.refmods)} slots (saw ${String(refModsAll.length)})`);
1132
+ }
1133
+ const modStem = (src) => {
1134
+ // Trim, then query-strip (the estate precedent:
1135
+ // timelineContract's _kindOfFile splits '?' first), then split
1136
+ // on BOTH separators — a backslash-prefixed or padded entry
1137
+ // would otherwise pass the suffix check with junk baked into
1138
+ // the stem and die server-side as a combo miss. The two `as`
1139
+ // casts are total (split always yields a non-empty array), so
1140
+ // this adds no defensive branches to the coverage face.
1141
+ const query = src.trim().split('?')[0];
1142
+ const base = query.split(/[\\/]/).pop();
1143
+ if (!base.endsWith('.safetensors')) {
1144
+ throw new Error(`[h3-timeline] ref_mods entries are .safetensors mods under models/refmods/ (saw '${src}')`);
1145
+ }
1146
+ return base.slice(0, -'.safetensors'.length);
1147
+ };
1148
+ const loaderInputs = { show_info: false };
1149
+ for (let i = 0; i < REF_CAPS.refmods; i++) {
1150
+ const src = refModsAll[i];
1151
+ loaderInputs[`mod_${i + 1}`] = src === undefined ? '(none)' : modStem(src);
1152
+ loaderInputs[`strength_${i + 1}`] = 1;
1153
+ loaderInputs[`copies_${i + 1}`] = 1;
1154
+ }
1155
+ const mods = g.node('MiniMaxH3RefModsLoader', loaderInputs).out(0);
1156
+ cond = g.node('MiniMaxH3RefModApply', {
1157
+ conditioning: cond, mods, override: false, retention: 1,
1158
+ curve_direction: 'constant', scramble_seed: -1,
1159
+ curve_shape: 'linear', curve_value: 1,
1160
+ }).out(0);
1161
+ }
984
1162
  // ── sampler stack ──────────────────────────────────────────────────
985
1163
  // card knob first (seed), renderer alias second.
986
1164
  const noise = g.node('RandomNoise', { noise_seed: (p.noise_seed ?? p.seed) }).out();
@@ -996,6 +1174,16 @@ function renderH3Window(p, g, facts) {
996
1174
  // template carries switch=false as a LITERAL, not a bool node
997
1175
  sampler = g.node('ComfySwitchNode', { switch: false, on_true: ersde, on_false: samplerSel }).out();
998
1176
  }
1177
+ // THE FUN-CONTROLNET SEAT (007 L7): one insertion past the sigma
1178
+ // shift, BOTH t4 arms by construction (each arm assigns sigmaModel
1179
+ // above; every downstream consumer — BasicScheduler, BasicGuider,
1180
+ // the continuation seam, the soft-AV release — rides the chain's
1181
+ // tail). Empty picks → sigmaModel verbatim (byte-stable); entries
1182
+ // fire only when the family boards the controlnet pack (the kit's
1183
+ // boarding gate — the rows are the operator's BENCH row, 002 H1)
1184
+ // and every row fact (schedule capability, strength ceiling, the
1185
+ // clip/mask channels) arrived stamped by the service resolution.
1186
+ sigmaModel = applyH3FunControlNets(g, sigmaModel, vaeVideo, fireControlNets(model, p));
999
1187
  const schedName = p.sched_name;
1000
1188
  const denoiseVal = p.denoise;
1001
1189
  const sched = g.node('BasicScheduler', {
@@ -1257,6 +1445,7 @@ export const film = {
1257
1445
  { name: "ref_images", type: "image_list" },
1258
1446
  { name: "ref_videos", type: "image_list" },
1259
1447
  { name: "ref_audios", type: "image_list" },
1448
+ { name: "ref_mods", type: "image_list" },
1260
1449
  { name: "duck_depth_db", type: "number", bounds: [-48, 0] },
1261
1450
  { name: "seed", type: "number", rule: "seed-sentinel" },
1262
1451
  { name: "width", type: "number", bounds: [448, 1344] },
@@ -1303,10 +1492,78 @@ export const film = {
1303
1492
  { name: "image_name", type: "string" },
1304
1493
  ],
1305
1494
  facts: parseH3Facts,
1306
- build({ p: docIn, facts, g }) {
1495
+ build({ p: docIn, facts, g, model }) {
1307
1496
  const p = { ...docIn };
1497
+
1498
+ // single-call doc rides the frozen single-window arm below —
1499
+ // which renders the DOC surface, never the row. Without this
1500
+ // unpack the sole call's Layer B seats (refs bag, anchor image,
1501
+ // text, render knobs) died silently on every single-call doc:
1502
+ // the split-brain twin of the film loop's bag gate. One stanza
1503
+ // law, both arms: the row REPLACES the refs bag / anchor / text
1504
+ // seats it states (per-lane, per-seat); knobs replace per key;
1505
+ // unstated seats inherit the doc.
1506
+ {
1507
+ const row = Array.isArray(p.calls) && p.calls.length === 1
1508
+ ? p.calls[0]
1509
+ : null;
1510
+ if (row !== null) {
1511
+ const rowText = typeof row.text === 'string' ? row.text.trim() : '';
1512
+ if (rowText !== '')
1513
+ p.prompt = row.text;
1514
+ if (row.refs !== undefined && row.refs !== null)
1515
+ p.refs = row.refs;
1516
+ const rowImage = typeof row.image === 'string' ? row.image.trim() : '';
1517
+ if (rowImage !== '')
1518
+ p.image = row.image;
1519
+
1520
+ // law): the row's DIRECT media lanes ride onto p — the same
1521
+ // per-seat replace canon the stanza arm carries; before this
1522
+ // lift a single-window doc's row-level refs died unread.
1523
+ if (typeof row.last_frame === 'string' && row.last_frame.trim() !== '')
1524
+ p.last_frame = row.last_frame;
1525
+ if (wireList(row.ref_images).length > 0)
1526
+ p.ref_images = row.ref_images;
1527
+ if (wireList(row.ref_videos).length > 0)
1528
+ p.ref_videos = row.ref_videos;
1529
+ if (wireList(row.ref_audios).length > 0)
1530
+ p.ref_audios = row.ref_audios;
1531
+ const rowKnobs = (row.knobs ?? null);
1532
+ if (rowKnobs !== null)
1533
+ Object.assign(p, rowKnobs);
1534
+ }
1535
+ }
1308
1536
  const guideImage = (p.image ?? p.image_name ?? '');
1309
- if (p.variant === 't4r' && !guideImage) {
1537
+
1538
+ // LAWFUL stated family in conflict with a guide still refuses
1539
+ // loud — an explicit t4_open/t4_chain pin over an anchored doc
1540
+ // is a contract conflict, named at build. An axis-seeded string
1541
+ // ('timeline' — model metadata, not a family claim) never
1542
+ // reaches this guard: the seats derive the family and the
1543
+ // guide owns the reference lane.
1544
+ const statedFamily = typeof p.variant === 'string' && FAMILIES.includes(p.variant)
1545
+ ? p.variant : undefined;
1546
+ if (guideImage !== '' && statedFamily !== undefined && statedFamily !== 't4r') {
1547
+ const rbRef = (p.refs ?? {});
1548
+ const refsCarry = wireList(rbRef.images).length + wireList(rbRef.videos).length + wireList(rbRef.audios).length
1549
+ + wireList(p.ref_images).length + wireList(p.ref_videos).length + wireList(p.ref_audios).length > 0
1550
+ || (typeof p.last_frame === 'string' && p.last_frame.trim() !== '');
1551
+ if (!refsCarry) {
1552
+ throw new Error(`h3_window: a guide image ("${guideImage.trim()}") rides only the t4r reference lane — ` +
1553
+ `this doc's variant is '${String(p.variant)}'. State no variant (the walk derives t4r from ` +
1554
+ 'the guide) or clear the guide; never a silent text-only render of a reference shot');
1555
+ }
1556
+ }
1557
+
1558
+ // the guard below polices "t4r without a guide" — but the
1559
+ // run-899a8448 rot was the INVERSE hole: a guide present while
1560
+ // variant derived t4_open (the schema derivation missed the
1561
+ // `image` spelling), so renderH3Window took the non-reference
1562
+ // arm, the anchor arm inside `if (isT4r)` never ran, and the
1563
+ // window rendered text-only with the user's reference silently
1564
+ // dead. A guide-bearing window that is not t4r and carries no
1565
+ // reference bus REFUSES here — one law, both directions.
1566
+ if (statedFamily === 't4r' && !guideImage) {
1310
1567
  // (refs-implied t4r windows carry no anchor — the bundle IS
1311
1568
  // the r2v input; the guard admits them via the refs law — the
1312
1569
  // legacy stanza bag AND the declared input surface (the rail's
@@ -1320,15 +1577,18 @@ export const film = {
1320
1577
  'compose always injects LoadImage.0.image on this family');
1321
1578
  }
1322
1579
  }
1323
- // THE FILM DISPATCH: a multi-call chain doc with no per-window
1324
- // stanza markers (k absent — the stanza vocabulary) composes
1325
- // the MERGED film; everything else is the frozen single-window
1326
- // shape (served byte-identical).
1580
+
1581
+ // calls ARE the grammar — more than one call with no per-window
1582
+ // stanza markers (k absent) composes the MERGED film; everything
1583
+ // else is the frozen single-window shape. The variant string
1584
+ // NEVER gates this seat: it is axis metadata ('timeline') or a
1585
+ // schema stamp derived from these same calls — reading it here
1586
+ // demoted multi-window docs to one window and burned the
1587
+ // operator's timing (bench-session-2d6af763, variant:'timeline').
1327
1588
  const docCalls = Array.isArray(p.calls) ? p.calls : null;
1328
- const isFilm = docCalls !== null && docCalls.length > 1
1329
- && p.k === undefined && (p.variant === undefined || p.variant === 't4_chain');
1589
+ const isFilm = docCalls !== null && docCalls.length > 1 && p.k === undefined;
1330
1590
  if (isFilm)
1331
- return renderH3Film(p, g, facts);
1591
+ return renderH3Film(p, g, facts, model);
1332
1592
 
1333
1593
  // FILM-path consumer (it rides the accumulated film audio).
1334
1594
  // On the frozen single-window shape it would be a silent
@@ -1360,7 +1620,7 @@ export const film = {
1360
1620
  p.steps = Math.max(...applied);
1361
1621
  }
1362
1622
  }
1363
- return renderH3Window(p, g, facts).savePassthrough;
1623
+ return renderH3Window(p, g, facts, model).savePassthrough;
1364
1624
  },
1365
1625
  };
1366
1626
  //# sourceMappingURL=actions.js.map
package/lib/index.d.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  import type { Plugin } from "@deepseek-ai/cordis";
2
- import type { ModelDecl } from "@melite/comfyui-cordis/model-contract";
2
+ import type { ModelDecl } from '@melite/comfyui-card-kit/model-contract';
3
3
  export declare const DECL: ModelDecl;
4
4
  export declare const family: Plugin;
5
5
  export { finalizeH3, H3_T4_STRIP } from "./finalize.js";
6
6
  export { assertOverlayGated } from "./actions.js";
7
+ export { family as default };
7
8
  //# sourceMappingURL=index.d.ts.map
package/lib/index.js CHANGED
@@ -5,9 +5,10 @@ export const DECL = {
5
5
  "label": "MiniMax H3",
6
6
  "description": "MiniMax H3 joint video + audio — one model, three lanes: multi-window timeline films, single-shot FL2VA/Ref2VA clips, and keyframe-anchored beats",
7
7
  "engine": "comfyui",
8
- "defaults": {
9
- "seed": 42
10
- },
8
+
9
+ // lives on the family's own carrier schema (src/schema.ts,
10
+ // .default(42) — the walk fill). A DECL defaults row spelling 42
11
+ // again was dead surface on the same family's second seat.
11
12
  "studio": {
12
13
  "tenant": "video/h3-timeline",
13
14
  "owns_params": true,
@@ -80,190 +81,76 @@ export const DECL = {
80
81
  }
81
82
  ]
82
83
  },
83
- // THE FOLDED LANES (roadmap §8 — the dead h3 family's variants,
84
- // reborn here): single-shot clips in one pass. The
85
- // resolver_defaults carry the dead family's default stamps
86
- // VERBATIM — the derived views for routes h3-fl2va/h3-ref2va are
87
- // byte-identical to the dead family's facts rows.
88
- {
89
- "id": "fl2va",
90
- "label": "Single-Shot FL2VA",
91
- "hint": "Text-to-video, first/last frame to video — one 124-frame pass, 30 steps. The single-shot lane's explicit address (the family id is h3).",
92
- "group": "Variant",
93
- "route": "h3-fl2va",
94
- "order": 2,
95
- "resolver_defaults": {
96
- "width": 1344,
97
- "height": 768,
98
- "length": 124,
99
- "steps": 30,
100
- "shift_video": 12,
101
- "shift_audio": 3
102
- },
103
- "cells": []
104
- },
105
- {
106
- "id": "fl2va-turbo",
107
- "label": "Single-Shot FL2VA ⚡ Turbo",
108
- "hint": "FL2VA with the Turbo LoRA + 10-step fast pass — motion composition iteration before a final.",
109
- "group": "Variant",
110
- "route": "h3-fl2va",
111
- "order": 3,
112
- "resolver_defaults": {
113
- "width": 1344,
114
- "height": 768,
115
- "length": 124,
116
- "steps": 30,
117
- "shift_video": 12,
118
- "shift_audio": 3
119
- },
120
- "cells": []
121
- },
122
- {
123
- "id": "ref2va",
124
- "label": "Single-Shot Ref2VA",
125
- "hint": "Reference-based video (images, videos, audio as refs) — one pass, 30 steps.",
126
- "group": "Variant",
127
- "route": "h3-ref2va",
128
- "order": 4,
129
- "resolver_defaults": {
130
- "width": 1344,
131
- "height": 768,
132
- "length": 124,
133
- "steps": 30,
134
- "shift_video": 12,
135
- "shift_audio": 3
136
- },
137
- "cells": []
138
- },
139
- {
140
- "id": "ref2va-turbo",
141
- "label": "Single-Shot Ref2VA ⚡ Turbo",
142
- "hint": "Ref2VA with the Turbo LoRA + 10-step fast pass for reference-based iteration.",
143
- "group": "Variant",
144
- "route": "h3-ref2va",
145
- "order": 5,
146
- "resolver_defaults": {
147
- "width": 1344,
148
- "height": 768,
149
- "length": 124,
150
- "steps": 30,
151
- "shift_video": 12,
152
- "shift_audio": 3
153
- },
154
- "cells": []
155
- },
156
- // THE FOLDED KEYFRAME LANE (the dead h3-keyframe family's
157
- // variant): draft-geometry beats anchored on a first frame.
158
- {
159
- "id": "keyframe",
160
- "label": "Keyframe",
161
- "hint": "Keyframe-to-video — a beat anchored on its first-frame image at draft geometry (768×448, 12 steps).",
162
- "group": "Variant",
163
- "route": "h3-keyframe",
164
- "order": 6,
165
- "resolver_defaults": {
166
- "width": 768,
167
- "height": 448,
168
- "length": 56,
169
- "steps": 12
170
- },
171
- "cells": [
172
- {
173
- "quant": "native",
174
- "label": "Native",
175
- "route": "h3-keyframe",
176
- }
177
- ]
178
- },
179
- {
180
- "id": "timeline-ref2va",
181
- "label": "Timeline Ref2VA (Legacy)",
182
- "hint": "Identity-locked multi-beat — reference images condition every window. Standard variant now handles this automatically.",
183
- "group": "Variant",
184
- "route": "h3-timeline-ref",
185
- "order": 7,
186
- "resolver_defaults": {
187
- "width": 1344,
188
- "height": 768,
189
- "length": 124,
190
- "steps": 30,
191
- "shift_video": 12,
192
- "shift_audio": 3
193
- },
194
- "cells": []
195
- },
196
- {
197
- "id": "default",
198
- "label": "Default",
199
- "hint": "The family default — no extra stamps; a fresh card lands here.",
200
- "group": "Recipe",
201
-
202
- // the checkpoint id `h3` resolves through THIS row — the family
203
- // default claims the address (a variant route, the catalog's
204
- // owning-atom vocabulary). Pre-correction, `h3` named the dead
205
- // single-shot family; those drafts now land the family default.
206
- "route": "h3",
207
- "cells": [],
208
- },
209
-
210
- // have Recipies… This *includes* LORAs being setup this way, which
211
- // you haven't done"): the family's preset macros, payloads 1:1
212
- // with the card's declared keys — the distill presets stamp the
213
- // LORA BAG ({id, strength, steps} rows the mod plane resolves
214
- // against this family's flavor catalog in mods/loras.ts), the
215
- // geometry rows stamp the window keys. Migrated out of the card's
216
- // hand-authored preset select (the drift the law outlaws).
217
- //
218
84
 
219
- // plaguekind recipe is wrong — it uses TWO loras and not one"):
220
- // plaguekind's turbo setup runs the 768p turbo SOLO at 0.6 (the
221
- // fro row drops — presets.yaml turbo-768; his V9 runs effectively
222
- // solo too). The V7-era two-stack (dareties 0.4 + turbo 0.6,
85
+ // bytedance" — the DMAD 4-step distill, ByteDance/TAMU, the
86
+ // catalog's h3_dmad_4step row; "Default needs to be a 4 step
223
87
 
224
- // as a fallback. Solo turbo IS `turbo_lightx2v`; a second pill
225
- // stamping the same payload would be two names for one truth.
226
- {
227
- "id": "turbo_lightx2v",
228
- "label": "Turbo LightX2V",
229
- "hint": "The 4-to-8-step distill at 0.6 — the bag row carries its married 8-step count.",
88
+ // model, 1 variant, 1 quant, and 3 recipes… Default is the
89
+ // standard"): the recipe trio Draft / Standard / Final Cut, ALL
90
+ // THREE riding the ByteDance lora — selection only; the catalog
91
+ // row owns strength 1 and the married 4-step count. `standard`
92
+ // is FIRST in the Recipe group ON PURPOSE: the birth stamp takes
93
+ // the first composing Recipe row (card-base seedRecipeStamp —
94
+ // the first-declared law; the Recipe axis itself YIELDS, never
95
+ // seeds a key), so every fresh h3-timeline card is born at the
96
+ // DMAD calibrated point — the lora ALWAYS shows up on the
97
+ // default card. Geometry is NOT stamped here (the DRY law, one
98
+ // value one owner): the carrier schema's own 1344×768 floor IS
99
+ // the standard geometry — the DMAD rows' calibrated operating
100
+ // point (arXiv:2610.02188; ZhengmingYu/DMAD renders 1344×768,
101
+ // 362 frames on 8 GB-class GPUs). The payload mirrors a hand
102
+ // pick exactly (declared keys only): SELECTION ONLY (#36).
103
+ // STEPS IS UNSTATED BY DESIGN — the row owns its married 4;
104
+ // stamping steps would hard-pin what the bag resolves. The
105
+ // file's door is the lane gate (lane_inputs loras + the
106
+ // provision row below): absent on disk, the run refuses with
107
+ // the fetch hint — the web popup's install button and the agent
108
+ // seat both ride that one refusal.
109
+ {
110
+ "id": "standard",
111
+ "label": "Standard",
112
+ "hint": "The default — the ByteDance DMAD 4-step distill at the calibrated 1344×768. Steps derive from the lora marriage (4).",
230
113
  "group": "Recipe",
231
114
  "wire_defaults": {
232
- // SELECTION ONLY (#36): the catalog row owns strength 0.6
233
- // and the married 8-step count — compose resolves ids
234
- // against the flavor catalog (unknown ids refuse LOUD) and
235
- // the face mirrors the served marriage. A recipe NEVER
236
- // duplicates a catalog value (one value, one owner).
237
- "loras": [{ "id": "h3_lightx2v_turbo" }],
115
+ "loras": [{ "id": "h3_dmad_4step" }],
238
116
  },
239
117
  "cells": [],
240
118
  },
119
+ // DRAFT (operator, this session: "for low resolution, that is
120
+ // good for the draft recipe"): the fast iteration tier — the
121
+ // same ByteDance bag at draft geometry 768×448. Steps stay
122
+ // unstated (the marriage law).
241
123
  {
242
- "id": "dareties_lightx2v",
243
- "label": "Dareties LightX2V",
244
- "hint": "The v4 distill at 0.8 — married to 4 steps.",
124
+ "id": "draft",
125
+ "label": "Draft",
126
+ "hint": "Fast iteration — the same ByteDance 4-step bag at draft geometry (768×448). Steps derive from the lora marriage (4).",
245
127
  "group": "Recipe",
246
128
  "wire_defaults": {
247
- "loras": [{ "id": "h3_lightx2v_dareties" }],
129
+ "loras": [{ "id": "h3_dmad_4step" }],
130
+ "width": 768,
131
+ "height": 448,
248
132
  },
249
133
  "cells": [],
250
134
  },
251
- {
252
- "id": "draft_02mp",
253
- "label": "Draft 02MP",
254
- "hint": "TIER 1 — the promotion stroke: draft geometry 768×448 at 8 steps (a turbo row's marriage still overrides steps). The user's lora bag rides UNTOUCHED — tiers never stamp loras.",
135
+ // FINAL CUT: the finishing tier — same bag, full geometry (the
136
+ // carrier floor 1344×768, never duplicated here), plus the
137
+ // second-pass rail: SeedVR2 super-res finish (sr_switch) behind
138
+ // the master switch (second_pass_enabled). sr_resolution keeps
139
+ // its OWN 1080 floor on the knob (one value, one owner — the
140
+ // recipe never re-states it); interpolation stays off (the
141
+ // FILM arm is a separate explicit pick, by design).
142
+ {
143
+ "id": "final",
144
+ "label": "Final Cut",
145
+ "hint": "The finishing pass — the 4-step bag plus the second-pass rail: sharpen + SeedVR2 super-res at 1080. Interpolation stays an explicit pick.",
255
146
  "group": "Recipe",
256
- "wire_defaults": { "width": 768, "height": 448, "steps": 8 },
147
+ "wire_defaults": {
148
+ "loras": [{ "id": "h3_dmad_4step" }],
149
+ "second_pass_enabled": true,
150
+ "sr_switch": true,
151
+ },
257
152
  "cells": [],
258
153
  },
259
- {
260
- "id": "final_hd",
261
- "label": "Final HD",
262
- "hint": "TIER 2 — the promotion stroke: finish geometry 1344×768 at 30 steps. Same calls, lora bag untouched; windows whose cache key changed simply re-render.",
263
- "group": "Recipe",
264
- "wire_defaults": { "width": 1344, "height": 768, "steps": 30 },
265
- "cells": [],
266
- }
267
154
  ],
268
155
  "variant_groups": [
269
156
  {
@@ -277,8 +164,8 @@ export const DECL = {
277
164
  {
278
165
  "id": "Recipe",
279
166
  "label": "Recipe",
280
- "tooltip": "One-click recipes — patch-only rows that stamp picks onto the draft; Default stamps nothing.",
281
- "default": "default"
167
+ "tooltip": "One-click recipes — patch-only rows that stamp picks onto the draft: Draft (768×448), Standard (the calibrated default), Final Cut (the second-pass finish).",
168
+ "default": "standard"
282
169
  }
283
170
  ],
284
171
 
@@ -291,7 +178,39 @@ export const DECL = {
291
178
  // members), and the card still reads none of them directly.
292
179
  "lane_inputs": {
293
180
  "unet": "minimax_h3_hybrid_fl2va_ref2va_b30-49-int8.safetensors",
181
+
182
+ // lora is the default, and a run without the file refuses through
183
+ // the lane gate — the web popup's install button and the agent
184
+ // seat both key on that one refusal; "that is how it works").
185
+ // BARE NAME: the gate probes the provision row's own folder
186
+ // (loras/h3) as its last leg; the row below is the fetch truth.
187
+ "loras": "dmad_minimax_h3_4step_lora_critic_comfyui.safetensors",
294
188
  },
189
+ // THE LANE SURFACE (the z-image precedent): exactly the knobs the
190
+ // h3-timeline card serves — the window inputs, the shared render
191
+ // tail, and each lane switch's refinement group.
192
+ "params": [
193
+ "prompt",
194
+ "image", "last_frame",
195
+ "ref_images", "ref_videos", "ref_video_trims", "ref_audios", "ref_mods",
196
+ "duck_depth_db",
197
+ "seed", "width", "height", "length", "steps", "denoise",
198
+ "second_pass_enabled",
199
+ "sharpen_enabled", "sharpen_method", "sharpen_radius", "sharpen_strength",
200
+ "sharpen_threshold", "sharpen_iterations", "sharpen_switch",
201
+ "interpolate_enabled", "interp_model", "interp_multiplier", "interp_switch",
202
+ "sampler_name", "sched_name", "k", "noise_seed", "fps_seconds",
203
+ "refine_lora", "refine_strength", "refine_steps",
204
+ "attention_backend",
205
+ "sr_switch", "sr_resolution", "sr_model",
206
+ "ref_image_size",
207
+ "shift_video", "shift_audio",
208
+ "sla_enabled", "sla_sparsity", "sla_block_size", "sla_min_seq_len",
209
+ "sla_dense_last_steps", "sla_dense_steps", "sla_dense_backend",
210
+ "sla_reference_protection", "sla_protect_audio", "sla_stabilize_motion",
211
+ "sla_disable_fp16_accum", "sla_switch",
212
+ "image_name",
213
+ ],
295
214
  "provisions": [
296
215
  {
297
216
  "name": "minimax_h3_hybrid_fl2va_ref2va_b30-49-int8.safetensors",
@@ -402,6 +321,13 @@ export const DECL = {
402
321
  "sha256": "dbf74bfb490b9322bd455edff95ce222b3553bb3472e4743134755db1edfe044",
403
322
  "size_bytes": 2115774558
404
323
  },
324
+ {
325
+ "name": "dmad_minimax_h3_4step_lora_critic_comfyui.safetensors",
326
+ "url": "https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/dmad_minimax_h3_4step_lora_critic_comfyui.safetensors",
327
+ "folder": "loras/h3",
328
+ "sha256": "a4f54d9eb4eed9102be1adea8376e8e933cc2805f4017b95c14586290395b3a7",
329
+ "size_bytes": 1956195960
330
+ },
405
331
  {
406
332
  "name": "minimax_h3_taomate_3step_lora_avg_rank_19_bf16.safetensors",
407
333
  "url": "https://huggingface.co/Kijai/MiniMax-H3_comfy/resolve/main/loras/minimax_h3_taomate_3step_lora_avg_rank_19_bf16.safetensors",
@@ -467,4 +393,9 @@ export const family = {
467
393
  };
468
394
  export { finalizeH3, H3_T4_STRIP } from "./finalize.js";
469
395
  export { assertOverlayGated } from "./actions.js";
396
+ // The Loader-row face: DSH loads plugin rows by bare specifier and
397
+ // unwraps `exports.default ?? exports` (vendor/cordis_plugins/loader
398
+ // unwrapExports) — the default export IS the row-loadable plugin. The
399
+ // named `family` stays the library face (engine loadFamilies).
400
+ export { family as default };
470
401
  //# sourceMappingURL=index.js.map
@@ -1,4 +1,4 @@
1
- import type { Context } from '@deepseek-ai/cordis';
1
+ import type { Context } from '@melite/comfyui-card-kit/card-definition';
2
2
  export declare const inject: string[];
3
3
  export declare const H3_LORA_ROWS: readonly [{
4
4
  readonly id: "h3_lightx2v_dareties";
@@ -78,6 +78,14 @@ export declare const H3_LORA_ROWS: readonly [{
78
78
  readonly steps: 8;
79
79
  readonly steps_min: 6;
80
80
  readonly steps_max: 8;
81
+ }, {
82
+ readonly id: "h3_dmad_4step";
83
+ readonly filename: "h3/dmad_minimax_h3_4step_lora_critic_comfyui.safetensors";
84
+ readonly source_url: "https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/dmad_minimax_h3_4step_lora_critic_comfyui.safetensors";
85
+ readonly label: "DMAD 4-Step (ByteDance/TAMU)";
86
+ readonly category: "distill";
87
+ readonly default_strength: 1;
88
+ readonly steps: 4;
81
89
  }, {
82
90
  readonly id: "h3_taomate_3step";
83
91
  readonly filename: "h3/minimax_h3_taomate_3step_lora_avg_rank_19_bf16.safetensors";
package/lib/mods/loras.js CHANGED
@@ -17,6 +17,24 @@ export const H3_LORA_ROWS = [
17
17
  // allows 0–2 — 1.5 is the designed point, not a typo). ──
18
18
  { id: 'h3_larryvrh_v4_ema', filename: 'h3/minimax_h3_turbo_v4_step600_ema.safetensors', source_url: 'https://huggingface.co/larryvrh/MiniMax-H3-Turbo-Lora/resolve/main/minimax_h3_turbo_v4_step600_ema.safetensors', label: 'Larryvrh Turbo v4-600 EMA', category: 'distill', default_strength: 1, steps: 6, steps_min: 4, steps_max: 8 },
19
19
  { id: 'h3_pk_parasyte', filename: 'h3/H3-PK-Parasyte-Turbo.safetensors', source_url: 'https://huggingface.co/Plaguekind/H3-Lora/resolve/main/H3-PK-Parasyte-Turbo.safetensors', label: 'PK Parasyte Turbo', category: 'distill', default_strength: 1.5, steps: 8, steps_min: 6, steps_max: 8 },
20
+
21
+ // Matching as Adversarial Distillation (Yu et al., ByteDance +
22
+ // Texas A&M, arXiv:2610.02188). Rank-128 over the attn/ff modules
23
+ // of all 50 transformer blocks + 2 token refiners; turns the
24
+ // 50-step teacher into a 4-step generator at 1344x768 with native
25
+ // stereo audio. The paper's EMA checkpoint (`lora_critic`,
26
+ // iteration 800 of the main run) in ComfyUI's key layout, 2.0 GB;
27
+ // the higher-bench `full_critic` twin stays unboarded until the
28
+ // velocity arena rules (one row, one paper). LICENCE: the MiniMax
29
+ // H3 community licence — the base weights' own class; the V1
30
+ // region exclusion precedent applies. STRENGTH 1: distillation
31
+ // adapters are designed at full strength (the lightx2v convention
32
+ // above). The paper's no-CFG + shift 12/2 spelling matches what
33
+ // the composed arms already pin (no cfg knob exists on this
34
+ // card). The adaln guard rides the arena's first stacked load: a
35
+ // dense LoRA silently drops 51 adaln_proj keys on a pruned base —
36
+ // watch the load log (roadmap, H3 velocity rows). ──
37
+ { id: 'h3_dmad_4step', filename: 'h3/dmad_minimax_h3_4step_lora_critic_comfyui.safetensors', source_url: 'https://huggingface.co/ZhengmingYu/DMAD/resolve/main/minimax_h3/dmad_minimax_h3_4step_lora_critic_comfyui.safetensors', label: 'DMAD 4-Step (ByteDance/TAMU)', category: 'distill', default_strength: 1, steps: 4 },
20
38
  // ── THE REFINER (the second-pass instrument — see the refiner
21
39
  // design in the ledger): solo it is retired-tier (arena 935),
22
40
  // but 3 steps @ 0.7 over a non-accelerated draft "closes" the
package/lib/schema.d.ts CHANGED
@@ -11,7 +11,15 @@ export declare const paramSchema: z<Schemastery.ObjectS<NoInfer<{
11
11
  last_frame: z<string, string, "plain">;
12
12
  ref_images: z<string[], string[], "plain">;
13
13
  ref_videos: z<string[], string[], "plain">;
14
+ ref_video_trims: z<({
15
+ start_time?: number | null | undefined;
16
+ duration?: number | null | undefined;
17
+ } & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<NoInfer<{
18
+ start_time: z<number, number, "defined">;
19
+ duration: z<number, number, "defined">;
20
+ }>>[], "plain">;
14
21
  ref_audios: z<string[], string[], "plain">;
22
+ ref_mods: z<string[], string[], "plain">;
15
23
  duck_depth_db: z<number, number, "defined">;
16
24
  seed: z<number, number, "defined">;
17
25
  width: z<number, number, "defined">;
@@ -65,7 +73,15 @@ export declare const paramSchema: z<Schemastery.ObjectS<NoInfer<{
65
73
  last_frame: z<string, string, "plain">;
66
74
  ref_images: z<string[], string[], "plain">;
67
75
  ref_videos: z<string[], string[], "plain">;
76
+ ref_video_trims: z<({
77
+ start_time?: number | null | undefined;
78
+ duration?: number | null | undefined;
79
+ } & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<NoInfer<{
80
+ start_time: z<number, number, "defined">;
81
+ duration: z<number, number, "defined">;
82
+ }>>[], "plain">;
68
83
  ref_audios: z<string[], string[], "plain">;
84
+ ref_mods: z<string[], string[], "plain">;
69
85
  duck_depth_db: z<number, number, "defined">;
70
86
  seed: z<number, number, "defined">;
71
87
  width: z<number, number, "defined">;
@@ -131,7 +147,15 @@ export declare const carrier: z<Schemastery.ObjectS<NoInfer<{
131
147
  last_frame: z<string, string, "plain">;
132
148
  ref_images: z<string[], string[], "plain">;
133
149
  ref_videos: z<string[], string[], "plain">;
150
+ ref_video_trims: z<({
151
+ start_time?: number | null | undefined;
152
+ duration?: number | null | undefined;
153
+ } & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<NoInfer<{
154
+ start_time: z<number, number, "defined">;
155
+ duration: z<number, number, "defined">;
156
+ }>>[], "plain">;
134
157
  ref_audios: z<string[], string[], "plain">;
158
+ ref_mods: z<string[], string[], "plain">;
135
159
  duck_depth_db: z<number, number, "defined">;
136
160
  seed: z<number, number, "defined">;
137
161
  width: z<number, number, "defined">;
@@ -185,7 +209,15 @@ export declare const carrier: z<Schemastery.ObjectS<NoInfer<{
185
209
  last_frame: z<string, string, "plain">;
186
210
  ref_images: z<string[], string[], "plain">;
187
211
  ref_videos: z<string[], string[], "plain">;
212
+ ref_video_trims: z<({
213
+ start_time?: number | null | undefined;
214
+ duration?: number | null | undefined;
215
+ } & import("@deepseek-ai/cosmokit").Dict)[], Schemastery.ObjectT<NoInfer<{
216
+ start_time: z<number, number, "defined">;
217
+ duration: z<number, number, "defined">;
218
+ }>>[], "plain">;
188
219
  ref_audios: z<string[], string[], "plain">;
220
+ ref_mods: z<string[], string[], "plain">;
189
221
  duck_depth_db: z<number, number, "defined">;
190
222
  seed: z<number, number, "defined">;
191
223
  width: z<number, number, "defined">;
package/lib/schema.js CHANGED
@@ -46,7 +46,7 @@ const T4_ONLY_KEYS = [
46
46
  // (t4 INT 8 / t4r 8.0 — the served structural values).
47
47
  export const paramSchema = z.object({
48
48
  prompt: z.string().description("Prompt").extra('extra', bag({ order: null, wtype: 'textarea', placeholder: "the courier pushes off and rolls forward through the lantern glow; rain hisses on the stall awnings, a vendor calls out", tooltip: "The window's text (single-call shape). A film's calls carry their own text — a textless call refuses at compose; this field never substitutes for one." })),
49
- image: z.string().role('path').description("First frame (keyframe lanes)").extra('extra', bag({ order: null, wtype: 'image', tooltip: "Absolute path to the PNG the video must start on (h3-keyframe). Optional for h3/h3-timeline." })),
49
+ image: z.string().role('path').description("First frame (keyframe lanes)").extra('extra', bag({ order: null, wtype: 'image', tooltip: "Absolute path to the PNG the video must start on (first-frame anchoring). Optional for h3/h3-timeline." })),
50
50
  // THE INPUT SURFACE (the H3 architecture truth — two DIFFERENT
51
51
  // mechanics, the FL2VA latent anchors vs the Ref2VA conditioning
52
52
  // bus): first_frame/last_frame are PIXEL anchors (bundle inputs
@@ -62,8 +62,34 @@ export const paramSchema = z.object({
62
62
  last_frame: z.string().role('path').description("Last frame (end anchor)").extra('extra', bag({ order: null, wtype: 'image', tooltip: "FL2VA end anchor — bundle input 2. Locks the final frame's pixels; H3 generates the motion between the two anchors." })),
63
63
  ref_images: z.array(z.string().role('path')).description("Reference images").max(REF_CAPS.images).extra('extra', bag({ order: null, wtype: 'image_list', max_stack: REF_CAPS.images, tooltip: "Loose references (identity, style, costume) → <Picture 3..9> via the bundle. 8 fills the bus; with a last frame set the cap is 7 (anchor + end + 7 = the 9-slot bus)." })),
64
64
  ref_videos: z.array(z.string().role('path')).description("Reference videos").max(REF_CAPS.videos).extra('extra', bag({ order: null, wtype: 'image_list', media: 'video', max_stack: REF_CAPS.videos, tooltip: "Motion guides → <Video 1-3>: camera moves, timing, choreography." })),
65
+
66
+ // index-paired with ref_videos — entry i slices guide i through
67
+ // the engine's own Video Slice node BEFORE GetVideoComponents
68
+ // conditions on it (thread the motion guide to the span that
69
+ // matters; a whole 3-minute clip as a guide wastes the window).
70
+ // start_time/duration are SECONDS; duration 0 with start_time 0
71
+ // (or an absent entry) = the whole clip, no slice node built.
72
+ // strict_duration rides false: a duration past the clip's end
73
+ // clamps at the engine, never refuses the film. The trims are
74
+ // stage params, so the run body records them verbatim.
75
+ ref_video_trims: z.array(z.object({
76
+ start_time: z.number().min(0).default(0).description('Start (s)'),
77
+ duration: z.number().min(0).default(0).description('Duration (s)'),
78
+ })).max(REF_CAPS.videos).description("Reference video trims").extra('extra', bag({ order: null, tooltip: "Per-video trims, index-paired with Reference videos — entry i slices guide i (start seconds + duration seconds) before conditioning. duration 0 = to the clip's end; an absent entry = the whole clip." })),
65
79
  ref_audios: z.array(z.string().role('path')).description("Reference audios").max(REF_CAPS.audios).extra('extra', bag({ order: null, wtype: 'image_list', media: 'audio', max_stack: REF_CAPS.audios, tooltip: "Sound references → <Audio 1-3>: timbre, cadence, musical tone." })),
66
80
 
81
+ // mods — .safetensors packs extracted under the engine's
82
+ // models/refmods/ (identity, style, voice). The pack injects
83
+ // them as reference tokens through ALL DiT blocks on the
84
+ // conditioning side: no bundle-bus slot is spent, so a mod does
85
+ // NOT fire the refs-imply-r2v law (a mod-only film stays open).
86
+
87
+ // the file face with a .safetensors accept filter (the stack
88
+ // row's own grammar) — the owner-local seat stays a path list
89
+ // and compose stems it (the loader resolves stems against its
90
+ // own models/refmods/).
91
+ ref_mods: z.array(z.string().role('path')).description("RefMods (reusable reference mods)").max(REF_CAPS.refmods).extra('extra', bag({ order: null, wtype: 'image_list', media: 'mod', max_stack: REF_CAPS.refmods, tooltip: "Reusable reference mods → models/refmods/ (extracted identity/style/voice packs). Injected as reference tokens through all DiT blocks — strength 1 per mod; spends no bundle-bus slot, so it combines freely with the picture/video/audio references above. 8 max (the loader's slot count). Pack-documented limits, never silent: attributes can still mix across mods (identity, clothing, background, composition); strength blends, it never replaces outright; voice transfer does not work reliably (music references carry, speaker identity does not). A picked path commits its stem." })),
92
+
67
93
  // input. We don't use that, that is a bug that is there." Film
68
94
  // music rides the D-M-E lanes' MUSIC clips, pinned per window;
69
95
  // reference timbre rides ref_audios. No film-wide bed, no cuts,
@@ -254,7 +280,10 @@ export const paramSchema = z.object({
254
280
  interp_switch: z.boolean().description("Interpolate switch (legacy alias)").extra('extra', bag({ hidden: true })),
255
281
  sharpen_switch: z.boolean().description("Sharpen switch (legacy alias)").extra('extra', bag({ hidden: true })),
256
282
  sla_switch: z.boolean().description("SLA switch (legacy alias)").extra('extra', bag({ hidden: true })),
257
- image_name: z.string().role('path').description("Guide image (renderer alias)").extra('extra', bag({ hidden: true, wtype: 'image', tooltip: "The renderer's guide-image spelling — gate-admitted for old docs; the rail's First frame is the user face." })),
283
+ // (no wtype: hidden fields never render — the kind mapping rides
284
+ // flowKinds.legacyAliases, pinned in input-surface.spec.ts; a wtype
285
+ // here is dead surface the estate wtype judge refuses.)
286
+ image_name: z.string().role('path').description("Guide image (renderer alias)").extra('extra', bag({ hidden: true, tooltip: "The renderer's guide-image spelling — gate-admitted for old docs; the rail's First frame is the user face." })),
258
287
  });
259
288
  /** Schemastery objects are lenient (unknown/missing keys ride); the
260
289
  * family-admission laws are the renderer's own validators, ported:
@@ -302,7 +331,15 @@ export function schema(v) {
302
331
  // run-9953f652410d-d365af74, `$.ref_images expected array but
303
332
  // got [object Object]` ×4 and `calls: ""`).
304
333
  const out = paramSchema(coerceWireArrays(paramSchema, coerceWireBoolean(raw)));
305
- let variant = typeof raw.variant === 'string' ? raw.variant : undefined;
334
+
335
+ // break): `variant` on the wire carries TWO vocabularies — the
336
+ // model axis ('timeline', the stamp the add door seeds onto every
337
+ // fresh stage) and the window family (t4r/t4_open/t4_chain). A
338
+ // stated FAMILY rides; an axis string is not a family claim — the
339
+ // doc's seats derive the family, model metadata never picks a
340
+ // render lane, and 'unknown window family' never fires on it.
341
+ let variant = typeof raw.variant === 'string' && FAMILIES.includes(raw.variant)
342
+ ? raw.variant : undefined;
306
343
  // variant DERIVATION (opener_family/chain_family): the studio calls shape carries no variant; the card derives it.
307
344
  // An image-anchored opener rides t4r; a text-only single call is t4_open; multiple calls chain (t4_chain).
308
345
 
@@ -396,6 +433,30 @@ export function schema(v) {
396
433
  start: c.start_frame,
397
434
  end: c.end_frame,
398
435
  }, `calls[${i}]`, i > 0 ? transitionOverlap(transition) : 0);
436
+
437
+ // a guide seat must NAME MEDIA — a path, URL, data: URI, or
438
+ // $spell. The UI's reference picker once wrote the SOURCE
439
+ // STAGE's name ("image-gen") into the anchor seat and the run
440
+ // rendered text-only (the compose read the guide, the engine
441
+ // had no such file). A bare word with no slash, dot, or scheme
442
+ // is a label, never media — refuse here, naming the value and
443
+ // the cure, at admission (zero GPU) instead of the engine door.
444
+ const isMediaRef = (v) => v.startsWith('$') || v.startsWith('data:') || v.includes('/') || /\.[A-Za-z0-9]+$/.test(v);
445
+ for (const gkey of ['image', 'ref_image', 'image_name']) {
446
+ const gv = c[gkey];
447
+ if (typeof gv === 'string' && gv.trim() !== '' && !isMediaRef(gv.trim())) {
448
+ throw new Error(`calls[${i}].${gkey}: "${gv.trim()}" names no media — a stage/card name is not an image ` +
449
+ `(pick the artifact: a file path, URL, or $spell rides; a label never does)`);
450
+ }
451
+ }
452
+ for (const garr of ['ref_images']) {
453
+ for (const entry of wireList(c[garr])) {
454
+ if (!isMediaRef(entry.trim())) {
455
+ throw new Error(`calls[${i}].${garr}: "${entry.trim()}" names no media — a stage/card name is not an image ` +
456
+ `(pick the artifact: a file path, URL, or $spell rides; a label never does)`);
457
+ }
458
+ }
459
+ }
399
460
  }
400
461
  // (the shot-law loop above guarantees every row is a shaped
401
462
  // object with pinned int spans — no gap-arms needed here)
@@ -403,9 +464,16 @@ export function schema(v) {
403
464
  // whole (one-window) graph t4r; a MULTI-call doc is a film — its
404
465
  // variant is t4_chain and each window derives its own family in
405
466
  // the merged renderer (a guide call renders as its own t4r window)
467
+
468
+ // compose reads FOUR guide spellings (call.image ?? call.ref_image
469
+ // ?? call.image_name — actions.ts:268/:1635); the derivation must
470
+ // know every spelling the compose knows, or a guide silently
471
+ // derives a text-only window (run-899a8448: the UI wrote `image`,
472
+ // the derivation checked the other three, variant fell t4_open and
473
+ // the reference never became a node).
406
474
  const hasGuide = calls.some((c) => {
407
475
  const cc = c;
408
- return Boolean(cc.ref_images) || Boolean(cc.ref_image) || Boolean(cc.image_name);
476
+ return Boolean(cc.image) || Boolean(cc.ref_images) || Boolean(cc.ref_image) || Boolean(cc.image_name);
409
477
  })
410
478
  // THE DECLARED INPUT SURFACE (the input rail's law): card-level
411
479
  // refs / an end anchor / the audio bed imply the r2v lane by the
@@ -8,6 +8,7 @@ export declare const REF_CAPS: {
8
8
  readonly images: 8;
9
9
  readonly videos: 3;
10
10
  readonly audios: 3;
11
+ readonly refmods: 8;
11
12
  };
12
13
  export interface TimelineSpan {
13
14
  readonly start: number;
@@ -52,7 +53,6 @@ export declare function imageReferenceCap(hasLastFrame: boolean): number;
52
53
  export declare function splitRefList(value: string | undefined): string[];
53
54
  export declare function normalizeDeclaredRefs(value: unknown): string[];
54
55
  export declare function joinRefList(value: unknown): string | undefined;
55
- export declare function mergeDeclaredRefs(declared: readonly string[], perCall: readonly string[]): string[];
56
56
  export declare function refGenreOf(name: string, url?: string): 'image' | 'video' | 'audio' | 'other';
57
57
  export declare const KNOB_ORDER: readonly ["steps", "denoise", "sampler_name", "sched_name", "shift_video", "shift_audio", "sla_sparsity", "sla_block_size", "sla_min_seq_len", "sla_dense_last_steps", "sla_protect_audio", "sla_stabilize_motion", "sla_reference_protection", "sla_dense_backend", "sla_dense_steps", "sla_disable_fp16_accum", "sharpen_enabled", "sharpen_method", "sharpen_strength", "sharpen_radius", "sharpen_threshold", "sharpen_iterations", "interpolate_enabled", "interp_model", "interp_multiplier", "length"];
58
58
  export type KnobKey = (typeof KNOB_ORDER)[number];
@@ -8,6 +8,10 @@ export const REF_CAPS = {
8
8
  images: 8,
9
9
  videos: 3,
10
10
  audios: 3,
11
+
12
+ // owns MAX_SLOTS = 8 — one slot per mod; strength/copies ride
13
+ // the loader row the compose fills.
14
+ refmods: 8,
11
15
  };
12
16
  export function transitionOverlap(transition) {
13
17
  return transition === 'cut' ? 0 : SEAM_OVERLAP_FRAMES;
@@ -152,9 +156,6 @@ export function joinRefList(value) {
152
156
  return value.trim();
153
157
  return undefined;
154
158
  }
155
- export function mergeDeclaredRefs(declared, perCall) {
156
- return [...declared, ...perCall.filter((entry) => !declared.includes(entry))];
157
- }
158
159
  export function refGenreOf(name, url) {
159
160
  const lowerName = name.toLowerCase();
160
161
  if (/^video_w\d+_/.test(lowerName)) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@melite/models-h3",
3
- "version": "0.1.4-alpha",
3
+ "version": "0.1.5-pre-alpha",
4
4
  "license": "SSPL-1.0",
5
5
  "type": "module",
6
6
  "exports": {
@@ -32,14 +32,14 @@
32
32
  },
33
33
  "dependencies": {
34
34
  "@deepseek-ai/schemastery": "^3.18.4",
35
- "@melite/comfyui-cordis": "0.1.4-alpha",
36
- "@melite/comfyui-card-kit": "0.1.4-alpha",
37
- "@melite/contracts": "0.1.4-alpha"
35
+ "@melite/contracts": "0.1.5-pre-alpha",
36
+ "@melite/comfyui-card-kit": "0.1.5-pre-alpha"
38
37
  },
39
38
  "devDependencies": {
40
39
  "@types/node": "^22.20.0",
41
40
  "typescript": "^5.9.3",
42
- "@deepseek-ai/cordis": "^4.0.4"
41
+ "@deepseek-ai/cordis": "^4.0.4",
42
+ "@deepseek-ai/cosmokit": "~1.8.5"
43
43
  },
44
44
  "files": [
45
45
  "lib/index.js",
@@ -47,7 +47,8 @@
47
47
  "lib/**/*.d.ts"
48
48
  ],
49
49
  "peerDependencies": {
50
- "@deepseek-ai/cordis": "^4.0.4"
50
+ "@deepseek-ai/cordis": "^4.0.4",
51
+ "@deepseek-ai/cosmokit": "~1.8.5"
51
52
  },
52
53
  "scripts": {
53
54
  "build": "tsc -p tsconfig.build-mods.json && tsc -p tsconfig.build.json",