@melite/models-h3 0.1.4-alpha → 0.2.0-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 +39 -0
- package/lib/actions.d.ts +91 -17
- package/lib/actions.js +1472 -187
- package/lib/chainEdit.d.ts +187 -0
- package/lib/chainEdit.js +330 -0
- package/lib/chainUpscale.d.ts +25 -0
- package/lib/chainUpscale.js +134 -0
- package/lib/extend.d.ts +17 -0
- package/lib/extend.js +174 -0
- package/lib/filmMix.d.ts +24 -10
- package/lib/filmMix.js +30 -14
- package/lib/index.d.ts +14 -1
- package/lib/index.js +296 -186
- package/lib/mods/loras.d.ts +19 -88
- package/lib/mods/loras.js +38 -9
- package/lib/refine.d.ts +123 -0
- package/lib/refine.js +301 -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 +352 -0
- package/lib/schema.d.ts +92 -13
- package/lib/schema.js +355 -45
- package/lib/swap.d.ts +14 -0
- package/lib/swap.js +95 -0
- package/lib/timelineContract.d.ts +164 -1
- package/lib/timelineContract.js +220 -4
- package/lib/windowSpec.d.ts +23 -0
- package/lib/windowSpec.js +49 -0
- package/package.json +9 -8
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, T4_ONLY_KEYS, 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,7 @@ 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
|
-
const T4_ONLY_KEYS = [
|
|
30
|
-
'sharpen_switch', 'sharpen_method', 'sharpen_strength', 'sharpen_radius',
|
|
31
|
-
'sharpen_threshold', 'sharpen_iterations', 'interp_switch',
|
|
32
|
-
'interp_multiplier', 'interp_model', 'sr_switch', 'sr_model', 'sr_resolution',
|
|
33
|
-
];
|
|
28
|
+
export const JSON_ARRAY_PARAMS = ['calls', 'audio_clips', 'keyframes'];
|
|
34
29
|
// ── the params schema — H3TimelineCard mirrored 1:1 ─────────────────────────
|
|
35
30
|
// the declared field order and defaults. Bare (defaultless) keys are the
|
|
36
31
|
// ABSENT / required surface (prompt required=True; image
|
|
@@ -45,8 +40,17 @@ const T4_ONLY_KEYS = [
|
|
|
45
40
|
// omitted key back to null so the body resolves the family's literal
|
|
46
41
|
// (t4 INT 8 / t4r 8.0 — the served structural values).
|
|
47
42
|
export const paramSchema = z.object({
|
|
48
|
-
|
|
49
|
-
|
|
43
|
+
|
|
44
|
+
// for the full model, remove that") — the film-level prompt field
|
|
45
|
+
// is GONE: the calls own the prompts (the single-call lift composes
|
|
46
|
+
// p.prompt from the call's text, card.ts; the merged film composes
|
|
47
|
+
// one prompt from N windows, actions.ts). A textless call refuses
|
|
48
|
+
// at compose — this field never substituted for one by its own
|
|
49
|
+
// doc; it was dead weight on the global recipe's face.
|
|
50
|
+
|
|
51
|
+
// JUST ARBITRARY FRAMES WHENEVER") — `image` is the frame-0 PIN
|
|
52
|
+
// shorthand, never a first-frame physics; the setup is the timeline's keyframes lane.
|
|
53
|
+
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
54
|
// THE INPUT SURFACE (the H3 architecture truth — two DIFFERENT
|
|
51
55
|
// mechanics, the FL2VA latent anchors vs the Ref2VA conditioning
|
|
52
56
|
// bus): first_frame/last_frame are PIXEL anchors (bundle inputs
|
|
@@ -59,11 +63,78 @@ export const paramSchema = z.object({
|
|
|
59
63
|
// `expected array length <= 8`), never rides silent. The legacy
|
|
60
64
|
// `refs` stanza bag keeps its compose-side wireList readers; the
|
|
61
65
|
// declared fields are the primary surface.
|
|
62
|
-
|
|
66
|
+
|
|
67
|
+
// SETUP, THERE IS NO FIRST FRAME NOR LAST FRAME, JUST ARBITRARY
|
|
68
|
+
// FRAMES WHENEVER"): last_frame is a HIDDEN alias — a validation
|
|
69
|
+
// key for old drafts and the FL2VA translation, never a face
|
|
70
|
+
// (extra.hidden keeps it out of BOTH projections; params-emit.ts).
|
|
71
|
+
// No wtype: a never-rendered field's wtype is dead surface (the
|
|
72
|
+
// card-wtype-judge's law). The setup is the timeline's keyframes lane.
|
|
73
|
+
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." })),
|
|
74
|
+
|
|
75
|
+
// "WE DO NOT DO FIRST FRAME LAST FRAME, WE DO ANY FRAME ANY TIME";
|
|
76
|
+
|
|
77
|
+
// the param face, never the engine).
|
|
78
|
+
// The engine lane was real since slice 2 (actions.ts applyKeyframeCompose
|
|
79
|
+
// reads p.keyframes; DECL.studio.writes lists it) but NO face declared
|
|
80
|
+
// it — so the agent saw only image/last_frame and reasoned in the
|
|
81
|
+
// retired first/last physics for nine minutes (session 384a13cd).
|
|
82
|
+
|
|
83
|
+
// (audit 013, the keyframes-row death): the lane IS the frame setup
|
|
84
|
+
// and rides the timeline bar's keyframes lane — the studio doc's own
|
|
85
|
+
// keyframes array, through the studio write door into this walk.
|
|
86
|
+
// image is the frame-0 shorthand and last_frame is a hidden
|
|
87
|
+
// translation alias. NOTE: the pin array is deliberately NOT a
|
|
88
|
+
// carrier knob (the calls precedent, schema.ts:376-382 — the agent
|
|
89
|
+
// plane owns calls in the tool face; the pin lane is owned by the
|
|
90
|
+
// doc plane the same way): schema() below keeps judging the array
|
|
91
|
+
// + row shape and the compose gate keeps the rider admission, so
|
|
92
|
+
// old drafts still walk and pins still compose — no face declares
|
|
93
|
+
// the row. Placement is the compose gate's (schema() below + the
|
|
94
|
+
// build door): film-absolute frame, inside a window, image names
|
|
95
|
+
// media.
|
|
63
96
|
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
97
|
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." })),
|
|
98
|
+
|
|
99
|
+
// index-paired with ref_videos — entry i slices guide i through
|
|
100
|
+
// the engine's own Video Slice node BEFORE GetVideoComponents
|
|
101
|
+
// conditions on it (thread the motion guide to the span that
|
|
102
|
+
// matters; a whole 3-minute clip as a guide wastes the window).
|
|
103
|
+
// start_time/duration are SECONDS; duration 0 with start_time 0
|
|
104
|
+
// (or an absent entry) = the whole clip, no slice node built.
|
|
105
|
+
// strict_duration rides false: a duration past the clip's end
|
|
106
|
+
// clamps at the engine, never refuses the film. The trims are
|
|
107
|
+
// stage params, so the run body records them verbatim.
|
|
108
|
+
ref_video_trims: z.array(z.object({
|
|
109
|
+
start_time: z.number().min(0).default(0).description('Start (s)'),
|
|
110
|
+
duration: z.number().min(0).default(0).description('Duration (s)'),
|
|
111
|
+
})).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
112
|
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
113
|
|
|
114
|
+
// mods. The pack injects them as reference tokens through ALL
|
|
115
|
+
// DiT blocks on the conditioning side: no bundle-bus slot is
|
|
116
|
+
// spent, so a mod does NOT fire the refs-imply-r2v law (a
|
|
117
|
+
// mod-only film stays open).
|
|
118
|
+
|
|
119
|
+
// media kind — stills, videos, audio — and the system bakes the
|
|
120
|
+
// pack (the Create H3 RefMod node composes the conversion; audio
|
|
121
|
+
// rides its own extractor). media 'mod' seats the mod family's
|
|
122
|
+
// OWN upload face with NO accept filter (any media boards);
|
|
123
|
+
// pre-baked .safetensors stems under models/refmods/ stay legal
|
|
124
|
+
// REUSE currency through the loader.
|
|
125
|
+
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." })),
|
|
126
|
+
|
|
127
|
+
// §5/§7.2 — the engine executed identity 500 / pool 16×16 /
|
|
128
|
+
// Compressed Reference / save-every-run as SILENT defaults while
|
|
129
|
+
// the compose stated none of them; the dials did not exist on this
|
|
130
|
+
// lane). Declared with today's values as the defaults: zero
|
|
131
|
+
// behavior change, the same bake — STATED (the value-arms wall's
|
|
132
|
+
// ARMs 13/14 judge the inputs present AND named at the node).
|
|
133
|
+
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." })),
|
|
134
|
+
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." })),
|
|
135
|
+
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." })),
|
|
136
|
+
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." })),
|
|
137
|
+
|
|
67
138
|
// input. We don't use that, that is a bug that is there." Film
|
|
68
139
|
// music rides the D-M-E lanes' MUSIC clips, pinned per window;
|
|
69
140
|
// reference timbre rides ref_audios. No film-wide bed, no cuts,
|
|
@@ -74,8 +145,8 @@ export const paramSchema = z.object({
|
|
|
74
145
|
// dialogue, shallower when the generated voice should hold.
|
|
75
146
|
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)." })),
|
|
76
147
|
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" })),
|
|
77
|
-
width: z.number().description("Width").min(448).max(1344).step(
|
|
78
|
-
height: z.number().description("Height").min(448).max(
|
|
148
|
+
width: z.number().description("Width").min(448).max(1344).step(32).default(1344).extra('extra', bag({ order: null, wtype: 'number', columns: 2, width: 1 })),
|
|
149
|
+
height: z.number().description("Height").min(448).max(1344).step(32).default(768).extra('extra', bag({ order: null, wtype: 'number', columns: 2, width: 1 })),
|
|
79
150
|
|
|
80
151
|
// (min 21, step 5) contradicted the card's own declared law — the
|
|
81
152
|
// 17k+5 frame grid (identity principle + tooltip: 56/90/124/362).
|
|
@@ -87,8 +158,28 @@ export const paramSchema = z.object({
|
|
|
87
158
|
// explicit 90 passes the walk. 56 (the declared
|
|
88
159
|
// default) is on-grid; the omitted-key path normalizes to null in
|
|
89
160
|
// schema() so the body computes the family's frame budget.
|
|
90
|
-
|
|
91
|
-
|
|
161
|
+
|
|
162
|
+
// ALWAYS LAYER B"): the timeline's calls own the window lengths —
|
|
163
|
+
// the single-call lift derives this row from the call's span at
|
|
164
|
+
// compose (a stated span outranks this default; a knob pin still
|
|
165
|
+
// outranks both — the user's own word). The row is HIDDEN on the
|
|
166
|
+
|
|
167
|
+
// EDITABLE as the span's rival — a doc-level Frames only owns
|
|
168
|
+
// span-less calls, which fresh cards never author); it STAYS
|
|
169
|
+
// SCHEMA-DECLARED (the compose still reads p.length, CALL_KNOB_KEYS
|
|
170
|
+
// pins length per call, and the studio carries it display-owned —
|
|
171
|
+
// the round-trip seat wall) — the Layer-A face never shows it.
|
|
172
|
+
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." })),
|
|
173
|
+
|
|
174
|
+
// clock, ONE owner: the doc's stated fps rides into every
|
|
175
|
+
// CreateVideo container so the clip's seconds equal the bar's
|
|
176
|
+
// seconds. Declared default DERIVES the one code home (audit 013
|
|
177
|
+
// cure 5, the fps ONE-HOME: DOC_FPS_DEFAULT in timelineContract —
|
|
178
|
+
// the walk fills it, the lawful declared kind, never a silent ??
|
|
179
|
+
// in the compose). The old hardcoded 24 in both render arms played
|
|
180
|
+
// a 90-frame window at 3.75s under a 5.6s bar.
|
|
181
|
+
fps: z.number().description("Playback fps").min(1).max(120).default(DOC_FPS_DEFAULT).extra('extra', bag({ hidden: true })),
|
|
182
|
+
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)" })),
|
|
92
183
|
|
|
93
184
|
// needs an on/off switch, it is very unclear if it is on or off"):
|
|
94
185
|
// one boolean heads the tab. Off (default) = the whole post chain
|
|
@@ -158,9 +249,35 @@ export const paramSchema = z.object({
|
|
|
158
249
|
// refine_lora picks the instrument; strength/steps default from
|
|
159
250
|
// THE ROW (no silent overrides); the pass rides the doc's own
|
|
160
251
|
// sampler/scheduler.
|
|
161
|
-
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: "
|
|
252
|
+
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." })),
|
|
162
253
|
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." })),
|
|
163
254
|
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." })),
|
|
255
|
+
// THE REFINE WINDOW (SOTA plan limb 1, H3_TIMELINE_RESERACH Stage
|
|
256
|
+
|
|
257
|
+
// is 0.35 — the research's refinement window [0.30, 0.35] keeps
|
|
258
|
+
// pass 1's structure and polishes texture, instead of the old
|
|
259
|
+
// default 1.0 regenerating the whole window (the TaoMate
|
|
260
|
+
// full-denoise mechanic). 1.0 stays STATEABLE for that mechanic;
|
|
261
|
+
// the ARM 36 band arm outlaws an out-of-window default.
|
|
262
|
+
// (0.05, 1]; 0 is a dead pass and refuses.
|
|
263
|
+
refine_denoise: z.number().description("Refine denoise").min(0.05).max(1).step(0.05).default(0.35).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." })),
|
|
264
|
+
|
|
265
|
+
// the learned-latent alternative to the SeedVR2 pixel route: the
|
|
266
|
+
// vendored xmarre pack's MinimaxH3LatentUpscaler3DRefineHandoff
|
|
267
|
+
// rides IN-BAND on the pass-1 joint AV latent (upscale + the
|
|
268
|
+
// low-sigma refinement inside the 3D-conv kernel, audio preserved
|
|
269
|
+
// under lock_audio). The sub-gate: route latents halve the r2v head
|
|
270
|
+
// (1344×768 → 672×384) so pass 1 composes the quarter the kernel
|
|
271
|
+
// was distilled on; the rider (when set) mounts in-band on the
|
|
272
|
+
// upscaled latent. Route off (default) = the graph is byte-stable
|
|
273
|
+
// with the pre-route estate (ARM 41).
|
|
274
|
+
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 second pass works at full size) or latent_2x (pass 1 renders at half size, the learned upscaler doubles the latent in-band before the second pass)." })),
|
|
275
|
+
// CLOSED FILE SURFACE (the operator's dropdown law — the sr_model
|
|
276
|
+
// precedent above): the ONE file the estate runs — the on-disk LBH
|
|
277
|
+
// v1 3D-conv bf16 checkpoint (the h3 latent weight, verified
|
|
278
|
+
// sha256 4f57821f). Single-member until the vendor ships a second
|
|
279
|
+
// weight; the union owns the dropdown AND the membership refusal.
|
|
280
|
+
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." })),
|
|
164
281
|
// ── THE ATTENTION BACKEND (roadmap item 3; the h3_attention
|
|
165
282
|
// "sage/sol" folklore was FICTION — no such knob, and the engine
|
|
166
283
|
// enumerates only 'pytorch attention' on ModelAttentionBackend;
|
|
@@ -169,7 +286,7 @@ export const paramSchema = z.object({
|
|
|
169
286
|
// estate-proven literal (plaguekind's template value, silicon
|
|
170
287
|
// receipts on the t4 arm); 'pytorch attention' is the engine's
|
|
171
288
|
// own enumeration. Values the engine refuses are NOT offered.
|
|
172
|
-
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
|
|
289
|
+
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." })),
|
|
173
290
|
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." })),
|
|
174
291
|
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)." })),
|
|
175
292
|
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." })),
|
|
@@ -182,11 +299,33 @@ export const paramSchema = z.object({
|
|
|
182
299
|
// schema door, never as a ComfyUI 400). Gated behind sr_switch like
|
|
183
300
|
// every other post leaf.
|
|
184
301
|
sr_model: vocabulary(["seedvr2_ema_3b_fp16.safetensors", "seedvr2_ema_3b_fp8_e4m3fn.safetensors"]).description("Super-Res model").default("seedvr2_ema_3b_fp16.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/): fp16 3B default, fp8_e4m3fn 3B leaner." })),
|
|
185
|
-
// the R2V COMBO size mode — the
|
|
186
|
-
|
|
187
|
-
//
|
|
188
|
-
//
|
|
189
|
-
|
|
302
|
+
// the R2V COMBO size mode — the engine's own vocabulary is the
|
|
303
|
+
|
|
304
|
+
// ref_image_size "704x1280" against comfy_extras.nodes_minimax_h3
|
|
305
|
+
// MiniMaxH3ReferenceToVideo answers value_not_in_list —
|
|
306
|
+
// "'704x1280' not in ['match', 'max']"). The WxH patch-arm that
|
|
307
|
+
// once rode real runs is a phantom at the current core: it
|
|
308
|
+
// composed estate-side and died at the engine's queue validation.
|
|
309
|
+
// The knob narrows to the one literal both truths admit.
|
|
310
|
+
|
|
311
|
+
// spec's diagnostic matrix seats the aspect-distortion failure
|
|
312
|
+
// mode on "Setting reference image scale to max" — the max edge
|
|
313
|
+
// warps the reference's aspect into the output frame. max, a WxH
|
|
314
|
+
// literal, and every other value refuse LOUD at the schema gate,
|
|
315
|
+
// ahead of the engine — never as a ComfyUI 400.
|
|
316
|
+
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." })),
|
|
317
|
+
// ── THE RE-SHOOT GROUP IS RETIRED FROM THE FLAT SURFACE (the
|
|
318
|
+
// fourth-mod-bag unification, §8 of the multiwindow audit,
|
|
319
|
+
|
|
320
|
+
// knobs outside the admission plane while replace/repair/extend
|
|
321
|
+
// ride card-declared mod bags — the disjointedness the operator
|
|
322
|
+
// named ("it's disjointed to how we usually handle using video
|
|
323
|
+
// inputs"). The camera chain's knobs now live on the card's
|
|
324
|
+
// RESHOOT_MOD kind (card.ts, served on features.modifiers like
|
|
325
|
+
// its three siblings); the emission predicates read the bag
|
|
326
|
+
// (reshoot.ts reshootArmed); the studio panel authors it through
|
|
327
|
+
// the mods surface. The LICENSE FRAME and the chain's own law are
|
|
328
|
+
// narrated at their one remaining home: reshoot.ts.
|
|
190
329
|
|
|
191
330
|
// one truth, one owner. shift_video is a NUMBER, default 8, served
|
|
192
331
|
// and walked identically. The old z.const(null) arm — the
|
|
@@ -209,22 +348,37 @@ export const paramSchema = z.object({
|
|
|
209
348
|
// visible_when behind it. Default true = today's behavior for
|
|
210
349
|
// every existing doc (absent = on at compose).
|
|
211
350
|
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." })),
|
|
212
|
-
|
|
213
|
-
|
|
351
|
+
|
|
352
|
+
|
|
353
|
+
// 0.9 → 0.85. The research band is 0.75–0.85 (H3_TIMELINE_RESERACH
|
|
354
|
+
// §3 summary matrix) and the kernel's own tooltip states 0.85 is
|
|
355
|
+
// "the shipped default and what the SLA turbo LoRA was distilled
|
|
356
|
+
// against" (object_info_prod H3SLAAttention) — the shipped 0.9 sat
|
|
357
|
+
// OUTSIDE both (ROADMAP's old "no cure owed" row conflated
|
|
358
|
+
// knobs-seated with values-matching). 0.90 stays a STATEABLE speed
|
|
359
|
+
// preset; the band arm ARM 35 reds a default nudged past either
|
|
360
|
+
// edge without the P3 arena's receipt.
|
|
361
|
+
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." })),
|
|
362
|
+
// BLOCK SIZE — audited MATCH (the P0 audit's table verdict; no
|
|
363
|
+
// retune): "32" IS the kernel's own default and its tooltip's
|
|
364
|
+
// quality-best point ("Coming down to 32 has increased the quality
|
|
365
|
+
// even further for marginal slowdown"). The old tooltip named only
|
|
366
|
+
// 64/128 — a default its own copy never mentioned. Stated in full:
|
|
367
|
+
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." })),
|
|
214
368
|
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." })),
|
|
215
|
-
sla_dense_last_steps: z.number().description("SLA dense last steps").min(0).max(10).step(1).default(
|
|
369
|
+
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." })),
|
|
216
370
|
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." })),
|
|
217
371
|
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' })),
|
|
218
372
|
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." })),
|
|
219
373
|
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." })),
|
|
220
|
-
sla_stabilize_motion: z.boolean().description("SLA stabilize motion").extra('extra', bag({ order: null, group: "sla", visible_when: "sla_enabled=true", tooltip: "
|
|
374
|
+
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." })),
|
|
221
375
|
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." })),
|
|
222
376
|
// ── the sharpen leaves (compose: only EXPLICITLY-set leaves patch
|
|
223
377
|
// ImageSharpenKJ's grouped dict — bare emission defaults do NOT
|
|
224
378
|
// change a run that never sets them). VISIBILITY rides the
|
|
225
379
|
// declaration's own visible_when grammar (&-ANDed guards, |-SET
|
|
226
380
|
// values) — no hand-rolled predicates anywhere.
|
|
227
|
-
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' })),
|
|
381
|
+
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' })),
|
|
228
382
|
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." })),
|
|
229
383
|
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." })),
|
|
230
384
|
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." })),
|
|
@@ -247,14 +401,26 @@ export const paramSchema = z.object({
|
|
|
247
401
|
// default-less blank row on the form is a lie.
|
|
248
402
|
k: z.number().description("Window index (film vocabulary)").step(1).extra('extra', bag({ hidden: true })),
|
|
249
403
|
noise_seed: z.number().description("Per-window noise seed").step(1).extra('extra', bag({ hidden: true })),
|
|
250
|
-
|
|
404
|
+
|
|
405
|
+
// STALE ANYWHERE"): this row is INTERNAL (the declared surface's
|
|
406
|
+
// own words) and derives from the window's generation length at
|
|
407
|
+
// compose, every compose. The old .default(10) seeded every
|
|
408
|
+
// unstated doc with a 10-second clock that outlived every span
|
|
409
|
+
// drag — the operator's burn: a 5-second span on the bar rendered
|
|
410
|
+
// 10 seconds of mush. No default, no user face: hidden; the
|
|
411
|
+
// compose owns the derivation (render loop restates it
|
|
412
|
+
// unconditionally from the actual window length).
|
|
413
|
+
fps_seconds: z.number().description("Clip seconds (fps rail — internal, derived from the window length at compose)").min(1).max(60).extra('extra', bag({ hidden: true })),
|
|
251
414
|
// THE LEGACY ALIASES (renderer-era spellings of the mod switches)
|
|
252
415
|
// — gate-admitted for old drafts, never user surface: the MODS
|
|
253
416
|
|
|
254
417
|
interp_switch: z.boolean().description("Interpolate switch (legacy alias)").extra('extra', bag({ hidden: true })),
|
|
255
418
|
sharpen_switch: z.boolean().description("Sharpen switch (legacy alias)").extra('extra', bag({ hidden: true })),
|
|
256
419
|
sla_switch: z.boolean().description("SLA switch (legacy alias)").extra('extra', bag({ hidden: true })),
|
|
257
|
-
|
|
420
|
+
// (no wtype: hidden fields never render — the kind mapping rides
|
|
421
|
+
// flowKinds.legacyAliases, pinned in input-surface.spec.ts; a wtype
|
|
422
|
+
// here is dead surface the estate wtype judge refuses.)
|
|
423
|
+
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
424
|
});
|
|
259
425
|
/** Schemastery objects are lenient (unknown/missing keys ride); the
|
|
260
426
|
* family-admission laws are the renderer's own validators, ported:
|
|
@@ -272,6 +438,26 @@ export const paramSchema = z.object({
|
|
|
272
438
|
// fills natively. (A schemastery field transform would classify the
|
|
273
439
|
// served knob as type 'json' — the honest 'boolean' taxonomy wins,
|
|
274
440
|
// so the law lives here, shared by schema() and the compose gate.)
|
|
441
|
+
|
|
442
|
+
|
|
443
|
+
|
|
444
|
+
|
|
445
|
+
|
|
446
|
+
|
|
447
|
+
export const REFINE_PLANE_KEYS = [
|
|
448
|
+
'sched_name', 'shift_video', 'shift_audio',
|
|
449
|
+
'sla_enabled', 'sla_sparsity', 'sla_block_size', 'sla_min_seq_len',
|
|
450
|
+
'sla_dense_last_steps', 'sla_protect_audio', 'sla_dense_steps',
|
|
451
|
+
'sla_dense_backend', 'sla_disable_fp16_accum', 'sla_stabilize_motion',
|
|
452
|
+
'sla_reference_protection',
|
|
453
|
+
];
|
|
454
|
+
export const refinePlaneSchema = z.object(Object.fromEntries(REFINE_PLANE_KEYS.map((k) => {
|
|
455
|
+
const knob = (paramSchema.dict ?? {})[k];
|
|
456
|
+
if (knob === undefined) {
|
|
457
|
+
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)`);
|
|
458
|
+
}
|
|
459
|
+
return [k, knob];
|
|
460
|
+
})));
|
|
275
461
|
export const coerceWireBoolean = (raw) => {
|
|
276
462
|
if (typeof raw.interpolate_enabled === 'string') {
|
|
277
463
|
|
|
@@ -285,6 +471,28 @@ export const coerceWireBoolean = (raw) => {
|
|
|
285
471
|
}
|
|
286
472
|
return raw;
|
|
287
473
|
};
|
|
474
|
+
/** THE PIN ROW SHAPE (one law, two seats): the doc walk and the compose
|
|
475
|
+
* gate both run this BEFORE any placement math — a row must carry a
|
|
476
|
+
* whole film-absolute frame and a non-empty image ref. Exported so the
|
|
477
|
+
* walk's refusal and the build door's are the same literal (the
|
|
478
|
+
* gate-and-walk wall pins them); placement and media existence stay
|
|
479
|
+
* the compose gate's, which owns the doc's calls/windows. */
|
|
480
|
+
export function assertKeyframeRowShape(rows) {
|
|
481
|
+
for (let i = 0; i < rows.length; i++) {
|
|
482
|
+
const row = (rows[i] ?? {});
|
|
483
|
+
const f = row.frame;
|
|
484
|
+
if (typeof f !== 'number' || !Number.isFinite(f)) {
|
|
485
|
+
throw new Error(`keyframes[${i}]: frame is required (a finite film-absolute frame — a row without a frame is not a pin)`);
|
|
486
|
+
}
|
|
487
|
+
if (!Number.isInteger(f)) {
|
|
488
|
+
throw new Error(`keyframes[${i}]: frame ${f} is not a whole frame — film frames are integers (round the pin)`);
|
|
489
|
+
}
|
|
490
|
+
const image = typeof row.image === 'string' ? row.image.trim() : '';
|
|
491
|
+
if (image === '') {
|
|
492
|
+
throw new Error(`keyframes[${i}]: image is required (the pin channel is image pins — a row without a source anchors nothing)`);
|
|
493
|
+
}
|
|
494
|
+
}
|
|
495
|
+
}
|
|
288
496
|
export function schema(v) {
|
|
289
497
|
const raw = (v ?? {});
|
|
290
498
|
if (raw.calls !== undefined && !Array.isArray(raw.calls)) {
|
|
@@ -293,6 +501,16 @@ export function schema(v) {
|
|
|
293
501
|
if (raw.audio_clips !== undefined && !Array.isArray(raw.audio_clips)) {
|
|
294
502
|
throw new Error('h3-timeline: audio_clips must be an array of clip rows');
|
|
295
503
|
}
|
|
504
|
+
if (raw.keyframes !== undefined) {
|
|
505
|
+
if (!Array.isArray(raw.keyframes)) {
|
|
506
|
+
throw new Error('h3-timeline: keyframes must be an array of pin rows ({ frame, image }) — any frame, any time');
|
|
507
|
+
}
|
|
508
|
+
// The row shape is judged here FIRST (named vocabulary), so the
|
|
509
|
+
// carrier's strict row typing never answers a bad row with
|
|
510
|
+
// schemastery's generic parse text (the build door runs the same
|
|
511
|
+
// function before its placement math).
|
|
512
|
+
assertKeyframeRowShape(raw.keyframes);
|
|
513
|
+
}
|
|
296
514
|
// length null SURVIVES this walk on purpose (the walk-shadow fix:
|
|
297
515
|
// multi-call docs keep null — per-window spans compute at compose).
|
|
298
516
|
|
|
@@ -302,7 +520,15 @@ export function schema(v) {
|
|
|
302
520
|
// run-9953f652410d-d365af74, `$.ref_images expected array but
|
|
303
521
|
// got [object Object]` ×4 and `calls: ""`).
|
|
304
522
|
const out = paramSchema(coerceWireArrays(paramSchema, coerceWireBoolean(raw)));
|
|
305
|
-
|
|
523
|
+
|
|
524
|
+
// break): `variant` on the wire carries TWO vocabularies — the
|
|
525
|
+
// model axis ('timeline', the stamp the add door seeds onto every
|
|
526
|
+
// fresh stage) and the window family (t4r/t4_open/t4_chain). A
|
|
527
|
+
// stated FAMILY rides; an axis string is not a family claim — the
|
|
528
|
+
// doc's seats derive the family, model metadata never picks a
|
|
529
|
+
// render lane, and 'unknown window family' never fires on it.
|
|
530
|
+
let variant = typeof raw.variant === 'string' && FAMILIES.includes(raw.variant)
|
|
531
|
+
? raw.variant : undefined;
|
|
306
532
|
// variant DERIVATION (opener_family/chain_family): the studio calls shape carries no variant; the card derives it.
|
|
307
533
|
// An image-anchored opener rides t4r; a text-only single call is t4_open; multiple calls chain (t4_chain).
|
|
308
534
|
|
|
@@ -396,6 +622,31 @@ export function schema(v) {
|
|
|
396
622
|
start: c.start_frame,
|
|
397
623
|
end: c.end_frame,
|
|
398
624
|
}, `calls[${i}]`, i > 0 ? transitionOverlap(transition) : 0);
|
|
625
|
+
|
|
626
|
+
// a guide seat must NAME MEDIA — a path, URL, data: URI, or
|
|
627
|
+
// $spell. The UI's reference picker once wrote the SOURCE
|
|
628
|
+
// STAGE's name ("image-gen") into the anchor seat and the run
|
|
629
|
+
// rendered text-only (the compose read the guide, the engine
|
|
630
|
+
// had no such file). A bare word with no slash, dot, or scheme
|
|
631
|
+
// is a label, never media — refuse here, naming the value and
|
|
632
|
+
// the cure, at admission (zero GPU) instead of the engine door.
|
|
633
|
+
// (the predicate lives in timelineContract — the keyframe pin
|
|
634
|
+
// gate judges the same law at its own door)
|
|
635
|
+
for (const gkey of ['image', 'ref_image', 'image_name']) {
|
|
636
|
+
const gv = c[gkey];
|
|
637
|
+
if (typeof gv === 'string' && gv.trim() !== '' && !isMediaRef(gv.trim())) {
|
|
638
|
+
throw new Error(`calls[${i}].${gkey}: "${gv.trim()}" names no media — a stage/card name is not an image ` +
|
|
639
|
+
`(pick the artifact: a file path, URL, or $spell rides; a label never does)`);
|
|
640
|
+
}
|
|
641
|
+
}
|
|
642
|
+
for (const garr of ['ref_images']) {
|
|
643
|
+
for (const entry of wireList(c[garr])) {
|
|
644
|
+
if (!isMediaRef(entry.trim())) {
|
|
645
|
+
throw new Error(`calls[${i}].${garr}: "${entry.trim()}" names no media — a stage/card name is not an image ` +
|
|
646
|
+
`(pick the artifact: a file path, URL, or $spell rides; a label never does)`);
|
|
647
|
+
}
|
|
648
|
+
}
|
|
649
|
+
}
|
|
399
650
|
}
|
|
400
651
|
// (the shot-law loop above guarantees every row is a shaped
|
|
401
652
|
// object with pinned int spans — no gap-arms needed here)
|
|
@@ -403,23 +654,41 @@ export function schema(v) {
|
|
|
403
654
|
// whole (one-window) graph t4r; a MULTI-call doc is a film — its
|
|
404
655
|
// variant is t4_chain and each window derives its own family in
|
|
405
656
|
// the merged renderer (a guide call renders as its own t4r window)
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
657
|
+
|
|
658
|
+
// compose reads FOUR guide spellings (call.image ?? call.ref_image
|
|
659
|
+
// ?? call.image_name — actions.ts:268/:1635); the derivation must
|
|
660
|
+
// know every spelling the compose knows, or a guide silently
|
|
661
|
+
// derives a text-only window (run-899a8448: the UI wrote `image`,
|
|
662
|
+
// the derivation checked the other three, variant fell t4_open and
|
|
663
|
+
// the reference never became a node).
|
|
664
|
+
// ONE spelling now — deriveWindowFamily above (the
|
|
665
|
+
|
|
666
|
+
// SYNTHESIZED calls (the fresh-card arm above), so the
|
|
667
|
+
// fresh-press shape derives exactly as it composes; the guide
|
|
668
|
+
// union, the pin channel, and the declared input surface live
|
|
669
|
+
// in the export, never re-spelled here.
|
|
670
|
+
variant = deriveWindowFamily({ ...raw, calls });
|
|
417
671
|
out.variant = variant;
|
|
418
672
|
}
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
673
|
+
|
|
674
|
+
// DEAD by totality and deleted: variant is either a STATED family
|
|
675
|
+
// (only ever assigned when it is a FAMILIES member) or a DERIVED
|
|
676
|
+
// one (deriveWindowFamily returns exactly the three members), so
|
|
677
|
+
// `includes(variant)` could never be false — the guard was
|
|
678
|
+
// uncoverable code the per-file gate kept paying for.
|
|
679
|
+
|
|
680
|
+
// is UNSTATED at every arrival door — the switch verbs' delete
|
|
681
|
+
// mark (modelSwitchPatch null verdicts, mergeSwitchFrame,
|
|
682
|
+
// seedUser), the drill null-set precedent, the 21 lane's
|
|
683
|
+
// journey-PASSed null→200. An arrival door that reads explicit
|
|
684
|
+
// null as stated re-opens ERROR g's gap (the gate promises []
|
|
685
|
+
// while the walk refuses 400). So `explicit` is stated-and-
|
|
686
|
+
// valued: a null-carried key never counts as stated — at the
|
|
687
|
+
// dead-key gates AND the same `bad` reader's film-only sibling
|
|
688
|
+
// below. (The merge already drops nulls; the schema never sees
|
|
689
|
+
// a null it must type-check — unstated keys ride their honest
|
|
690
|
+
// defaults.)
|
|
691
|
+
const explicit = new Set(Object.keys(raw).filter((k) => raw[k] !== null));
|
|
423
692
|
|
|
424
693
|
// default(8) is THE owner. The old nulling — "an omitted key
|
|
425
694
|
// normalizes back to null so the body resolves the family's
|
|
@@ -464,8 +733,44 @@ export function schema(v) {
|
|
|
464
733
|
const bad = (keys) => keys.filter((kk) => explicit.has(kk)).sort();
|
|
465
734
|
if (variant === 't4r') {
|
|
466
735
|
const b = bad(T4_ONLY_KEYS);
|
|
736
|
+
if (b.length) {
|
|
737
|
+
|
|
738
|
+
// §CURES-OWED 6 / timeline-calls-burn §CURES-OWED 7) THE
|
|
739
|
+
// HONEST-VOICE RIDER, per the cured unknownQuantVoice precedent
|
|
740
|
+
// (web-kit/contracts laneRelations: a refusal names the SEAM
|
|
741
|
+
// and the repair, not just the fact). The spine
|
|
742
|
+
// `h3_window(t4r): unsanctioned inject keys: <keys>` stays
|
|
743
|
+
// byte-identical — the B5 admission clause and the pick verdict
|
|
744
|
+
// quote it verbatim, the walls grep it — the tail only extends
|
|
745
|
+
// it. The writer: the keys were staged lawfully on the doc's
|
|
746
|
+
// Layer-A plane (the serializer's emit dialects or a recipe
|
|
747
|
+
// stamp) and the guide seats re-derived t4r under them. The
|
|
748
|
+
// repair is one gesture: a stating commit through the studio
|
|
749
|
+
// re-derives the family and unstamps the residue in the same
|
|
750
|
+
// save (the B2 flip writer), or the named keys null-delete at
|
|
751
|
+
// the bench patch door. The film-only sibling below keeps its
|
|
752
|
+
// own voice — its writer is a stale duck row, not this emit
|
|
753
|
+
// (follow-up, not this scope).
|
|
754
|
+
throw new Error(`h3_window(t4r): unsanctioned inject keys: ${b.join(', ')}`
|
|
755
|
+
+ ` — the studio's Layer-A emit carries lane-dead post keys (the family re-derived t4r under a legal stamp);`
|
|
756
|
+
+ ` the repair is one gesture: restate the doc through the studio`
|
|
757
|
+
+ ` (the commit re-derives the family and unstamps the residue)`
|
|
758
|
+
+ ` or null the named keys at the patch door`);
|
|
759
|
+
}
|
|
760
|
+
}
|
|
761
|
+
// (B6, timeline-calls-burn §CURES-OWED 5 / ui-truth-gap #4's walk
|
|
762
|
+
// leg) THE FILM-ONLY GATE, the t4r gate's sibling: FILM_ONLY_KEYS
|
|
763
|
+
// are read in exactly one seat — computeFilmMix's manifest, inside
|
|
764
|
+
// the multi-window film tail (actions.ts) — so a single-window doc
|
|
765
|
+
// (t4r, t4_open) stating one composed it into NO node: the operator
|
|
766
|
+
// set a duck depth the mix desk never saw. The studio rail's omit
|
|
767
|
+
// law (RunRecipeEngine.tsx) judges the SAME contract set — one
|
|
768
|
+
// home, timelineContract.ts — so a row either door refuses is
|
|
769
|
+
// refused at both.
|
|
770
|
+
if (variant !== 't4_chain') {
|
|
771
|
+
const b = bad(FILM_ONLY_KEYS);
|
|
467
772
|
if (b.length)
|
|
468
|
-
throw new Error(`h3_window(
|
|
773
|
+
throw new Error(`h3_window(${variant}): film-only inject keys: ${b.join(', ')}`);
|
|
469
774
|
}
|
|
470
775
|
// THE STEPS-PIN STAMP (007-H3-LoRA-PLANE L3): whether the caller
|
|
471
776
|
// pinned steps is a fact only this walk owns (the raw keys —
|
|
@@ -477,6 +782,11 @@ export function schema(v) {
|
|
|
477
782
|
// __iteration/__overlap precedent) — faces project the carrier's
|
|
478
783
|
// declared knobs only, so no served surface changes.
|
|
479
784
|
out.__steps_pinned = explicit.has('steps');
|
|
785
|
+
// THE SHIFT-PIN STAMP (SOTA limb 2, the __steps_pinned heir):
|
|
786
|
+
// whether the caller pinned shift_video is a fact only this walk
|
|
787
|
+
// owns — the married shift (the distill row's own grid) applies
|
|
788
|
+
// only to the UNSTATED doc; an explicit shift is the user's word.
|
|
789
|
+
out.__shift_pinned = explicit.has('shift_video');
|
|
480
790
|
return out;
|
|
481
791
|
}
|
|
482
792
|
// 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
|