matlod commited on
Commit
6f7f406
·
verified ·
1 Parent(s): 64e13a0

ComfyUI workflows (stage 1 T2V on the clock, stage 2 de-rope with the clock), DyRoPE comparison, clock-map rules

Browse files
README.md CHANGED
@@ -122,13 +122,80 @@ All of the following are from one seed per prompt; treat them as observations, n
122
  - It **still costs more compute** on slowed stretches. It does not yet save compute anywhere; that is the next
123
  research step (variable compression in both directions, and in space for detail such as faces and hands).
124
 
125
- ## Using it
126
-
127
- - Trained and tested only with per-latent true-clock spans and `keep_bands = 2`, at LoRA strength 1.0.
128
- Untested with other clock implementations, including K = 0 true-clock nodes.
129
- - Text-to-video at full denoise is the main test. A de-rope (V2V partial denoise) test is in progress and
130
- will be added here.
131
- - Base model: MiniMax-H3 (FL2VA, pruned bf16 DiT). See `LICENSE-MiniMax-H3` for the base model's terms.
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
132
 
133
  `minimax_h3_variable_clock_runf_step2000_r16.safetensors` sha256
134
  `c01235bd0b7492856162b9965431007e9f9828e77454324d7f246546aeb1e652`
 
122
  - It **still costs more compute** on slowed stretches. It does not yet save compute anywhere; that is the next
123
  research step (variable compression in both directions, and in space for detail such as faces and hands).
124
 
