@melite/models-h3 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/lib/mods/loras.js CHANGED
@@ -1,12 +1,37 @@
1
1
  export const inject = ['comfyui'];
2
2
  export const H3_LORA_ROWS = [
3
- { id: 'h3_lightx2v_dareties', filename: 'h3/minimax_h3_fl2v_lightx2v_v0.1_dareties_v4_step600_comfy_fro.safetensors', source_url: 'https://huggingface.co/silveroxides/MiniMax-H3_tests/resolve/main/minimax_h3_fl2v_lightx2v_v0.1_dareties_v4_step600_comfy_fro.safetensors', label: 'LightX2V dareties v4', category: 'distill', default_strength: 0.8, steps: 4 },
4
- { id: 'h3_lightx2v_turbo', filename: 'h3/minimax_h3_fl2v_lightx2v_turbo_4to8step_v0.1-v1.0_768p_v4_step600_dareties.safetensors', source_url: 'https://huggingface.co/silveroxides/MiniMax-H3_tests/resolve/main/experimental/minimax_h3_fl2v_lightx2v_turbo_4to8step_v0.1-v1.0_768p_v4_step600_dareties.safetensors', label: 'LightX2V Turbo 4-8 step', category: 'distill', default_strength: 0.6, steps: 8, steps_min: 4, steps_max: 8 },
5
- { id: 'h3_turbo4_v1', filename: 'h3/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors', source_url: 'https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/loras/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors', label: 'LightX2V Turbo 4-Step v1.0 (768p)', category: 'distill', default_strength: 1, steps: 4 },
6
- { id: 'h3_turbo8_v1', filename: 'h3/minimax_h3_fl2v_turbo_8step_v1.0_comfyui_bf16.safetensors', source_url: 'https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/loras/minimax_h3_fl2v_turbo_8step_v1.0_comfyui_bf16.safetensors', label: 'LightX2V Turbo 8-Step v1.0', category: 'distill', default_strength: 1, steps: 8 },
7
- { id: 'h3_ref2v_turbo4', filename: 'h3/minimax_h3_ref2v_turbo_4step_v0.1_comfyui_bf16.safetensors', source_url: 'https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/loras/minimax_h3_ref2v_turbo_4step_v0.1_comfyui_bf16.safetensors', label: 'LightX2V Ref Turbo 4-Step v0.1', category: 'distill', default_strength: 1, steps: 4 },
8
- { id: 'h3_acc8_fl2va', filename: 'h3/MiniMax-H3-FL2VA-Acc-8Step_pruned_comfy.safetensors', source_url: 'https://huggingface.co/Kijai/MiniMax-H3-experimental/resolve/main/loras/MiniMax-H3-FL2VA-Acc-8Step_pruned_comfy.safetensors', label: 'Kijai FL2VA Acc 8-Step', category: 'distill', default_strength: 1, steps: 8 },
9
- { id: 'h3_acc8_ref2va', filename: 'h3/MiniMax-H3-Ref2VA-Acc-8Step_pruned_comfy.safetensors', source_url: 'https://huggingface.co/Kijai/MiniMax-H3-experimental/resolve/main/loras/MiniMax-H3-Ref2VA-Acc-8Step_pruned_comfy.safetensors', label: 'Kijai Ref2VA Acc 8-Step', category: 'distill', default_strength: 1, steps: 8 },
3
+
4
+ // silveroxides merge"; file named by the operator: the pruned v2,
5
+ // "That one is the same and less file size"): silveroxides'
6
+ // OFFICIAL silver_official_releases DARE-TIES merge — the v2
7
+ // attention-config build (his README: the v2 layers are optimized
8
+ // for inference, no attention backend patcher needed). 766 MB
9
+ // class (765,591,085 bytes), sha256 pinned in the provisions
10
+ // table (src/index.ts) — the two trees' bytes verified against
11
+ // the HF xet lfs oid. ──
12
+ { id: 'h3_silver_dareties', filename: 'h3/minimax_h3_fl2v_turbo_silver_dareties_comfy_pruned_v2.safetensors', source_url: 'https://huggingface.co/silveroxides/MiniMax-H3_tests/resolve/main/silver_official_releases/minimax_h3_fl2v_turbo_silver_dareties_comfy_pruned_v2.safetensors', label: 'Silveroxides DARE-TIES Merge', category: 'distill', default_strength: 0.8, steps: 8, steps_min: 4, steps_max: 8, shift_video: 8 },
13
+ // ── THE MARRIED SHIFT COLUMN (SOTA limb 2, H3_TIMELINE_RESERACH
14
+
15
+ // training contract — the 8-step LightX2V variants and every
16
+ // ref2v tune run shift_video 12.0, the 4-step fl2v tunes 6.0.
17
+ // The column rides the SAME marriage law as steps (stated on the
18
+ // entry first, else this default, max across the bag); a row with
19
+ // NO column declares no shift opinion and the schema's declared
20
+ // default 8 (native) owns. larryvrh v4 stays column-less BY
21
+ // DESIGN: his README and the research table put him at
22
+ // native/default. shift_audio is 3.0 across every source — the
23
+ // schema's own declared default already speaks it (no column). ──
24
+ { id: 'h3_lightx2v_dareties', filename: 'h3/minimax_h3_fl2v_lightx2v_v0.1_dareties_v4_step600_comfy_fro.safetensors', source_url: 'https://huggingface.co/silveroxides/MiniMax-H3_tests/resolve/main/minimax_h3_fl2v_lightx2v_v0.1_dareties_v4_step600_comfy_fro.safetensors', label: 'LightX2V dareties v4', category: 'distill', default_strength: 0.8, steps: 4, steps_min: 4, steps_max: 4, shift_video: 6 },
25
+
26
+ // this is silveroxides' EXPERIMENTAL/ LightX2V-turbo × dareties
27
+ // file — the label names it honestly; it is NOT the official
28
+ // silver_dareties merge the default seat holds.
29
+ { id: 'h3_lightx2v_turbo', filename: 'h3/minimax_h3_fl2v_lightx2v_turbo_4to8step_v0.1-v1.0_768p_v4_step600_dareties.safetensors', source_url: 'https://huggingface.co/silveroxides/MiniMax-H3_tests/resolve/main/experimental/minimax_h3_fl2v_lightx2v_turbo_4to8step_v0.1-v1.0_768p_v4_step600_dareties.safetensors', label: 'LightX2V Turbo × Dareties (silveroxides experimental)', category: 'distill', default_strength: 0.6, steps: 8, steps_min: 4, steps_max: 8, shift_video: 12 },
30
+ { id: 'h3_turbo4_v1', filename: 'h3/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors', source_url: 'https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/loras/minimax_h3_fl2v_turbo_4step_v1.0_768p_comfyui_bf16.safetensors', label: 'LightX2V Turbo 4-Step v1.0 (768p)', category: 'distill', default_strength: 1, steps: 4, steps_min: 4, steps_max: 4, shift_video: 6 },
31
+ { id: 'h3_turbo8_v1', filename: 'h3/minimax_h3_fl2v_turbo_8step_v1.0_comfyui_bf16.safetensors', source_url: 'https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/loras/minimax_h3_fl2v_turbo_8step_v1.0_comfyui_bf16.safetensors', label: 'LightX2V Turbo 8-Step v1.0', category: 'distill', default_strength: 1, steps: 8, steps_min: 8, steps_max: 8, shift_video: 12 },
32
+ { id: 'h3_ref2v_turbo4', filename: 'h3/minimax_h3_ref2v_turbo_4step_v0.1_comfyui_bf16.safetensors', source_url: 'https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/loras/minimax_h3_ref2v_turbo_4step_v0.1_comfyui_bf16.safetensors', label: 'LightX2V Ref Turbo 4-Step v0.1', category: 'distill', default_strength: 1, steps: 4, steps_min: 4, steps_max: 4, shift_video: 12 },
33
+ { id: 'h3_acc8_fl2va', filename: 'h3/MiniMax-H3-FL2VA-Acc-8Step_pruned_comfy.safetensors', source_url: 'https://huggingface.co/Kijai/MiniMax-H3-experimental/resolve/main/loras/MiniMax-H3-FL2VA-Acc-8Step_pruned_comfy.safetensors', label: 'Kijai FL2VA Acc 8-Step', category: 'distill', default_strength: 1, steps: 8, steps_min: 8, steps_max: 8, shift_video: 12 },
34
+ { id: 'h3_acc8_ref2va', filename: 'h3/MiniMax-H3-Ref2VA-Acc-8Step_pruned_comfy.safetensors', source_url: 'https://huggingface.co/Kijai/MiniMax-H3-experimental/resolve/main/loras/MiniMax-H3-Ref2VA-Acc-8Step_pruned_comfy.safetensors', label: 'Kijai Ref2VA Acc 8-Step', category: 'distill', default_strength: 1, steps: 8, steps_min: 8, steps_max: 8, shift_video: 12 },
10
35
 
11
36
  // 15k-vote leaderboard + the authors' own READMEs): larryvrh's
12
37
  // v4-600 EMA is the crowd's #1 (1112 Elo at 6 steps; his README:
@@ -16,7 +41,7 @@ export const H3_LORA_ROWS = [
16
41
  // steps / 12-3 shift / er_sde beta57 (the strength contract
17
42
  // allows 0–2 — 1.5 is the designed point, not a typo). ──
18
43
  { 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
- { 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 },
44
+ { 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, shift_video: 12 },
20
45
 
21
46
  // Matching as Adversarial Distillation (Yu et al., ByteDance +
22
47
  // Texas A&M, arXiv:2610.02188). Rank-128 over the attn/ff modules
@@ -34,12 +59,12 @@ export const H3_LORA_ROWS = [
34
59
  // card). The adaln guard rides the arena's first stacked load: a
35
60
  // dense LoRA silently drops 51 adaln_proj keys on a pruned base —
36
61
  // 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 },
62
+ { 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, steps_min: 4, steps_max: 4, shift_video: 12 },
38
63
  // ── THE REFINER (the second-pass instrument — see the refiner
39
64
  // design in the ledger): solo it is retired-tier (arena 935),
40
65
  // but 3 steps @ 0.7 over a non-accelerated draft "closes" the
41
66
  // generation without smearing (the TaoMate refiner recipe). ──
42
- { id: 'h3_taomate_3step', filename: 'h3/minimax_h3_taomate_3step_lora_avg_rank_19_bf16.safetensors', source_url: 'https://huggingface.co/Kijai/MiniMax-H3_comfy/resolve/main/loras/minimax_h3_taomate_3step_lora_avg_rank_19_bf16.safetensors', label: 'TaoMate 3-Step (refiner)', category: 'distill', default_strength: 0.7, steps: 3 },
67
+ { id: 'h3_taomate_3step', filename: 'h3/minimax_h3_taomate_3step_lora_avg_rank_19_bf16.safetensors', source_url: 'https://huggingface.co/Kijai/MiniMax-H3_comfy/resolve/main/loras/minimax_h3_taomate_3step_lora_avg_rank_19_bf16.safetensors', label: 'TaoMate 3-Step (refiner)', category: 'distill', default_strength: 0.35, steps: 3, steps_min: 3, steps_max: 6, shift_video: 6 },
43
68
  ];
44
69
  export function apply(ctx) {
45
70
  ctx.effect(() => ctx.comfyui.registerFlavor({
@@ -0,0 +1,170 @@
1
+ import type { GraphBuilder } from '@melite/comfyui-card-kit/graph';
2
+ import type { OutputHandle } from '@melite/comfyui-card-kit/graph';
3
+ import type { H3Facts } from './actions.js';
4
+ /** The learned 3D-conv upscale weights (the schema's upscale_model
5
+ * seat carries this same single option — one file, one spelling, no
6
+ * hand-spelled alternatives). */
7
+ export declare const REFINE_UPSCALE_MODEL = "minimax_h3_latent_upscaler_3d_bf16.safetensors";
8
+ /** The 2x pass's measured memory ceiling, in frames at the film clock
9
+ * (24 fps). The friction report's §12.2/§13.2 sweep on the operator's
10
+ * box: 56 f and 90 f pass at 2x (2688×1536, 48 kHz); 141 f OOMs,
11
+ * needing 1.06 GiB more with 20.13 GiB already resident. H3's memory
12
+ * grows monotonically with the window, so a window past the measured
13
+ * OOM point cannot fit at this variant — the door refuses it by name
14
+ * instead of burning a render to find out. */
15
+ export declare const REFINE_2X_OOM_FRAMES = 141;
16
+
17
+
18
+
19
+
20
+ export declare const REFINE_DEFAULT_CLIP_SECONDS = 3.75;
21
+ /** The refine auto-tile's default carried overlap, in frames at the
22
+ * film clock — the film's own seam (SEAM_OVERLAP_FRAMES), which is
23
+ * also token-exact (5, 22, 39 …), so the default auto-tile takes the
24
+ * carry face: the windows chain through the film's own latent
25
+ * continuation across every join. Imported, never hand-typed
26
+ * (refine-window audit D1: the card must never carry a hand-typed
27
+ * copy of a measured constant — and the overlap that matches the
28
+ * generation seam grid is the family contract's own number). */
29
+ export declare const REFINE_DEFAULT_OVERLAP_FRAMES = 22;
30
+ /** The arm predicate: BAG PRESENCE — the same law as the
31
+ * replace/repair/extend/reshoot arms (a commission is armed when
32
+ * its bag is a NON-EMPTY ARRAY). Absent or empty bag = the compose
33
+ * never sees the chain (byte-stable graphs).
34
+ * @param p the gated compose doc
35
+ * @returns true when the refine bag carries at least one entry */
36
+ export declare function refineArmed(p: Record<string, unknown>): boolean;
37
+ /** ONE refine window's loader + save seats (the loop's coordinate).
38
+ * Frames at the film clock (24 fps) — the loader's own units. */
39
+ export interface RefineWindowSeat {
40
+ /** the window's frame cap (the loader's `frame_load_cap`) */
41
+ cap: number;
42
+ /** the window's first frame (the loader's `skip_first_frames`) */
43
+ skip: number;
44
+ /** frames trimmed off this window's OWN head (k≥2 carries the
45
+ * previous window's tail; 0 = the first window, no carry) */
46
+ overlapFrames: number;
47
+ /** this window's SaveVideo prefix (the run tree's own spelling) */
48
+ prefix: string;
49
+ }
50
+ /** THE FAMILY PLANE, the five seats every refine window rides: the
51
+ * film's own masked-edit plane (one unet stack with the lora bag,
52
+ * one clip, the two VAEs). The carry face composes it ONCE for the
53
+ * whole film; a standalone window builds its own. */
54
+ export interface RefinePlane {
55
+ readonly sigmaModel: OutputHandle;
56
+ readonly samplerSel: OutputHandle;
57
+ readonly clip: OutputHandle;
58
+ readonly vaeVideo: OutputHandle;
59
+ readonly vaeAudio: OutputHandle;
60
+ }
61
+
62
+
63
+
64
+
65
+
66
+
67
+
68
+
69
+
70
+
71
+
72
+
73
+ export declare function renderH3RefineWindow(entry: Record<string, unknown>, p: Record<string, unknown>, facts: H3Facts, g: GraphBuilder, seat: RefineWindowSeat): OutputHandle;
74
+ /** The refine renderer: validates the bound entry, then composes
75
+ * the standalone single-window second pass. Like the swap, the film
76
+ * path never reaches here (the card branches on a non-empty refine
77
+ * bag, and a bag under an armed reshoot — or beside any edit arm —
78
+ * refuses loud: one door per doc), and the emission ends in
79
+ * SaveVideo (the extend terminal's own file law — no
80
+ * ChainAssemble: a refine has no loop lineage to assemble).
81
+ * @param entry the refine mod's single bound entry
82
+ * @param p the walked doc params (the lora mod bag + scheduler knobs
83
+ * — the family plane this refine renders under)
84
+ * @param facts the family's lane facts (unet off the DECL row)
85
+ * @param g the run's graph builder
86
+ * @param runId the run tree's id (the refine filename rides it)
87
+ * @returns the window's SaveVideo passthrough (the bag carrier's
88
+ * N=1 delegate returns the same handle; statement callers ignore it) */
89
+ export declare function renderH3Refine(entry: Record<string, unknown>, p: Record<string, unknown>, facts: H3Facts, g: GraphBuilder, runId: string): OutputHandle;
90
+
91
+
92
+
93
+
94
+
95
+
96
+
97
+
98
+
99
+
100
+
101
+
102
+
103
+
104
+ export declare const tokenExactCarry: (frames: number) => boolean;
105
+ /** The next token-exact carry at or above a measured span — the rung
106
+ * a refusal names so the fix is a stated number, not a search.
107
+ * @param frames the measured carry in frames
108
+ * @returns the smallest token-exact carry ≥ `frames` */
109
+ export declare const nextTokenExact: (frames: number) => number;
110
+ /** The most truthful start for the next window: the film's own 22 f
111
+ * seam when the previous window can hold it, else the largest
112
+ * token-exact carry the window can still advance from. The refusal
113
+ * names this frame, so the fix is one edited Start seconds.
114
+ * @param prev the previous window's origin (cap + skip at the film clock)
115
+ * @returns the next window's start frame, or null when the window is
116
+ * too short for any carried join */
117
+ export declare const lawfulCarryStart: (prev: {
118
+ cap: number;
119
+ skip: number;
120
+ }) => number | null;
121
+ export declare function renderH3RefineCarry(entries: ReadonlyArray<Record<string, unknown>>, p: Record<string, unknown>, facts: H3Facts, g: GraphBuilder, windows: ReadonlyArray<{
122
+ cap: number;
123
+ skip: number;
124
+ }>, carries: readonly number[], runId: string): OutputHandle;
125
+ export declare function renderH3RefineBag(bag: Array<Record<string, unknown>>, p: Record<string, unknown>, facts: H3Facts, g: GraphBuilder, runId: string): OutputHandle;
126
+
127
+
128
+
129
+
130
+
131
+
132
+
133
+
134
+
135
+
136
+
137
+
138
+
139
+
140
+
141
+
142
+
143
+
144
+
145
+
146
+
147
+
148
+
149
+ export declare function renderH3RefineWindows(entry: Record<string, unknown>, p: Record<string, unknown>, facts: H3Facts, g: GraphBuilder, runId: string, loop: {
150
+ windows: number;
151
+ overlapFrames: number;
152
+ }): OutputHandle;
153
+ /** The loop's ARITHMETIC (one owner, the card and the wall both read
154
+ * it): how many windows cover `totalSeconds`, and where each starts.
155
+ * `count = ceil((total − overlap) / (clip − overlap))`, clamped to at
156
+ * least one; the last window may overrun the source (the loader
157
+ * stops at the file's own end).
158
+ * @param totalSeconds the stated length of the source film
159
+ * @param clipSeconds the single window's length
160
+ * @param overlapSeconds the carried overlap
161
+ * @returns the window count (≥ 1) */
162
+ export declare function refineWindowCount(totalSeconds: number, clipSeconds: number, overlapSeconds: number): number;
163
+ /** Where each window starts (seconds), in film order.
164
+ * @param count the window count from {@link refineWindowCount}
165
+ * @param clipSeconds the single window's length
166
+ * @param overlapSeconds the carried overlap
167
+ * @param startSeconds the first window's offset
168
+ * @returns the window start offsets, film order */
169
+ export declare function refineWindowStarts(count: number, clipSeconds: number, overlapSeconds: number, startSeconds?: number): number[];
170
+ //# sourceMappingURL=refine.d.ts.map