@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/LICENSE +561 -457
- package/README.md +11 -16
- package/lib/actions.d.ts +100 -17
- package/lib/actions.js +1505 -257
- package/lib/chainEdit.d.ts +196 -0
- package/lib/chainEdit.js +334 -0
- package/lib/chainUpscale.d.ts +25 -0
- package/lib/chainUpscale.js +134 -0
- package/lib/extend.d.ts +25 -0
- package/lib/extend.js +221 -0
- package/lib/filmMix.d.ts +28 -12
- package/lib/filmMix.js +47 -16
- package/lib/finalize.js +6 -1
- package/lib/index.d.ts +12 -0
- package/lib/index.js +269 -65
- package/lib/mods/loras.d.ts +18 -95
- package/lib/mods/loras.js +35 -10
- package/lib/refine.d.ts +170 -0
- package/lib/refine.js +775 -0
- package/lib/repair.d.ts +15 -0
- package/lib/repair.js +164 -0
- package/lib/reshoot.d.ts +201 -0
- package/lib/reshoot.js +399 -0
- package/lib/schema.d.ts +70 -13
- package/lib/schema.js +342 -60
- package/lib/swap.d.ts +14 -0
- package/lib/swap.js +95 -0
- package/lib/timelineContract.d.ts +170 -0
- package/lib/timelineContract.js +238 -2
- package/lib/windowSpec.d.ts +23 -0
- package/lib/windowSpec.js +49 -0
- package/package.json +23 -12
package/lib/schema.js
CHANGED
|
@@ -9,7 +9,7 @@ import { vocabulary } from '@melite/comfyui-card-kit/vocab';
|
|
|
9
9
|
import { samplingExtra } from '@melite/comfyui-card-kit/fields';
|
|
10
10
|
import { bag } from '@melite/contracts/extraKeys';
|
|
11
11
|
import { coerceWireArrays } from '@melite/comfyui-card-kit';
|
|
12
|
-
import { CALL_KEYS, GRID_BASE_FRAMES, GRID_MAX_FRAMES, GRID_STEP_FRAMES, REF_CAPS, assertGridLength, assertSpanGrid, normalizeDeclaredRefs, transitionOverlap } from
|
|
12
|
+
import { CALL_KEYS, DOC_FPS_DEFAULT, FILM_ONLY_KEYS, GRID_BASE_FRAMES, GRID_MAX_FRAMES, GRID_STEP_FRAMES, REF_CAPS, bookSeconds, assertGridLength, assertSpanGrid, deriveWindowFamily, isMediaRef, normalizeDeclaredRefs, transitionOverlap } from './timelineContract.js';
|
|
13
13
|
// the window families this renderer builds (three shapes:
|
|
14
14
|
// t4r opener / t4_open window / t4_chain window).
|
|
15
15
|
export const FAMILIES = ['t4r', 't4_open', 't4_chain'];
|
|
@@ -25,12 +25,17 @@ export const H3_RECOMMENDED_SAMPLERS = [
|
|
|
25
25
|
// family the arena's top i2v runs rode with larryvrh v4.
|
|
26
26
|
"res_multistep", "res_multistep_cfg_pp", "er_sde", "seeds_2", "seeds_3",
|
|
27
27
|
];
|
|
28
|
-
export const JSON_ARRAY_PARAMS = ['calls', 'audio_clips'];
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
28
|
+
export const JSON_ARRAY_PARAMS = ['calls', 'audio_clips', 'keyframes'];
|
|
29
|
+
/** The fps rail's own bounds, one home: the row declares them and the
|
|
30
|
+
* internal seconds rail derives its own bounds from them (see
|
|
31
|
+
* fps_seconds) — a second rail must never invent a rival bound. */
|
|
32
|
+
export const FPS_RAIL_MIN = 1;
|
|
33
|
+
export const FPS_RAIL_MAX = 120;
|
|
34
|
+
/** The refinement window's DECLARED default — one home for the seat,
|
|
35
|
+
* the schema walk, and every wall/receipt that judges the unstated
|
|
36
|
+
* rider (the SOTA plan's researched 0.30–0.35 band; 1.0 is the
|
|
37
|
+
* taomate full-denoise mechanic, opt-in). */
|
|
38
|
+
export const REFINE_DENOISE_DEFAULT = 0.35;
|
|
34
39
|
// ── the params schema — H3TimelineCard mirrored 1:1 ─────────────────────────
|
|
35
40
|
// the declared field order and defaults. Bare (defaultless) keys are the
|
|
36
41
|
// ABSENT / required surface (prompt required=True; image
|
|
@@ -45,8 +50,17 @@ const T4_ONLY_KEYS = [
|
|
|
45
50
|
// omitted key back to null so the body resolves the family's literal
|
|
46
51
|
// (t4 INT 8 / t4r 8.0 — the served structural values).
|
|
47
52
|
export const paramSchema = z.object({
|
|
48
|
-
|
|
49
|
-
|
|
53
|
+
|
|
54
|
+
// for the full model, remove that") — the film-level prompt field
|
|
55
|
+
// is GONE: the calls own the prompts (the single-call lift composes
|
|
56
|
+
// p.prompt from the call's text, card.ts; the merged film composes
|
|
57
|
+
// one prompt from N windows, actions.ts). A textless call refuses
|
|
58
|
+
// at compose — this field never substituted for one by its own
|
|
59
|
+
// doc; it was dead weight on the global recipe's face.
|
|
60
|
+
|
|
61
|
+
// JUST ARBITRARY FRAMES WHENEVER") — `image` is the frame-0 PIN
|
|
62
|
+
// shorthand, never a first-frame physics; the setup is the timeline's keyframes lane.
|
|
63
|
+
image: z.string().role('path').description("An image pin at the film's opening — the frame-0 shorthand (pin any other frame on the timeline's keyframes)").extra('extra', bag({ order: null, wtype: 'image', tooltip: "Absolute path to the PNG pinned at the film's opening (frame 0). For any other frame, pin it on the timeline's keyframes — there is no first/last frame setup." })),
|
|
50
64
|
// THE INPUT SURFACE (the H3 architecture truth — two DIFFERENT
|
|
51
65
|
// mechanics, the FL2VA latent anchors vs the Ref2VA conditioning
|
|
52
66
|
// bus): first_frame/last_frame are PIXEL anchors (bundle inputs
|
|
@@ -59,7 +73,36 @@ export const paramSchema = z.object({
|
|
|
59
73
|
// `expected array length <= 8`), never rides silent. The legacy
|
|
60
74
|
// `refs` stanza bag keeps its compose-side wireList readers; the
|
|
61
75
|
// declared fields are the primary surface.
|
|
62
|
-
|
|
76
|
+
|
|
77
|
+
// SETUP, THERE IS NO FIRST FRAME NOR LAST FRAME, JUST ARBITRARY
|
|
78
|
+
// FRAMES WHENEVER"): last_frame is a HIDDEN alias — a validation
|
|
79
|
+
// key for old drafts and the FL2VA translation, never a face
|
|
80
|
+
// (extra.hidden keeps it out of BOTH projections; params-emit.ts).
|
|
81
|
+
// No wtype: a never-rendered field's wtype is dead surface (the
|
|
82
|
+
// card-wtype-judge's law). The setup is the timeline's keyframes lane.
|
|
83
|
+
last_frame: z.string().role('path').description("Legacy FL2VA end anchor — a hidden validation key for old drafts, never a face; pins ride the timeline's keyframes lane").extra('extra', bag({ order: null, hidden: true, tooltip: "Legacy FL2VA end anchor (bundle input 2) — translation only. The setup is the timeline's keyframes lane: pin ANY frame, any time." })),
|
|
84
|
+
|
|
85
|
+
// "WE DO NOT DO FIRST FRAME LAST FRAME, WE DO ANY FRAME ANY TIME";
|
|
86
|
+
|
|
87
|
+
// the param face, never the engine).
|
|
88
|
+
// The engine lane was real since slice 2 (actions.ts applyKeyframeCompose
|
|
89
|
+
// reads p.keyframes; DECL.studio.writes lists it) but NO face declared
|
|
90
|
+
// it — so the agent saw only image/last_frame and reasoned in the
|
|
91
|
+
// retired first/last physics for nine minutes (session 384a13cd).
|
|
92
|
+
|
|
93
|
+
// (audit 013, the keyframes-row death): the lane IS the frame setup
|
|
94
|
+
// and rides the timeline bar's keyframes lane — the studio doc's own
|
|
95
|
+
// keyframes array, through the studio write door into this walk.
|
|
96
|
+
// image is the frame-0 shorthand and last_frame is a hidden
|
|
97
|
+
// translation alias. NOTE: the pin array is deliberately NOT a
|
|
98
|
+
// carrier knob (the calls precedent, schema.ts:376-382 — the agent
|
|
99
|
+
// plane owns calls in the tool face; the pin lane is owned by the
|
|
100
|
+
// doc plane the same way): schema() below keeps judging the array
|
|
101
|
+
// + row shape and the compose gate keeps the rider admission, so
|
|
102
|
+
// old drafts still walk and pins still compose — no face declares
|
|
103
|
+
// the row. Placement is the compose gate's (schema() below + the
|
|
104
|
+
// build door): film-absolute frame, inside a window, image names
|
|
105
|
+
// media.
|
|
63
106
|
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
107
|
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
108
|
|
|
@@ -78,17 +121,29 @@ export const paramSchema = z.object({
|
|
|
78
121
|
})).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." })),
|
|
79
122
|
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." })),
|
|
80
123
|
|
|
81
|
-
// mods
|
|
82
|
-
//
|
|
83
|
-
//
|
|
84
|
-
//
|
|
85
|
-
|
|
124
|
+
// mods. The pack injects them as reference tokens through ALL
|
|
125
|
+
// DiT blocks on the conditioning side: no bundle-bus slot is
|
|
126
|
+
// spent, so a mod does NOT fire the refs-imply-r2v law (a
|
|
127
|
+
// mod-only film stays open).
|
|
128
|
+
|
|
129
|
+
// media kind — stills, videos, audio — and the system bakes the
|
|
130
|
+
// pack (the Create H3 RefMod node composes the conversion; audio
|
|
131
|
+
// rides its own extractor). media 'mod' seats the mod family's
|
|
132
|
+
// OWN upload face with NO accept filter (any media boards);
|
|
133
|
+
// pre-baked .safetensors stems under models/refmods/ stay legal
|
|
134
|
+
// REUSE currency through the loader.
|
|
135
|
+
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: "RefMods — ANY media rides (images, videos, audio): the system bakes the pack and injects it as reference tokens while the video generates. Strength 1 per mod; uses none of the reference-image slots; its own mechanism — not another reference slot. 8 max. Pre-baked .safetensors packs under models/refmods/ stay legal (reuse through the loader). 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." })),
|
|
86
136
|
|
|
87
|
-
// the
|
|
88
|
-
//
|
|
89
|
-
//
|
|
90
|
-
//
|
|
91
|
-
|
|
137
|
+
// §5/§7.2 — the engine executed identity 500 / pool 16×16 /
|
|
138
|
+
// Compressed Reference / save-every-run as SILENT defaults while
|
|
139
|
+
// the compose stated none of them; the dials did not exist on this
|
|
140
|
+
// lane). Declared with today's values as the defaults: zero
|
|
141
|
+
// behavior change, the same bake — STATED (the value-arms wall's
|
|
142
|
+
// ARMs 13/14 judge the inputs present AND named at the node).
|
|
143
|
+
refmod_mode: vocabulary(["Compressed Reference", "Full Reference"]).description("RefMod bake mode").default("Compressed Reference").extra('extra', bag({ order: null, group: 'refmod', wtype: 'select', tooltip: "How the bake stores the reference. Compressed Reference pools the latent on the grid below — fast, blending-friendly; the pack's own docs mark pooling lossy in exactly the way that destroys facial identity. Full Reference stores the full latent (identity-critical work; more tokens per frame). The extension's training/encode modes build packs offline — they never run when generating." })),
|
|
144
|
+
refmod_pool: z.number().min(2).max(64).step(2).description("RefMod pool grid").default(16).extra('extra', bag({ order: null, group: 'refmod', wtype: 'number', tooltip: "Compressed mode: the pooled latent grid's long edge (even, 2–64). 16 = 64 tokens/frame (the concept sweet spot); 32 = 256 tokens; 64 = 1024, full-mode parity for identity. The grid auto-fits the source's aspect ratio around this edge." })),
|
|
145
|
+
refmod_identity: z.number().min(0).max(2000).step(50).description("RefMod refinement steps").default(500).extra('extra', bag({ order: null, group: 'refmod', wtype: 'number', tooltip: "Compressed mode: optimization steps that reduce the pooled latent's reconstruction error (0 = pooling alone). Each step is a gradient pass — THE time dial: the bake runs this many steps PER REFERENCE PER WINDOW, so a film with N windows pays N × refs × this. The engine's silent 500 default was the 'refmod is slow' burn." })),
|
|
146
|
+
refmod_save: z.boolean().description("Save baked RefMod").default(true).extra('extra', bag({ order: null, group: 'refmod', wtype: 'boolean', tooltip: "Re-write the baked pack into models/refmods/<name> every run so it lands in the loader's dropdown for reuse. Off = bake, inject, discard (no disk writes). The pack carries the stated dials in its metadata either way." })),
|
|
92
147
|
|
|
93
148
|
// input. We don't use that, that is a bug that is there." Film
|
|
94
149
|
// music rides the D-M-E lanes' MUSIC clips, pinned per window;
|
|
@@ -100,8 +155,8 @@ export const paramSchema = z.object({
|
|
|
100
155
|
// dialogue, shallower when the generated voice should hold.
|
|
101
156
|
duck_depth_db: z.number().description("Duck depth (dB)").min(-48).max(0).step(1).default(-14).extra('extra', bag({ order: null, wtype: 'number', columns: 2, width: 1, tooltip: "How far the generated voice ducks under a dialogue clip (−14 is the mix-desk default)." })),
|
|
102
157
|
seed: z.number().description("Seed").step(1).default(42).extra('extra', bag({ order: null, columns: 2, width: 1, tooltip: "Same seed across re-rolls = same world texture" })),
|
|
103
|
-
width: z.number().description("Width").min(448).max(1344).step(
|
|
104
|
-
height: z.number().description("Height").min(448).max(
|
|
158
|
+
width: z.number().description("Width").min(448).max(1344).step(32).default(1344).extra('extra', bag({ order: null, wtype: 'number', columns: 2, width: 1 })),
|
|
159
|
+
height: z.number().description("Height").min(448).max(1344).step(32).default(768).extra('extra', bag({ order: null, wtype: 'number', columns: 2, width: 1 })),
|
|
105
160
|
|
|
106
161
|
// (min 21, step 5) contradicted the card's own declared law — the
|
|
107
162
|
// 17k+5 frame grid (identity principle + tooltip: 56/90/124/362).
|
|
@@ -113,8 +168,28 @@ export const paramSchema = z.object({
|
|
|
113
168
|
// explicit 90 passes the walk. 56 (the declared
|
|
114
169
|
// default) is on-grid; the omitted-key path normalizes to null in
|
|
115
170
|
// schema() so the body computes the family's frame budget.
|
|
116
|
-
|
|
117
|
-
|
|
171
|
+
|
|
172
|
+
// ALWAYS LAYER B"): the timeline's calls own the window lengths —
|
|
173
|
+
// the single-call lift derives this row from the call's span at
|
|
174
|
+
// compose (a stated span outranks this default; a knob pin still
|
|
175
|
+
// outranks both — the user's own word). The row is HIDDEN on the
|
|
176
|
+
|
|
177
|
+
// EDITABLE as the span's rival — a doc-level Frames only owns
|
|
178
|
+
// span-less calls, which fresh cards never author); it STAYS
|
|
179
|
+
// SCHEMA-DECLARED (the compose still reads p.length, CALL_KNOB_KEYS
|
|
180
|
+
// pins length per call, and the studio carries it display-owned —
|
|
181
|
+
// the round-trip seat wall) — the Layer-A face never shows it.
|
|
182
|
+
length: z.number().description("Frames").min(GRID_BASE_FRAMES).max(GRID_MAX_FRAMES).step(GRID_STEP_FRAMES).default(56).extra('extra', bag({ hidden: true, order: null, columns: 2, width: 1, tooltip: "How long each clip runs. Durations snap to the engine's 17k+5 grid: 56 frames = 2.33s, 124 = 5.17s, 362 = 15s — the clip's length rounds to the nearest step." })),
|
|
183
|
+
|
|
184
|
+
// clock, ONE owner: the doc's stated fps rides into every
|
|
185
|
+
// CreateVideo container so the clip's seconds equal the bar's
|
|
186
|
+
// seconds. Declared default DERIVES the one code home (audit 013
|
|
187
|
+
// cure 5, the fps ONE-HOME: DOC_FPS_DEFAULT in timelineContract —
|
|
188
|
+
// the walk fills it, the lawful declared kind, never a silent ??
|
|
189
|
+
// in the compose). The old hardcoded 24 in both render arms played
|
|
190
|
+
// a 90-frame window at 3.75s under a 5.6s bar.
|
|
191
|
+
fps: z.number().description("Playback fps").min(FPS_RAIL_MIN).max(FPS_RAIL_MAX).default(DOC_FPS_DEFAULT).extra('extra', bag({ hidden: true })),
|
|
192
|
+
steps: z.number().description("Steps").min(4).max(30).default(6).extra('extra', samplingExtra('steps', { tooltip: "6 for draft — the engine kernel's own calibrated count (its H3SLAAttention tooltip: use 6 steps rather than lowering sparsity; PARITY-pinned with plaguekind v7 — the 12 carried no receipt and matched neither his v7=6 nor v9=8; regolded by the 2026-10-16 upstream-parity audit); 30 standard; a boarded distill lora applies its own steps (edit them on the lora entry)" })),
|
|
118
193
|
|
|
119
194
|
// needs an on/off switch, it is very unclear if it is on or off"):
|
|
120
195
|
// one boolean heads the tab. Off (default) = the whole post chain
|
|
@@ -184,9 +259,36 @@ export const paramSchema = z.object({
|
|
|
184
259
|
// refine_lora picks the instrument; strength/steps default from
|
|
185
260
|
// THE ROW (no silent overrides); the pass rides the doc's own
|
|
186
261
|
// sampler/scheduler.
|
|
187
|
-
refine_lora: z.string().description("Refine lora").default("").extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true", wtype: 'select', optionsFrom: 'loras', tooltip: "
|
|
262
|
+
refine_lora: z.string().description("Refine lora").default("").extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true", wtype: 'select', optionsFrom: 'loras', tooltip: "Pick a refiner lora from your library (e.g. h3_taomate_3step). Empty = no refine pass. Strength/steps default from the row. LORAS ARE ONLY MODS — pick from the list; an unknown id is refused." })),
|
|
188
263
|
refine_strength: z.number().description("Refine strength").min(0).max(2).step(0.05).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true", wtype: 'number', tooltip: "Override the refiner row's strength. Rides only when refine_lora is set." })),
|
|
189
264
|
refine_steps: z.number().description("Refine steps").min(1).max(10).step(1).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true", wtype: 'number', tooltip: "Override the refiner row's step count (taomate: 3). Rides only when refine_lora is set." })),
|
|
265
|
+
// THE REFINE WINDOW (SOTA plan limb 1, H3_TIMELINE_RESERACH Stage
|
|
266
|
+
|
|
267
|
+
// is 0.35 — the research's refinement window [0.30, 0.35] keeps
|
|
268
|
+
// pass 1's structure and polishes texture, instead of the old
|
|
269
|
+
// default 1.0 regenerating the whole window (the TaoMate
|
|
270
|
+
// full-denoise mechanic). 1.0 stays STATEABLE for that mechanic;
|
|
271
|
+
// the ARM 36 band arm outlaws an out-of-window default.
|
|
272
|
+
// (0.05, 1]; 0 is a dead pass and refuses.
|
|
273
|
+
refine_denoise: z.number().description("Refine denoise").min(0.05).max(1).step(0.05).default(REFINE_DENOISE_DEFAULT).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true", wtype: 'number', tooltip: "The refinement window (the researched 0.30–0.35 band): pass 1's structure stays, the second pass polishes texture. Default 0.35. 1.0 = full re-denoise (the taomate full pass, opt-in). Rides on the refine rider when refine_lora is set — and as the handoff's own window when the latent-upscale route is on." })),
|
|
274
|
+
|
|
275
|
+
// the learned-latent alternative to the SeedVR2 pixel route: the
|
|
276
|
+
// vendored xmarre pack's MinimaxH3LatentUpscaler3DRefineHandoff
|
|
277
|
+
// rides IN-BAND on the pass-1 joint AV latent (upscale + the
|
|
278
|
+
// low-sigma refinement inside the 3D-conv kernel, audio preserved
|
|
279
|
+
// under lock_audio). Pass 1 composes the STATED geometry and the
|
|
280
|
+
// handoff doubles ON TOP of it — armed, the render lands at 2× the
|
|
281
|
+
// stated grid (the half-grid stamp that rendered base tier died
|
|
282
|
+
|
|
283
|
+
// set) mounts in-band on the upscaled latent. Route off (default)
|
|
284
|
+
// = the graph is byte-stable with the pre-route estate (ARM 41).
|
|
285
|
+
upscale_route: vocabulary(["off", "latent_2x"]).description("Latent upscale route").default("off").extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true", wtype: 'select', tooltip: "Upscale between the passes: off (default — the render stays at the stated size) or latent_2x (pass 1 renders the stated size and the learned upscaler doubles the latent in-band — the render lands at 2× the stated size)." })),
|
|
286
|
+
// CLOSED FILE SURFACE (the operator's dropdown law — the sr_model
|
|
287
|
+
// precedent above): the ONE file the estate runs — the on-disk LBH
|
|
288
|
+
// v1 3D-conv bf16 checkpoint (the h3 latent weight, verified
|
|
289
|
+
// sha256 4f57821f). Single-member until the vendor ships a second
|
|
290
|
+
// weight; the union owns the dropdown AND the membership refusal.
|
|
291
|
+
upscale_model: vocabulary(["minimax_h3_latent_upscaler_3d_bf16.safetensors"]).description("Latent upscale model").default("minimax_h3_latent_upscaler_3d_bf16.safetensors").extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true", wtype: 'select', tooltip: "The learned latent-upscale weights (the 3D-conv bf16 checkpoint). Joins from the engine's latent-upscale shelf." })),
|
|
190
292
|
// ── THE ATTENTION BACKEND (roadmap item 3; the h3_attention
|
|
191
293
|
// "sage/sol" folklore was FICTION — no such knob, and the engine
|
|
192
294
|
// enumerates only 'pytorch attention' on ModelAttentionBackend;
|
|
@@ -195,11 +297,20 @@ export const paramSchema = z.object({
|
|
|
195
297
|
// estate-proven literal (plaguekind's template value, silicon
|
|
196
298
|
// receipts on the t4 arm); 'pytorch attention' is the engine's
|
|
197
299
|
// own enumeration. Values the engine refuses are NOT offered.
|
|
198
|
-
attention_backend: vocabulary(["comfy kitchen attention", "pytorch attention"]).description("Attention backend").default("comfy kitchen attention").extra('extra', bag({ order: null, group: 'sampling', wtype: 'select', tooltip: "The
|
|
300
|
+
attention_backend: vocabulary(["comfy kitchen attention", "pytorch attention"]).description("Attention backend").default("comfy kitchen attention").extra('extra', bag({ order: null, group: 'sampling', wtype: 'select', tooltip: "The attention math the engine uses when the SLA sparse-attention switch (Sla group) is OFF. comfy-kitchen is the proven default; pytorch is the engine's fallback." })),
|
|
199
301
|
interp_model: vocabulary(["film_net_fp16.safetensors", "rife47.pth"]).description("Interp model").default("film_net_fp16.safetensors").extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&interpolate_enabled=true", wtype: 'select', tooltip: "FILM or RIFE frame-interpolation weights." })),
|
|
200
302
|
interp_multiplier: z.number().description("Interp multiplier").min(2).max(4).step(1).default(2).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&interpolate_enabled=true", wtype: 'number', tooltip: "Frame multiple (2 = double the frame rate)." })),
|
|
201
303
|
sr_switch: z.boolean().description("Super-Res (SeedVR2)").default(false).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true", tooltip: "Upscale the final film through SeedVR2 before saving." })),
|
|
202
|
-
|
|
304
|
+
|
|
305
|
+
// BELOW the film's own 768 native canvas (the F34 plan geometry,
|
|
306
|
+
// 1344×768) — a super-res target below the rendered height is a
|
|
307
|
+
// downscale wearing the upscale seat. The floor IS the native
|
|
308
|
+
// height (768); the step is 24, the coarsest step that keeps
|
|
309
|
+
|
|
310
|
+
// grid from the new floor, so the served ladder survives the
|
|
311
|
+
// floor move byte-stable — the walk's step is the served
|
|
312
|
+
// quantization, never the instrument's law.
|
|
313
|
+
sr_resolution: z.number().description("Super-Res target").min(768).max(2160).step(24).default(1080).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&sr_switch=true", wtype: 'number', tooltip: "The SeedVR2 output height in px (never below the film's own 768 native canvas)." })),
|
|
203
314
|
// CLOSED FILE SURFACE (the operator's dropdown law — a free-text
|
|
204
315
|
// weights row is a guess box): the two SeedVR2 DiT files the estate
|
|
205
316
|
// actually runs (both proven in shipped _flow.json receipts: the fp16
|
|
@@ -207,12 +318,34 @@ export const paramSchema = z.object({
|
|
|
207
318
|
// dropdown AND the membership refusal (an off-set value fails at the
|
|
208
319
|
// schema door, never as a ComfyUI 400). Gated behind sr_switch like
|
|
209
320
|
// every other post leaf.
|
|
210
|
-
sr_model: vocabulary(["seedvr2_ema_3b_fp16.safetensors", "seedvr2_ema_3b_fp8_e4m3fn.safetensors"]).description("Super-Res model").default("
|
|
211
|
-
// the R2V COMBO size mode — the
|
|
212
|
-
|
|
213
|
-
//
|
|
214
|
-
//
|
|
215
|
-
|
|
321
|
+
sr_model: vocabulary(["seedvr2_ema_3b_fp16.safetensors", "seedvr2_ema_3b_fp8_e4m3fn.safetensors"]).description("Super-Res model").default("seedvr2_ema_3b_fp8_e4m3fn.safetensors").extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&sr_switch=true", wtype: 'select', tooltip: "SeedVR2 weights (models/upscale_models/): fp8_e4m3fn 3B default (the leaner row — a 24GB card cannot hold the fp16 3B model beside a 90-frame 1080p decode), fp16 for cards with more headroom." })),
|
|
322
|
+
// the R2V COMBO size mode — the engine's own vocabulary is the
|
|
323
|
+
|
|
324
|
+
// ref_image_size "704x1280" against comfy_extras.nodes_minimax_h3
|
|
325
|
+
// MiniMaxH3ReferenceToVideo answers value_not_in_list —
|
|
326
|
+
// "'704x1280' not in ['match', 'max']"). The WxH patch-arm that
|
|
327
|
+
// once rode real runs is a phantom at the current core: it
|
|
328
|
+
// composed estate-side and died at the engine's queue validation.
|
|
329
|
+
// The knob narrows to the one literal both truths admit.
|
|
330
|
+
|
|
331
|
+
// spec's diagnostic matrix seats the aspect-distortion failure
|
|
332
|
+
// mode on "Setting reference image scale to max" — the max edge
|
|
333
|
+
// warps the reference's aspect into the output frame. max, a WxH
|
|
334
|
+
// literal, and every other value refuse LOUD at the schema gate,
|
|
335
|
+
// ahead of the engine — never as a ComfyUI 400.
|
|
336
|
+
ref_image_size: vocabulary(["match"]).description("Ref size").default("match").extra('extra', bag({ order: null, group: 'sampling', wtype: 'select', tooltip: "How the bundle resizes ref images: match the anchor's aspect. The engine's own list also offers 'max', but the spec's diagnostic matrix seats the aspect-distortion failure on max (the max edge warps the reference's aspect into the output frame), and explicit WxH refuses at the engine's queue validation — match is the only value both truths admit." })),
|
|
337
|
+
// ── THE RE-SHOOT GROUP IS RETIRED FROM THE FLAT SURFACE (the
|
|
338
|
+
// fourth-mod-bag unification, §8 of the multiwindow audit,
|
|
339
|
+
|
|
340
|
+
// knobs outside the admission plane while replace/repair/extend
|
|
341
|
+
// ride card-declared mod bags — the disjointedness the operator
|
|
342
|
+
// named ("it's disjointed to how we usually handle using video
|
|
343
|
+
// inputs"). The camera chain's knobs now live on the card's
|
|
344
|
+
// RESHOOT_MOD kind (card.ts, served on features.modifiers like
|
|
345
|
+
// its three siblings); the emission predicates read the bag
|
|
346
|
+
// (reshoot.ts reshootArmed); the studio panel authors it through
|
|
347
|
+
// the mods surface. The LICENSE FRAME and the chain's own law are
|
|
348
|
+
// narrated at their one remaining home: reshoot.ts.
|
|
216
349
|
|
|
217
350
|
// one truth, one owner. shift_video is a NUMBER, default 8, served
|
|
218
351
|
// and walked identically. The old z.const(null) arm — the
|
|
@@ -235,22 +368,39 @@ export const paramSchema = z.object({
|
|
|
235
368
|
// visible_when behind it. Default true = today's behavior for
|
|
236
369
|
// every existing doc (absent = on at compose).
|
|
237
370
|
sla_enabled: z.boolean().description("SLA sparse attention").default(true).extra('extra', bag({ order: null, group: "sla", tooltip: "Block-sparse attention on the DiT (the primary speed arm, ~1.75x). Off falls back to the Attention backend row." })),
|
|
238
|
-
|
|
239
|
-
|
|
371
|
+
|
|
372
|
+
|
|
373
|
+
// 0.9 → 0.85. The research band is 0.75–0.85 (H3_TIMELINE_RESERACH
|
|
374
|
+
// §3 summary matrix) and the kernel's own tooltip states 0.85 is
|
|
375
|
+
// "the shipped default and what the SLA turbo LoRA was distilled
|
|
376
|
+
// against" (object_info_prod H3SLAAttention) — the shipped 0.9 sat
|
|
377
|
+
// OUTSIDE both (ROADMAP's old "no cure owed" row conflated
|
|
378
|
+
// knobs-seated with values-matching). 0.90 stays a STATEABLE speed
|
|
379
|
+
// preset; the band arm ARM 35 reds a default nudged past either
|
|
380
|
+
// edge without the P3 arena's receipt.
|
|
381
|
+
sla_sparsity: z.number().description("SLA sparsity").min(0).max(0.95).step(0.05).default(0.85).extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", wtype: 'slider', tooltip: "Block-sparse attention density. Default 0.85 — what the speed turbo LoRA was distilled against, and the top of the researched 0.75–0.85 band. 0.90 is a stated speed preset (~15% faster, kept from earlier tuning); below ~0.60 the sparse kernel is slower than plain attention. Steps, not this dial, own audio cleanliness." })),
|
|
382
|
+
// BLOCK SIZE — audited MATCH (the P0 audit's table verdict; no
|
|
383
|
+
// retune): "32" IS the kernel's own default and its tooltip's
|
|
384
|
+
// quality-best point ("Coming down to 32 has increased the quality
|
|
385
|
+
// even further for marginal slowdown"). The old tooltip named only
|
|
386
|
+
// 64/128 — a default its own copy never mentioned. Stated in full:
|
|
387
|
+
sla_block_size: vocabulary(["32", "64", "128"]).description("SLA block size").default("32").extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", wtype: 'select', tooltip: "How many tokens share one key selection — it matters most for audio. 32 = the default, the finest routing and the kernel author's quality-best. 64 = clean audio, ~2% faster. 128 = robotic speech; audio-less generations only." })),
|
|
240
388
|
sla_min_seq_len: z.number().description("SLA min seq length").min(512).step(512).default(12288).extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", wtype: 'number', tooltip: "Sequences shorter than this skip sparsity." })),
|
|
241
|
-
sla_dense_last_steps: z.number().description("SLA dense last steps").min(0).max(10).step(1).default(
|
|
389
|
+
sla_dense_last_steps: z.number().description("SLA dense last steps").min(0).max(10).step(1).default(2).extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", wtype: 'number', tooltip: "Final steps run dense for convergence." })),
|
|
242
390
|
sla_dense_steps: z.string().description("SLA dense steps (explicit)").default("0").extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", tooltip: "e.g. 0,1 or 0-2 — explicit dense step indices." })),
|
|
243
391
|
sla_dense_backend: vocabulary(["comfy_kitchen", "pytorch", "auto"]).description("SLA dense backend").default("comfy_kitchen").extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", wtype: 'select' })),
|
|
244
392
|
sla_reference_protection: vocabulary(["Off", "Light", "Heavy Enforcement"]).description("SLA ref protection").default("Heavy Enforcement").extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", wtype: 'select', tooltip: "Protects reference frames from sparse-attention drift." })),
|
|
245
393
|
sla_protect_audio: z.boolean().description("SLA protect audio").default(true).extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", tooltip: "Keep the audio stream out of the sparse path." })),
|
|
246
|
-
sla_stabilize_motion: z.boolean().description("SLA stabilize motion").extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", tooltip: "
|
|
394
|
+
sla_stabilize_motion: z.boolean().description("SLA stabilize motion").extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", tooltip: "Untouched, this turns on for every model except the t4r openers — those run with it off." })),
|
|
247
395
|
sla_disable_fp16_accum: z.boolean().description("SLA full-precision accum").default(true).extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", tooltip: "Full-precision accumulation inside the sparse kernel." })),
|
|
248
396
|
// ── the sharpen leaves (compose: only EXPLICITLY-set leaves patch
|
|
249
|
-
//
|
|
250
|
-
//
|
|
397
|
+
// the installed node's V3 combo wires (GAPS-1/F9 cure — the old
|
|
398
|
+
// flat grouped dict matched no option key, so the finalize dropped
|
|
399
|
+
// `method` outright); bare emission defaults do NOT change a run
|
|
400
|
+
// that never sets them). VISIBILITY rides the
|
|
251
401
|
// declaration's own visible_when grammar (&-ANDed guards, |-SET
|
|
252
402
|
// values) — no hand-rolled predicates anywhere.
|
|
253
|
-
sharpen_method: vocabulary(["rcas", "adaptive_usm", "high_pass", "deconvolution"]).description("Sharpen Method").extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&sharpen_enabled=true", wtype: 'select' })),
|
|
403
|
+
sharpen_method: vocabulary(["rcas", "adaptive_usm", "high_pass", "deconvolution"]).default("rcas").description("Sharpen Method").extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&sharpen_enabled=true", wtype: 'select' })),
|
|
254
404
|
sharpen_radius: z.number().description("Sharpen Radius").min(0.5).max(5).step(0.5).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&sharpen_enabled=true&sharpen_method=adaptive_usm|high_pass|deconvolution", wtype: 'number', tooltip: "adaptive_usm / high_pass / deconvolution only." })),
|
|
255
405
|
sharpen_threshold: z.number().description("Sharpen Noise Gate").min(0).max(1).step(0.05).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&sharpen_enabled=true&sharpen_method=adaptive_usm", wtype: 'number', tooltip: "adaptive_usm only." })),
|
|
256
406
|
sharpen_iterations: z.number().description("Sharpen Iterations").min(1).max(100).step(1).extra('extra', bag({ order: null, group: 'second_pass', visible_when: "second_pass_enabled=true&sharpen_enabled=true&sharpen_method=deconvolution", wtype: 'number', tooltip: "deconvolution only." })),
|
|
@@ -273,7 +423,27 @@ export const paramSchema = z.object({
|
|
|
273
423
|
// default-less blank row on the form is a lie.
|
|
274
424
|
k: z.number().description("Window index (film vocabulary)").step(1).extra('extra', bag({ hidden: true })),
|
|
275
425
|
noise_seed: z.number().description("Per-window noise seed").step(1).extra('extra', bag({ hidden: true })),
|
|
276
|
-
|
|
426
|
+
|
|
427
|
+
// STALE ANYWHERE"): this row is INTERNAL (the declared surface's
|
|
428
|
+
// own words) and derives from the window's generation length at
|
|
429
|
+
// compose, every compose. The old .default(10) seeded every
|
|
430
|
+
// unstated doc with a 10-second clock that outlived every span
|
|
431
|
+
// drag — the operator's burn: a 5-second span on the bar rendered
|
|
432
|
+
// 10 seconds of mush. No default, no user face: hidden; the
|
|
433
|
+
// compose owns the derivation (render loop restates it
|
|
434
|
+
// unconditionally from the actual window length).
|
|
435
|
+
|
|
436
|
+
// burn: `$.fps_seconds expected number >= 1 but got 0.917`). The old
|
|
437
|
+
// .min(1).max(60) was a hand-picked second-count laid over two laws
|
|
438
|
+
// that already bound this quotient: the grid's 22..362 frames and the
|
|
439
|
+
// fps rail's 1..120. The grid's own SHORTEST window is 22f = 0.917s at
|
|
440
|
+
// the doc default 24fps, so the floor refused every grid-legal opener;
|
|
441
|
+
// the ceiling refused a grid-legal 362f window on a 1fps doc (362s).
|
|
442
|
+
// The bounds below are DERIVED from those two laws (never authored
|
|
443
|
+
// numbers): they refuse only what the laws already make impossible —
|
|
444
|
+
// the 400-class guard against a zero/negative clock on the wire —
|
|
445
|
+
// while every grid-legal window at every legal fps passes.
|
|
446
|
+
fps_seconds: z.number().description("Clip seconds (fps rail — internal, derived from the window length at compose)").min(bookSeconds(GRID_BASE_FRAMES, FPS_RAIL_MAX)).max(bookSeconds(GRID_MAX_FRAMES, FPS_RAIL_MIN)).extra('extra', bag({ hidden: true })),
|
|
277
447
|
// THE LEGACY ALIASES (renderer-era spellings of the mod switches)
|
|
278
448
|
// — gate-admitted for old drafts, never user surface: the MODS
|
|
279
449
|
|
|
@@ -301,6 +471,26 @@ export const paramSchema = z.object({
|
|
|
301
471
|
// fills natively. (A schemastery field transform would classify the
|
|
302
472
|
// served knob as type 'json' — the honest 'boolean' taxonomy wins,
|
|
303
473
|
// so the law lives here, shared by schema() and the compose gate.)
|
|
474
|
+
|
|
475
|
+
|
|
476
|
+
|
|
477
|
+
|
|
478
|
+
|
|
479
|
+
|
|
480
|
+
export const REFINE_PLANE_KEYS = [
|
|
481
|
+
'sched_name', 'shift_video', 'shift_audio',
|
|
482
|
+
'sla_enabled', 'sla_sparsity', 'sla_block_size', 'sla_min_seq_len',
|
|
483
|
+
'sla_dense_last_steps', 'sla_protect_audio', 'sla_dense_steps',
|
|
484
|
+
'sla_dense_backend', 'sla_disable_fp16_accum', 'sla_stabilize_motion',
|
|
485
|
+
'sla_reference_protection',
|
|
486
|
+
];
|
|
487
|
+
export const refinePlaneSchema = z.object(Object.fromEntries(REFINE_PLANE_KEYS.map((k) => {
|
|
488
|
+
const knob = (paramSchema.dict ?? {})[k];
|
|
489
|
+
if (knob === undefined) {
|
|
490
|
+
throw new Error(`h3 family: refinePlaneSchema names '${k}' — not a declared knob of the film carrier (the refine card inherits the plane, never invents a dial)`);
|
|
491
|
+
}
|
|
492
|
+
return [k, knob];
|
|
493
|
+
})));
|
|
304
494
|
export const coerceWireBoolean = (raw) => {
|
|
305
495
|
if (typeof raw.interpolate_enabled === 'string') {
|
|
306
496
|
|
|
@@ -314,6 +504,28 @@ export const coerceWireBoolean = (raw) => {
|
|
|
314
504
|
}
|
|
315
505
|
return raw;
|
|
316
506
|
};
|
|
507
|
+
/** THE PIN ROW SHAPE (one law, two seats): the doc walk and the compose
|
|
508
|
+
* gate both run this BEFORE any placement math — a row must carry a
|
|
509
|
+
* whole film-absolute frame and a non-empty image ref. Exported so the
|
|
510
|
+
* walk's refusal and the build door's are the same literal (the
|
|
511
|
+
* gate-and-walk wall pins them); placement and media existence stay
|
|
512
|
+
* the compose gate's, which owns the doc's calls/windows. */
|
|
513
|
+
export function assertKeyframeRowShape(rows) {
|
|
514
|
+
for (let i = 0; i < rows.length; i++) {
|
|
515
|
+
const row = (rows[i] ?? {});
|
|
516
|
+
const f = row.frame;
|
|
517
|
+
if (typeof f !== 'number' || !Number.isFinite(f)) {
|
|
518
|
+
throw new Error(`keyframes[${i}]: frame is required (a finite film-absolute frame — a row without a frame is not a pin)`);
|
|
519
|
+
}
|
|
520
|
+
if (!Number.isInteger(f)) {
|
|
521
|
+
throw new Error(`keyframes[${i}]: frame ${f} is not a whole frame — film frames are integers (round the pin)`);
|
|
522
|
+
}
|
|
523
|
+
const image = typeof row.image === 'string' ? row.image.trim() : '';
|
|
524
|
+
if (image === '') {
|
|
525
|
+
throw new Error(`keyframes[${i}]: image is required (the pin channel is image pins — a row without a source anchors nothing)`);
|
|
526
|
+
}
|
|
527
|
+
}
|
|
528
|
+
}
|
|
317
529
|
export function schema(v) {
|
|
318
530
|
const raw = (v ?? {});
|
|
319
531
|
if (raw.calls !== undefined && !Array.isArray(raw.calls)) {
|
|
@@ -322,6 +534,16 @@ export function schema(v) {
|
|
|
322
534
|
if (raw.audio_clips !== undefined && !Array.isArray(raw.audio_clips)) {
|
|
323
535
|
throw new Error('h3-timeline: audio_clips must be an array of clip rows');
|
|
324
536
|
}
|
|
537
|
+
if (raw.keyframes !== undefined) {
|
|
538
|
+
if (!Array.isArray(raw.keyframes)) {
|
|
539
|
+
throw new Error('h3-timeline: keyframes must be an array of pin rows ({ frame, image }) — any frame, any time');
|
|
540
|
+
}
|
|
541
|
+
// The row shape is judged here FIRST (named vocabulary), so the
|
|
542
|
+
// carrier's strict row typing never answers a bad row with
|
|
543
|
+
// schemastery's generic parse text (the build door runs the same
|
|
544
|
+
// function before its placement math).
|
|
545
|
+
assertKeyframeRowShape(raw.keyframes);
|
|
546
|
+
}
|
|
325
547
|
// length null SURVIVES this walk on purpose (the walk-shadow fix:
|
|
326
548
|
// multi-call docs keep null — per-window spans compute at compose).
|
|
327
549
|
|
|
@@ -441,7 +663,8 @@ export function schema(v) {
|
|
|
441
663
|
// had no such file). A bare word with no slash, dot, or scheme
|
|
442
664
|
// is a label, never media — refuse here, naming the value and
|
|
443
665
|
// the cure, at admission (zero GPU) instead of the engine door.
|
|
444
|
-
|
|
666
|
+
// (the predicate lives in timelineContract — the keyframe pin
|
|
667
|
+
// gate judges the same law at its own door)
|
|
445
668
|
for (const gkey of ['image', 'ref_image', 'image_name']) {
|
|
446
669
|
const gv = c[gkey];
|
|
447
670
|
if (typeof gv === 'string' && gv.trim() !== '' && !isMediaRef(gv.trim())) {
|
|
@@ -471,23 +694,34 @@ export function schema(v) {
|
|
|
471
694
|
// derives a text-only window (run-899a8448: the UI wrote `image`,
|
|
472
695
|
// the derivation checked the other three, variant fell t4_open and
|
|
473
696
|
// the reference never became a node).
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
|
|
478
|
-
|
|
479
|
-
|
|
480
|
-
|
|
481
|
-
// derivation owns it first
|
|
482
|
-
|| wireList(raw.ref_images).length + wireList(raw.ref_videos).length + wireList(raw.ref_audios).length > 0
|
|
483
|
-
|| (typeof raw.last_frame === 'string' && raw.last_frame.trim() !== '');
|
|
484
|
-
variant = calls.length > 1 ? 't4_chain' : hasGuide ? 't4r' : 't4_open';
|
|
697
|
+
// ONE spelling now — deriveWindowFamily above (the
|
|
698
|
+
|
|
699
|
+
// SYNTHESIZED calls (the fresh-card arm above), so the
|
|
700
|
+
// fresh-press shape derives exactly as it composes; the guide
|
|
701
|
+
// union, the pin channel, and the declared input surface live
|
|
702
|
+
// in the export, never re-spelled here.
|
|
703
|
+
variant = deriveWindowFamily({ ...raw, calls });
|
|
485
704
|
out.variant = variant;
|
|
486
705
|
}
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
706
|
+
|
|
707
|
+
// DEAD by totality and deleted: variant is either a STATED family
|
|
708
|
+
// (only ever assigned when it is a FAMILIES member) or a DERIVED
|
|
709
|
+
// one (deriveWindowFamily returns exactly the three members), so
|
|
710
|
+
// `includes(variant)` could never be false — the guard was
|
|
711
|
+
// uncoverable code the per-file gate kept paying for.
|
|
712
|
+
|
|
713
|
+
// is UNSTATED at every arrival door — the switch verbs' delete
|
|
714
|
+
// mark (modelSwitchPatch null verdicts, mergeSwitchFrame,
|
|
715
|
+
// seedUser), the drill null-set precedent, the 21 lane's
|
|
716
|
+
// journey-PASSed null→200. An arrival door that reads explicit
|
|
717
|
+
// null as stated re-opens ERROR g's gap (the gate promises []
|
|
718
|
+
// while the walk refuses 400). So `explicit` is stated-and-
|
|
719
|
+
// valued: a null-carried key never counts as stated — at the
|
|
720
|
+
// dead-key gates AND the same `bad` reader's film-only sibling
|
|
721
|
+
// below. (The merge already drops nulls; the schema never sees
|
|
722
|
+
// a null it must type-check — unstated keys ride their honest
|
|
723
|
+
// defaults.)
|
|
724
|
+
const explicit = new Set(Object.keys(raw).filter((k) => raw[k] !== null));
|
|
491
725
|
|
|
492
726
|
// default(8) is THE owner. The old nulling — "an omitted key
|
|
493
727
|
// normalizes back to null so the body resolves the family's
|
|
@@ -530,10 +764,53 @@ export function schema(v) {
|
|
|
530
764
|
// inert for multi-call chains — spans own the film)
|
|
531
765
|
}
|
|
532
766
|
const bad = (keys) => keys.filter((kk) => explicit.has(kk)).sort();
|
|
533
|
-
|
|
534
|
-
|
|
767
|
+
|
|
768
|
+
// gate-11 burn: the compose gate refused a lawful Final-Cut doc
|
|
769
|
+
// with four unactionable lines, because the t4r render arm wired
|
|
770
|
+
// no pixel post chain). The arm now mounts the chain
|
|
771
|
+
// (actions.ts renderH3Window hoists it above the family branch),
|
|
772
|
+
// so every finish key fires on every lane and the walk has no
|
|
773
|
+
// lane-conditional refusal to speak. The old T4_ONLY_KEYS set and
|
|
774
|
+
// its t4rInjectRefusal spine are deleted from timelineContract.ts
|
|
775
|
+
// — do not reintroduce a lane dead-letter gate here; cure the
|
|
776
|
+
// renderer instead, and let THIS walk's own gates judge what a
|
|
777
|
+
// doc shape can honor (the film-only gate below, the route-master
|
|
778
|
+
// gate, the guide seats).
|
|
779
|
+
// (B6, timeline-calls-burn §CURES-OWED 5 / ui-truth-gap #4's walk
|
|
780
|
+
// leg) THE FILM-ONLY GATE, the t4r gate's sibling: FILM_ONLY_KEYS
|
|
781
|
+
// are read in exactly one seat — computeFilmMix's manifest, inside
|
|
782
|
+
// the multi-window film tail (actions.ts) — so a single-window doc
|
|
783
|
+
// (t4r, t4_open) stating one composed it into NO node: the operator
|
|
784
|
+
// set a duck depth the mix desk never saw. The studio rail's omit
|
|
785
|
+
// law (RunRecipeEngine.tsx) judges the SAME contract set — one
|
|
786
|
+
// home, timelineContract.ts — so a row either door refuses is
|
|
787
|
+
// refused at both.
|
|
788
|
+
if (variant !== 't4_chain') {
|
|
789
|
+
const b = bad(FILM_ONLY_KEYS);
|
|
535
790
|
if (b.length)
|
|
536
|
-
throw new Error(`h3_window(
|
|
791
|
+
throw new Error(`h3_window(${variant}): film-only inject keys: ${b.join(', ')}`);
|
|
792
|
+
}
|
|
793
|
+
|
|
794
|
+
// run-d96317409da9: the doc stated the sub-gate alone, the ledger's
|
|
795
|
+
// own graph_receipt dropped `upscale_route`, the handoff never
|
|
796
|
+
// composed, and the film rendered the plain 1344×768 pass). The
|
|
797
|
+
// latent-upscale route is a SUB-GATE: its one consumer (the
|
|
798
|
+
// MinimaxH3LatentUpscaler3DRefineHandoff mount, actions.ts
|
|
799
|
+
// upscaleOn) reads it only behind the second-pass master, so a
|
|
800
|
+
// stated latent_2x beside an absent or false master composes into
|
|
801
|
+
// NO node — the inert-knob admission the misconfiguration law
|
|
802
|
+
// bans. Self-contained judge (two walked keys, zero engine truth),
|
|
803
|
+
// so it rides the walk beside the t4r and film-only gates; the
|
|
804
|
+
// upscale BAG's engine-side referent (the chain store) stays at the
|
|
805
|
+
|
|
806
|
+
// gate is the SAME shape on every lane — a t4r doc that states the
|
|
807
|
+
// route without its master is refused here exactly like an open
|
|
808
|
+
// or film doc, because the t4r arm mounts the same handoff.
|
|
809
|
+
if (explicit.has('upscale_route') && out.upscale_route === 'latent_2x' && out.second_pass_enabled !== true) {
|
|
810
|
+
throw new Error(`h3_window(${variant}): upscale_route 'latent_2x' fires nothing without its master — the latent handoff `
|
|
811
|
+
+ `(MinimaxH3LatentUpscaler3DRefineHandoff) composes only behind second_pass_enabled=true; the sub-gate alone `
|
|
812
|
+
+ `rode the doc, armed no node, and rendered the plain pass (run-d96317409da9's burn). `
|
|
813
|
+
+ `Arm the master beside the route, or turn the route off`);
|
|
537
814
|
}
|
|
538
815
|
// THE STEPS-PIN STAMP (007-H3-LoRA-PLANE L3): whether the caller
|
|
539
816
|
// pinned steps is a fact only this walk owns (the raw keys —
|
|
@@ -545,6 +822,11 @@ export function schema(v) {
|
|
|
545
822
|
// __iteration/__overlap precedent) — faces project the carrier's
|
|
546
823
|
// declared knobs only, so no served surface changes.
|
|
547
824
|
out.__steps_pinned = explicit.has('steps');
|
|
825
|
+
// THE SHIFT-PIN STAMP (SOTA limb 2, the __steps_pinned heir):
|
|
826
|
+
// whether the caller pinned shift_video is a fact only this walk
|
|
827
|
+
// owns — the married shift (the distill row's own grid) applies
|
|
828
|
+
// only to the UNSTATED doc; an explicit shift is the user's word.
|
|
829
|
+
out.__shift_pinned = explicit.has('shift_video');
|
|
548
830
|
return out;
|
|
549
831
|
}
|
|
550
832
|
// THE TOOL-FACE EXPORTS: the carrier (paramSchema — the same object
|
package/lib/swap.d.ts
ADDED
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { GraphBuilder } from '@melite/comfyui-card-kit/graph';
|
|
2
|
+
import type { H3Facts } from './actions.js';
|
|
3
|
+
/** The swap renderer: validates the bound entry, then composes the
|
|
4
|
+
* masked-edit chain per the reference map above. The film path
|
|
5
|
+
* never reaches here (the card branches ONLY on a non-empty replace
|
|
6
|
+
* bag, and refuses a bag under an armed reshoot — one door per doc).
|
|
7
|
+
* @param entry the replace mod's single bound entry
|
|
8
|
+
* @param p the walked doc params (the lora mod bag + SLA/shift knobs —
|
|
9
|
+
* the family plane this swap renders under)
|
|
10
|
+
* @param facts the family's lane facts (unet off the DECL row)
|
|
11
|
+
* @param g the run's graph builder
|
|
12
|
+
* @param runId the run tree's id (the assemble filename rides it) */
|
|
13
|
+
export declare function renderH3Swap(entry: Record<string, unknown>, p: Record<string, unknown>, facts: H3Facts, g: GraphBuilder, runId: string): void;
|
|
14
|
+
//# sourceMappingURL=swap.d.ts.map
|