125
+ ## ComfyUI workflows
126
+
127
+ The `workflows/` folder has three API-format workflows. Drag a `.api.json` file onto the ComfyUI canvas to
128
+ load it.
129
+
130
+ | file | what it does |
131
+ |---|---|
132
+ | `stage1_t2v_clock.api.json` | **Stage 1:** text-to-video directly on the variable clock (LoRA + H3 True Clock), then keeps the first copy of every real frame |
133
+ | `stage2_derope_clock.api.json` | **Stage 2:** the usual de-rope pass (H3 Time Smear → partial denoise → H3 Exact Recover), with the clock and the LoRA switched on |
134
+ | `source_generation.api.json` | stock H3 at normal speed; its output is the example input for stage 2 |
135
+
136
+ Both clock workflows save two videos: `*_kept` (the real-time result) and `*_all_frames` (everything generated).
137
+ `build_workflows.py` regenerates all three from the prompt and the clock map.
138
+
139
+ **What you need**
140
+
141
+ - ComfyUI with the core MiniMax-H3 nodes.
142
+ - **ComfyUI-MAINodes from the `h3-true-clock-fine-bands` branch** (commit `fbf7359`)
143
+ ([github.com/matlowai/ComfyUI-MAINodes/tree/h3-true-clock-fine-bands](https://github.com/matlowai/ComfyUI-MAINodes/tree/h3-true-clock-fine-bands)).
144
+ The branch adds one optional input to **H3 True Clock**: `keep_fine_bands`. Set it to **2** for this LoRA.
145
+ It keeps the two fastest temporal RoPE bands on the normal grid, which is how the LoRA was trained.
146
+ At 0, the default, the node behaves exactly as before.
147
+ - The LoRA in `models/loras/minimax_h3_variable_clock/`, and the H3 models named in the loaders. The
148
+ workflows use the int8 pruned DiT and the nvfp4 text encoder; swap in what you have.
149
+
150
+ **Clock maps.** The `hold_map` string is `{"holds": [...], "world_len": N}`, with one entry per real frame.
151
+ The LoRA was trained only on maps that line up with H3's latent grid:
152
+
153
+ - Pixel frames are packed in a (1, 4, 4, 4, 4) pattern per 17 frames.
154
+ - In each 4-frame latent, every real frame has the same hold: either 4 frames held once (normal), 2 frames
155
+ held twice (2x), or 1 frame held four times (4x).
156
+ - Each single-frame latent holds one real frame once.
157
+ - The holds must add up to the clip length: 17k + 5 frames, e.g. 124.
158
+
159
+ The maps in `clock_maps/` follow this rule. This snippet builds one from a per-latent speed list:
160
+
161
+ ```python
162
+ PATTERN = (1, 4, 4, 4, 4)
163
+ def clock_map(latents, speeds): # speeds: one of 4, 2, 1 per 4-frame latent (4 = normal)
164
+ holds, k = [], 0
165
+ for i in range(latents): # latents = 5k + 2, e.g. 37 for 124 frames
166
+ if PATTERN[i % 5] == 1:
167
+ holds.append(1)
168
+ else:
169
+ s = speeds[k]; k += 1
170
+ holds += [4 // s] * s
171
+ return {"holds": holds, "world_len": len(holds)}
172
+ ```
173
+
174
+ Untested: hold values other than 1/2/4, holds that straddle latents, clocks faster than normal, and strengths
175
+ other than 1.0.
176
+
177
+ ## How this compares to DyRoPE / H3 True Clock without a LoRA
178
+
179
+ - **The clock signal is the same.** MAINodes' H3 True Clock, DyRoPE and this LoRA all give each latent a RoPE
180
+ time span equal to the real time it covers, computed from the hold map. Hold maps carry over between them.
181
+ - **DyRoPE works around an untrained model.** The stock model never saw a stretched time grid. Feeding the
182
+ stretched grid to every block corrects the speed but adds seam flash and jitter. DyRoPE therefore applies it
183
+ to some blocks only, or fades it in or out over the denoise schedule, trading speed correction against
184
+ artifacts. It is inference-only, and only for re-denoising a time-smeared clip.
185
+ - **This LoRA trains the model to read the clock.** It was trained on real frames repeated inside latents, so
186
+ a 4x latent means "one real frame of motion" to it. Every block gets the clock at every step. The only split
187
+ left is by frequency (`keep_fine_bands = 2`): the two fastest temporal bands stay on the normal grid, so the
188
+ within-latent frame rhythm stays as trained. DyRoPE splits by block or by denoise step; this splits by RoPE band.
189
+ - **What that adds:** variable-speed **text-to-video from scratch (stage 1)**, and a stage 2 de-rope where small,
190
+ fast detail is meant to slow down with the clock instead of regenerating at normal speed.
191
+ - **What it does not change yet:** the compute cost. A 4x latent still costs a full latent for one real frame,
192
+ the same cost per kept frame as de-rope.
193
+
194
+ ## Notes
195
+
196
+ - The Musubi-side tests used per-latent true-clock spans and `keep_bands = 2`, at LoRA strength 1.0, on the
197
+ pruned bf16 DiT. The ComfyUI workflows were checked end to end on the int8 pruned DiT.
198
+ - Base model: MiniMax-H3 (FL2VA, pruned). See `LICENSE-MiniMax-H3` for the base model's terms.
199
 
200
  `minimax_h3_variable_clock_runf_step2000_r16.safetensors` sha256
201
  `c01235bd0b7492856162b9965431007e9f9828e77454324d7f246546aeb1e652`
workflows/build_workflows.py ADDED
@@ -0,0 +1,91 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ """Builds the ComfyUI API workflows for the H3 variable-clock LoRA (run from this folder).
2
+
3
+ source_generation.api.json stock H3 text-to-video at normal speed (the stage 2 input)
4
+ stage1_t2v_clock.api.json text-to-video on a variable clock: LoRA + H3 True Clock (keep_fine_bands 2)
5
+ stage2_derope_clock.api.json de-rope (time smear -> partial denoise -> exact recover) with the clock + LoRA
6
+
7
+ Needs ComfyUI with the core MiniMax-H3 nodes and ComfyUI-MAINodes with H3 True Clock's keep_fine_bands input.
8
+ """
9
+ import json
10
+ from pathlib import Path
11
+
12
+ HERE = Path(__file__).resolve().parent
13
+ PROMPT = (HERE.parent / "assets" / "punching_long_prompt.txt").read_text().strip()
14
+ CLOCK = json.loads((HERE.parent / "clock_maps" / "eval_option1_long124_hold_map.json").read_text())["hold_map_used"]
15
+ HOLD_MAP = json.dumps({"holds": CLOCK, "world_len": len(CLOCK)}) # MAINodes hold-map format
16
+ UNET = "minimax_h3/minimax_h3_fl2va_pruned_int8_convrot.safetensors"
17
+ CLIP = "minimax_h3/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors"
18
+ VAE = "minimax_h3/minimax_h3_video_vae_fp16.safetensors"
19
+ LORA = "minimax_h3_variable_clock/minimax_h3_variable_clock_runf_step2000_r16.safetensors"
20
+ W, H, LEN, SEED, STEPS = 1344, 768, 124, 20260923, 20
21
+
22
+
23
+ def base(lora):
24
+ g = {
25
+ "1": {"class_type": "UNETLoader", "inputs": {"unet_name": UNET, "weight_dtype": "default"}},
26
+ "2": {"class_type": "CLIPLoader", "inputs": {"clip_name": CLIP, "type": "minimax", "device": "default"}},
27
+ "3": {"class_type": "VAELoader", "inputs": {"vae_name": VAE}},
28
+ "10": {"class_type": "MiniMaxH3ImageToVideo", "inputs": {"clip": ["2", 0], "vae": ["3", 0], "prompt": PROMPT,
29
+ "width": W, "height": H, "length": LEN}},
30
+ "20": {"class_type": "KSamplerSelect", "inputs": {"sampler_name": "euler"}},
31
+ "21": {"class_type": "RandomNoise", "inputs": {"noise_seed": SEED}},
32
+ }
33
+ model = ["1", 0]
34
+ if lora:
35
+ g["4"] = {"class_type": "LoraLoaderModelOnly", "inputs": {"model": model, "lora_name": LORA, "strength_model": 1.0}}
36
+ model = ["4", 0]
37
+ g["22"] = {"class_type": "BasicGuider", "inputs": {"model": model, "conditioning": ["10", 0]}}
38
+ return g, model
39
+
40
+
41
+ def save(g, node, images, prefix):
42
+ g[node] = {"class_type": "CreateVideo", "inputs": {"images": images, "fps": 24}}
43
+ g[str(int(node) + 1)] = {"class_type": "SaveVideo", "inputs": {"video": [node, 0], "format": "auto", "codec": "auto",
44
+ "filename_prefix": prefix}}
45
+
46
+
47
+ # 1) stock source at normal speed
48
+ g, model = base(lora=False)
49
+ g["23"] = {"class_type": "BasicScheduler", "inputs": {"model": model, "scheduler": "simple", "steps": STEPS, "denoise": 1.0}}
50
+ g["30"] = {"class_type": "SamplerCustomAdvanced", "inputs": {"noise": ["21", 0], "guider": ["22", 0], "sampler": ["20", 0],
51
+ "sigmas": ["23", 0], "latent_image": ["10", 1]}}
52
+ g["31"] = {"class_type": "VAEDecode", "inputs": {"samples": ["30", 0], "vae": ["3", 0]}}
53
+ save(g, "40", ["31", 0], "video/h3clock_source_native")
54
+ (HERE / "source_generation.api.json").write_text(json.dumps(g, indent=1))
55
+
56
+ # 2) stage 1: text-to-video on the variable clock
57
+ g, model = base(lora=True)
58
+ g["5"] = {"class_type": "PrimitiveStringMultiline", "inputs": {"value": HOLD_MAP}}
59
+ g["24"] = {"class_type": "H3TrueClock", "inputs": {"sampler": ["20", 0], "hold_map": ["5", 0], "keep_fine_bands": 2}}
60
+ g["23"] = {"class_type": "BasicScheduler", "inputs": {"model": model, "scheduler": "simple", "steps": STEPS, "denoise": 1.0}}
61
+ g["30"] = {"class_type": "SamplerCustomAdvanced", "inputs": {"noise": ["21", 0], "guider": ["22", 0], "sampler": ["24", 0],
62
+ "sigmas": ["23", 0], "latent_image": ["10", 1]}}
63
+ g["31"] = {"class_type": "VAEDecode", "inputs": {"samples": ["30", 0], "vae": ["3", 0]}}
64
+ g["32"] = {"class_type": "H3ExactRecover", "inputs": {"images": ["31", 0], "hold_map": ["5", 0]}}
65
+ save(g, "40", ["32", 0], "video/h3clock_stage1_kept")
66
+ save(g, "42", ["31", 0], "video/h3clock_stage1_all_frames")
67
+ (HERE / "stage1_t2v_clock.api.json").write_text(json.dumps(g, indent=1))
68
+
69
+ # 3) stage 2: de-rope with the clock enabled
70
+ g, model = base(lora=True)
71
+ g["5"] = {"class_type": "PrimitiveStringMultiline", "inputs": {"value": HOLD_MAP}}
72
+ g["11"] = {"class_type": "LoadVideo", "inputs": {"file": "h3clock_source_native_00001_.mp4"}}
73
+ g["12"] = {"class_type": "GetVideoComponents", "inputs": {"video": ["11", 0]}}
74
+ g["13"] = {"class_type": "ImageScale", "inputs": {"image": ["12", 0], "upscale_method": "lanczos", "width": W, "height": H,
75
+ "crop": "center"}}
76
+ g["14"] = {"class_type": "ImageFromBatch", "inputs": {"image": ["13", 0], "batch_index": 20, "length": len(CLOCK)}}
77
+ g["15"] = {"class_type": "H3TimeSmear", "inputs": {"images": ["14", 0], "dilation": 1, "hold_map": ["5", 0], "fps": 24,
78
+ "expand_to_end": False}}
79
+ g["16"] = {"class_type": "VAEEncode", "inputs": {"pixels": ["15", 0], "vae": ["3", 0]}}
80
+ g["17"] = {"class_type": "H3V2VInit", "inputs": {"samples": ["16", 0]}}
81
+ g["24"] = {"class_type": "H3TrueClock", "inputs": {"sampler": ["20", 0], "hold_map": ["15", 1], "keep_fine_bands": 2}}
82
+ g["23"] = {"class_type": "H3InjectSchedule", "inputs": {"model": model, "scheduler": "simple", "total_steps": STEPS,
83
+ "inject": 0.7, "preset": "custom"}}
84
+ g["30"] = {"class_type": "SamplerCustomAdvanced", "inputs": {"noise": ["21", 0], "guider": ["22", 0], "sampler": ["24", 0],
85
+ "sigmas": ["23", 0], "latent_image": ["17", 0]}}
86
+ g["31"] = {"class_type": "VAEDecode", "inputs": {"samples": ["30", 0], "vae": ["3", 0]}}
87
+ g["32"] = {"class_type": "H3ExactRecover", "inputs": {"images": ["31", 0], "hold_map": ["15", 1]}}
88
+ save(g, "40", ["32", 0], "video/h3clock_stage2_kept")
89
+ save(g, "42", ["31", 0], "video/h3clock_stage2_all_frames")
90
+ (HERE / "stage2_derope_clock.api.json").write_text(json.dumps(g, indent=1))
91
+ print("wrote", sorted(p.name for p in HERE.glob("*.api.json")))
workflows/source_generation.api.json ADDED
@@ -0,0 +1,137 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "1": {
3
+ "class_type": "UNETLoader",
4
+ "inputs": {
5
+ "unet_name": "minimax_h3/minimax_h3_fl2va_pruned_int8_convrot.safetensors",
6
+ "weight_dtype": "default"
7
+ }
8
+ },
9
+ "2": {
10
+ "class_type": "CLIPLoader",
11
+ "inputs": {
12
+ "clip_name": "minimax_h3/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
13
+ "type": "minimax",
14
+ "device": "default"
15
+ }
16
+ },
17
+ "3": {
18
+ "class_type": "VAELoader",
19
+ "inputs": {
20
+ "vae_name": "minimax_h3/minimax_h3_video_vae_fp16.safetensors"
21
+ }
22
+ },
23
+ "10": {
24
+ "class_type": "MiniMaxH3ImageToVideo",
25
+ "inputs": {
26
+ "clip": [
27
+ "2",
28
+ 0
29
+ ],
30
+ "vae": [
31
+ "3",
32
+ 0
33
+ ],
34
+ "prompt": "[Shot 1] 2D anime, cel-shaded, cinematic, a close-up medium shot framed from the top of her head down to her chest, a beautiful adult woman in her twenties with a high ponytail, wearing a low-cut black sports bra and red hand wraps, shadowboxing at full speed in a sunlit boxing gym. She bobs and weaves under an imaginary punch, slips left and right, snaps a double jab, rips a rising uppercut, then plants and whips into a spinning backfist that turns her whole body away from the camera and back again, finishing with a fast hook-cross combination. Her shoulders and hips rotate hard, her ponytail whips around her head through the spin, her chest bounces with each sharp movement, loose strands of hair and sweat droplets fly off, her expression focused and fierce. The camera holds steady and close as her fists and wraps snap in and out of frame, dust motes drifting through the window light behind her.\n\noverall_soundscape: Sharp exhales with each punch; quick shuffling footwork on a canvas floor; the whoosh of the spinning backfist; the snap of wraps cutting the air; a heavy bag creaking faintly in the background; muffled gym ambience.\n\nnon_diegetic_music: N/A",
35
+ "width": 1344,
36
+ "height": 768,
37
+ "length": 124
38
+ }
39
+ },
40
+ "20": {
41
+ "class_type": "KSamplerSelect",
42
+ "inputs": {
43
+ "sampler_name": "euler"
44
+ }
45
+ },
46
+ "21": {
47
+ "class_type": "RandomNoise",
48
+ "inputs": {
49
+ "noise_seed": 20260923
50
+ }
51
+ },
52
+ "22": {
53
+ "class_type": "BasicGuider",
54
+ "inputs": {
55
+ "model": [
56
+ "1",
57
+ 0
58
+ ],
59
+ "conditioning": [
60
+ "10",
61
+ 0
62
+ ]
63
+ }
64
+ },
65
+ "23": {
66
+ "class_type": "BasicScheduler",
67
+ "inputs": {
68
+ "model": [
69
+ "1",
70
+ 0
71
+ ],
72
+ "scheduler": "simple",
73
+ "steps": 20,
74
+ "denoise": 1.0
75
+ }
76
+ },
77
+ "30": {
78
+ "class_type": "SamplerCustomAdvanced",
79
+ "inputs": {
80
+ "noise": [
81
+ "21",
82
+ 0
83
+ ],
84
+ "guider": [
85
+ "22",
86
+ 0
87
+ ],
88
+ "sampler": [
89
+ "20",
90
+ 0
91
+ ],
92
+ "sigmas": [
93
+ "23",
94
+ 0
95
+ ],
96
+ "latent_image": [
97
+ "10",
98
+ 1
99
+ ]
100
+ }
101
+ },
102
+ "31": {
103
+ "class_type": "VAEDecode",
104
+ "inputs": {
105
+ "samples": [
106
+ "30",
107
+ 0
108
+ ],
109
+ "vae": [
110
+ "3",
111
+ 0
112
+ ]
113
+ }
114
+ },
115
+ "40": {
116
+ "class_type": "CreateVideo",
117
+ "inputs": {
118
+ "images": [
119
+ "31",
120
+ 0
121
+ ],
122
+ "fps": 24
123
+ }
124
+ },
125
+ "41": {
126
+ "class_type": "SaveVideo",
127
+ "inputs": {
128
+ "video": [
129
+ "40",
130
+ 0
131
+ ],
132
+ "format": "auto",
133
+ "codec": "auto",
134
+ "filename_prefix": "video/h3clock_source_native"
135
+ }
136
+ }
137
+ }
workflows/stage1_t2v_clock.api.json ADDED
@@ -0,0 +1,203 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "1": {
3
+ "class_type": "UNETLoader",
4
+ "inputs": {
5
+ "unet_name": "minimax_h3/minimax_h3_fl2va_pruned_int8_convrot.safetensors",
6
+ "weight_dtype": "default"
7
+ }
8
+ },
9
+ "2": {
10
+ "class_type": "CLIPLoader",
11
+ "inputs": {
12
+ "clip_name": "minimax_h3/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
13
+ "type": "minimax",
14
+ "device": "default"
15
+ }
16
+ },
17
+ "3": {
18
+ "class_type": "VAELoader",
19
+ "inputs": {
20
+ "vae_name": "minimax_h3/minimax_h3_video_vae_fp16.safetensors"
21
+ }
22
+ },
23
+ "10": {
24
+ "class_type": "MiniMaxH3ImageToVideo",
25
+ "inputs": {
26
+ "clip": [
27
+ "2",
28
+ 0
29
+ ],
30
+ "vae": [
31
+ "3",
32
+ 0
33
+ ],
34
+ "prompt": "[Shot 1] 2D anime, cel-shaded, cinematic, a close-up medium shot framed from the top of her head down to her chest, a beautiful adult woman in her twenties with a high ponytail, wearing a low-cut black sports bra and red hand wraps, shadowboxing at full speed in a sunlit boxing gym. She bobs and weaves under an imaginary punch, slips left and right, snaps a double jab, rips a rising uppercut, then plants and whips into a spinning backfist that turns her whole body away from the camera and back again, finishing with a fast hook-cross combination. Her shoulders and hips rotate hard, her ponytail whips around her head through the spin, her chest bounces with each sharp movement, loose strands of hair and sweat droplets fly off, her expression focused and fierce. The camera holds steady and close as her fists and wraps snap in and out of frame, dust motes drifting through the window light behind her.\n\noverall_soundscape: Sharp exhales with each punch; quick shuffling footwork on a canvas floor; the whoosh of the spinning backfist; the snap of wraps cutting the air; a heavy bag creaking faintly in the background; muffled gym ambience.\n\nnon_diegetic_music: N/A",
35
+ "width": 1344,
36
+ "height": 768,
37
+ "length": 124
38
+ }
39
+ },
40
+ "20": {
41
+ "class_type": "KSamplerSelect",
42
+ "inputs": {
43
+ "sampler_name": "euler"
44
+ }
45
+ },
46
+ "21": {
47
+ "class_type": "RandomNoise",
48
+ "inputs": {
49
+ "noise_seed": 20260923
50
+ }
51
+ },
52
+ "4": {
53
+ "class_type": "LoraLoaderModelOnly",
54
+ "inputs": {
55
+ "model": [
56
+ "1",
57
+ 0
58
+ ],
59
+ "lora_name": "minimax_h3_variable_clock/minimax_h3_variable_clock_runf_step2000_r16.safetensors",
60
+ "strength_model": 1.0
61
+ }
62
+ },
63
+ "22": {
64
+ "class_type": "BasicGuider",
65
+ "inputs": {
66
+ "model": [
67
+ "4",
68
+ 0
69
+ ],
70
+ "conditioning": [
71
+ "10",
72
+ 0
73
+ ]
74
+ }
75
+ },
76
+ "5": {
77
+ "class_type": "PrimitiveStringMultiline",
78
+ "inputs": {
79
+ "value": "{\"holds\": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 4, 4, 4, 4, 1, 4, 4, 4, 4, 1, 4, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], \"world_len\": 73}"
80
+ }
81
+ },
82
+ "24": {
83
+ "class_type": "H3TrueClock",
84
+ "inputs": {
85
+ "sampler": [
86
+ "20",
87
+ 0
88
+ ],
89
+ "hold_map": [
90
+ "5",
91
+ 0
92
+ ],
93
+ "keep_fine_bands": 2
94
+ }
95
+ },
96
+ "23": {
97
+ "class_type": "BasicScheduler",
98
+ "inputs": {
99
+ "model": [
100
+ "4",
101
+ 0
102
+ ],
103
+ "scheduler": "simple",
104
+ "steps": 20,
105
+ "denoise": 1.0
106
+ }
107
+ },
108
+ "30": {
109
+ "class_type": "SamplerCustomAdvanced",
110
+ "inputs": {
111
+ "noise": [
112
+ "21",
113
+ 0
114
+ ],
115
+ "guider": [
116
+ "22",
117
+ 0
118
+ ],
119
+ "sampler": [
120
+ "24",
121
+ 0
122
+ ],
123
+ "sigmas": [
124
+ "23",
125
+ 0
126
+ ],
127
+ "latent_image": [
128
+ "10",
129
+ 1
130
+ ]
131
+ }
132
+ },
133
+ "31": {
134
+ "class_type": "VAEDecode",
135
+ "inputs": {
136
+ "samples": [
137
+ "30",
138
+ 0
139
+ ],
140
+ "vae": [
141
+ "3",
142
+ 0
143
+ ]
144
+ }
145
+ },
146
+ "32": {
147
+ "class_type": "H3ExactRecover",
148
+ "inputs": {
149
+ "images": [
150
+ "31",
151
+ 0
152
+ ],
153
+ "hold_map": [
154
+ "5",
155
+ 0
156
+ ]
157
+ }
158
+ },
159
+ "40": {
160
+ "class_type": "CreateVideo",
161
+ "inputs": {
162
+ "images": [
163
+ "32",
164
+ 0
165
+ ],
166
+ "fps": 24
167
+ }
168
+ },
169
+ "41": {
170
+ "class_type": "SaveVideo",
171
+ "inputs": {
172
+ "video": [
173
+ "40",
174
+ 0
175
+ ],
176
+ "format": "auto",
177
+ "codec": "auto",
178
+ "filename_prefix": "video/h3clock_stage1_kept"
179
+ }
180
+ },
181
+ "42": {
182
+ "class_type": "CreateVideo",
183
+ "inputs": {
184
+ "images": [
185
+ "31",
186
+ 0
187
+ ],
188
+ "fps": 24
189
+ }
190
+ },
191
+ "43": {
192
+ "class_type": "SaveVideo",
193
+ "inputs": {
194
+ "video": [
195
+ "42",
196
+ 0
197
+ ],
198
+ "format": "auto",
199
+ "codec": "auto",
200
+ "filename_prefix": "video/h3clock_stage1_all_frames"
201
+ }
202
+ }
203
+ }
workflows/stage2_derope_clock.api.json ADDED
@@ -0,0 +1,281 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ {
2
+ "1": {
3
+ "class_type": "UNETLoader",
4
+ "inputs": {
5
+ "unet_name": "minimax_h3/minimax_h3_fl2va_pruned_int8_convrot.safetensors",
6
+ "weight_dtype": "default"
7
+ }
8
+ },
9
+ "2": {
10
+ "class_type": "CLIPLoader",
11
+ "inputs": {
12
+ "clip_name": "minimax_h3/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
13
+ "type": "minimax",
14
+ "device": "default"
15
+ }
16
+ },
17
+ "3": {
18
+ "class_type": "VAELoader",
19
+ "inputs": {
20
+ "vae_name": "minimax_h3/minimax_h3_video_vae_fp16.safetensors"
21
+ }
22
+ },
23
+ "10": {
24
+ "class_type": "MiniMaxH3ImageToVideo",
25
+ "inputs": {
26
+ "clip": [
27
+ "2",
28
+ 0
29
+ ],
30
+ "vae": [
31
+ "3",
32
+ 0
33
+ ],
34
+ "prompt": "[Shot 1] 2D anime, cel-shaded, cinematic, a close-up medium shot framed from the top of her head down to her chest, a beautiful adult woman in her twenties with a high ponytail, wearing a low-cut black sports bra and red hand wraps, shadowboxing at full speed in a sunlit boxing gym. She bobs and weaves under an imaginary punch, slips left and right, snaps a double jab, rips a rising uppercut, then plants and whips into a spinning backfist that turns her whole body away from the camera and back again, finishing with a fast hook-cross combination. Her shoulders and hips rotate hard, her ponytail whips around her head through the spin, her chest bounces with each sharp movement, loose strands of hair and sweat droplets fly off, her expression focused and fierce. The camera holds steady and close as her fists and wraps snap in and out of frame, dust motes drifting through the window light behind her.\n\noverall_soundscape: Sharp exhales with each punch; quick shuffling footwork on a canvas floor; the whoosh of the spinning backfist; the snap of wraps cutting the air; a heavy bag creaking faintly in the background; muffled gym ambience.\n\nnon_diegetic_music: N/A",
35
+ "width": 1344,
36
+ "height": 768,
37
+ "length": 124
38
+ }
39
+ },
40
+ "20": {
41
+ "class_type": "KSamplerSelect",
42
+ "inputs": {
43
+ "sampler_name": "euler"
44
+ }
45
+ },
46
+ "21": {
47
+ "class_type": "RandomNoise",
48
+ "inputs": {
49
+ "noise_seed": 20260923
50
+ }
51
+ },
52
+ "4": {
53
+ "class_type": "LoraLoaderModelOnly",
54
+ "inputs": {
55
+ "model": [
56
+ "1",
57
+ 0
58
+ ],
59
+ "lora_name": "minimax_h3_variable_clock/minimax_h3_variable_clock_runf_step2000_r16.safetensors",
60
+ "strength_model": 1.0
61
+ }
62
+ },
63
+ "22": {
64
+ "class_type": "BasicGuider",
65
+ "inputs": {
66
+ "model": [
67
+ "4",
68
+ 0
69
+ ],
70
+ "conditioning": [
71
+ "10",
72
+ 0
73
+ ]
74
+ }
75
+ },
76
+ "5": {
77
+ "class_type": "PrimitiveStringMultiline",
78
+ "inputs": {
79
+ "value": "{\"holds\": [1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 2, 2, 2, 2, 2, 2, 2, 2, 1, 4, 4, 4, 4, 1, 4, 4, 4, 4, 1, 4, 2, 2, 2, 2, 2, 2, 1, 2, 2, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1], \"world_len\": 73}"
80
+ }
81
+ },
82
+ "11": {
83
+ "class_type": "LoadVideo",
84
+ "inputs": {
85
+ "file": "h3clock_source_native_00001_.mp4"
86
+ }
87
+ },
88
+ "12": {
89
+ "class_type": "GetVideoComponents",
90
+ "inputs": {
91
+ "video": [
92
+ "11",
93
+ 0
94
+ ]
95
+ }
96
+ },
97
+ "13": {
98
+ "class_type": "ImageScale",
99
+ "inputs": {
100
+ "image": [
101
+ "12",
102
+ 0
103
+ ],
104
+ "upscale_method": "lanczos",
105
+ "width": 1344,
106
+ "height": 768,
107
+ "crop": "center"
108
+ }
109
+ },
110
+ "14": {
111
+ "class_type": "ImageFromBatch",
112
+ "inputs": {
113
+ "image": [
114
+ "13",
115
+ 0
116
+ ],
117
+ "batch_index": 20,
118
+ "length": 73
119
+ }
120
+ },
121
+ "15": {
122
+ "class_type": "H3TimeSmear",
123
+ "inputs": {
124
+ "images": [
125
+ "14",
126
+ 0
127
+ ],
128
+ "dilation": 1,
129
+ "hold_map": [
130
+ "5",
131
+ 0
132
+ ],
133
+ "fps": 24,
134
+ "expand_to_end": false
135
+ }
136
+ },
137
+ "16": {
138
+ "class_type": "VAEEncode",
139
+ "inputs": {
140
+ "pixels": [
141
+ "15",
142
+ 0
143
+ ],
144
+ "vae": [
145
+ "3",
146
+ 0
147
+ ]
148
+ }
149
+ },
150
+ "17": {
151
+ "class_type": "H3V2VInit",
152
+ "inputs": {
153
+ "samples": [
154
+ "16",
155
+ 0
156
+ ]
157
+ }
158
+ },
159
+ "24": {
160
+ "class_type": "H3TrueClock",
161
+ "inputs": {
162
+ "sampler": [
163
+ "20",
164
+ 0
165
+ ],
166
+ "hold_map": [
167
+ "15",
168
+ 1
169
+ ],
170
+ "keep_fine_bands": 2
171
+ }
172
+ },
173
+ "23": {
174
+ "class_type": "H3InjectSchedule",
175
+ "inputs": {
176
+ "model": [
177
+ "4",
178
+ 0
179
+ ],
180
+ "scheduler": "simple",
181
+ "total_steps": 20,
182
+ "inject": 0.7,
183
+ "preset": "custom"
184
+ }
185
+ },
186
+ "30": {
187
+ "class_type": "SamplerCustomAdvanced",
188
+ "inputs": {
189
+ "noise": [
190
+ "21",
191
+ 0
192
+ ],
193
+ "guider": [
194
+ "22",
195
+ 0
196
+ ],
197
+ "sampler": [
198
+ "24",
199
+ 0
200
+ ],
201
+ "sigmas": [
202
+ "23",
203
+ 0
204
+ ],
205
+ "latent_image": [
206
+ "17",
207
+ 0
208
+ ]
209
+ }
210
+ },
211
+ "31": {
212
+ "class_type": "VAEDecode",
213
+ "inputs": {
214
+ "samples": [
215
+ "30",
216
+ 0
217
+ ],
218
+ "vae": [
219
+ "3",
220
+ 0
221
+ ]
222
+ }
223
+ },
224
+ "32": {
225
+ "class_type": "H3ExactRecover",
226
+ "inputs": {
227
+ "images": [
228
+ "31",
229
+ 0
230
+ ],
231
+ "hold_map": [
232
+ "15",
233
+ 1
234
+ ]
235
+ }
236
+ },
237
+ "40": {
238
+ "class_type": "CreateVideo",
239
+ "inputs": {
240
+ "images": [
241
+ "32",
242
+ 0
243
+ ],
244
+ "fps": 24
245
+ }
246
+ },
247
+ "41": {
248
+ "class_type": "SaveVideo",
249
+ "inputs": {
250
+ "video": [
251
+ "40",
252
+ 0
253
+ ],
254
+ "format": "auto",
255
+ "codec": "auto",
256
+ "filename_prefix": "video/h3clock_stage2_kept"
257
+ }
258
+ },
259
+ "42": {
260
+ "class_type": "CreateVideo",
261
+ "inputs": {
262
+ "images": [
263
+ "31",
264
+ 0
265
+ ],
266
+ "fps": 24
267
+ }
268
+ },
269
+ "43": {
270
+ "class_type": "SaveVideo",
271
+ "inputs": {
272
+ "video": [
273
+ "42",
274
+ 0
275
+ ],
276
+ "format": "auto",
277
+ "codec": "auto",
278
+ "filename_prefix": "video/h3clock_stage2_all_frames"
279
+ }
280
+ }
281
+ }