Skip to content

One-click character swap for videos: an open-source, local Higgsfield Genjutsu alternative built on ComfyUI and MiniMax H3, with FLUX.3 Klein relighting.

Make Montage labelling ask Qwen in small batches with retries

D3voz49ed50ebea0a
diff --git a/README.md b/README.md
index 69dd00a..1b2c966 100644
--- a/README.md
+++ b/README.md
@@ -77,7 +77,7 @@ On Windows, double-click `start_openjutsu.bat` (ComfyUI must be running, or star
A 6 s clip at 480p takes about 6–13 minutes on a 4060 Ti, most of it in H3 sampling. 736p is the default; 1080p is about 2.5× slower than 736p and needs much more memory. Custom sets an exact width × height from 256 to 2048 px a side (rounded to 32); the video is scaled and centre-cropped to that shape first. It needs the `short_edge` input of the H3 Swap Plan nodes in comfyui-h3-oneclick-swap.
-Advanced motion transfer has a **Montage** tab for edited clips where different people take turns within one shot without a hard cut (whip pans, selfie handovers, travel montages). Write roles as "who - looks" ("the dancer - white polo, jeans"): the looks help match the people, and only the part before " - " reaches H3. **Generate** tracks everyone with SAM over the whole video, matches each appearance to the roles with Qwen (a person SAM loses and finds again is matched again, so they keep their photo) and makes the video as one chain like Standard, with overlapping clips: each clip has one H3 pass per photo on screen in it (the two with the most screen time) that masks only that photo's appearances, with a prompt about that person only. Appearances on screen for under 12 frames or at under 2% of the frame stay as they are, since H3 draws them as grey figures; the result page lists them. **Find people** (about 3 minutes for 18 s of video) is the optional review: it does the tracking and matching alone, lists the appearances with a photo picker each and saves the tracks, and Generate from that list masks with exactly those tracks. The saved tracks live in ComfyUI's temp folder and are checked against the video, part and size, so after a ComfyUI restart or a change, Find people again. It needs the pack's `H3MontagePeople`, `H3MontageTracks`, `H3MontagePicks`, `H3MontagePlan` and `H3MontagePass` nodes.
+Advanced motion transfer has a **Montage** tab for edited clips where different people take turns within one shot without a hard cut (whip pans, selfie handovers, travel montages). Write roles as "who - looks" ("the dancer - white polo, jeans"): the looks help match the people, and only the part before " - " reaches H3. **Generate** tracks everyone with SAM over the whole video, matches each appearance to the roles with Qwen (a person SAM loses and finds again is matched again, so they keep their photo; Qwen sees each appearance in its frame and close up at three moments, a few appearances at a time, and is asked again about any it skips or matches to one photo twice at the same moment) and makes the video as one chain like Standard, with overlapping clips: each clip has one H3 pass per photo on screen in it (the two with the most screen time) that masks only that photo's appearances, with a prompt about that person only. Appearances on screen for under 12 frames or at under 2% of the frame stay as they are, since H3 draws them as grey figures; the result page lists them. **Find people** (about 3 minutes for 18 s of video) is the optional review: it does the tracking and matching alone, lists the appearances with a photo picker each and saves the tracks, and Generate from that list masks with exactly those tracks. The saved tracks live in ComfyUI's temp folder and are checked against the video, part and size, so after a ComfyUI restart or a change, Find people again. It needs the pack's `H3TrackCrops` and `H3TrackRoles` (which now runs Qwen itself), `H3MontagePeople`, `H3MontageTracks`, `H3MontagePicks`, `H3MontagePlan` and `H3MontagePass` nodes.
## Tips
diff --git a/lib/montage.ts b/lib/montage.ts
index 53354d9..a681247 100644
--- a/lib/montage.ts
+++ b/lib/montage.ts
@@ -26,7 +26,7 @@ export const TRACKS = "Tracks from Find people";
// The montage graph's own tracking and labelling, for a run without review.
const SAM = "SAM 3.1 track every person (whole video)";
const CROPS = "Show each track per shot";
-const ANALYSIS = [SAM, CROPS, "Who is each track (Qwen3-VL)", "Read the track labels", "Picks without review"];
+const ANALYSIS = [SAM, CROPS, "Who is each track (Qwen3-VL)", "Picks without review"];
export const TRACKS_FILE = /^h3_montage_people_\d+_\.npz$/;
// Listed even when unlabelled once on screen this long or this big.
diff --git a/workflows/advanced.api.json b/workflows/advanced.api.json
index 7627bbb..ed5c433 100644
--- a/workflows/advanced.api.json
+++ b/workflows/advanced.api.json
@@ -673,45 +673,24 @@
"title": "Show each track per shot"
}
},
- "46": {
+ "47": {
"inputs": {
- "prompt": [
- "45",
- 1
- ],
- "max_length": 400,
- "sampling_mode": "off",
- "thinking": false,
- "use_default_template": true,
- "mtp": "auto",
"clip": [
"22",
0
],
- "image": [
+ "crops": [
"45",
0
- ]
- },
- "class_type": "TextGenerate",
- "_meta": {
- "title": "Who is each track (Qwen3-VL)"
- }
- },
- "47": {
- "inputs": {
+ ],
"segments": [
"45",
- 2
- ],
- "answer": [
- "46",
- 0
+ 1
]
},
"class_type": "H3TrackRoles",
"_meta": {
- "title": "Read the track labels"
+ "title": "Who is each track (Qwen3-VL)"
}
},
"48": {
diff --git a/workflows/advanced_maxq.api.json b/workflows/advanced_maxq.api.json
index 7bb2a09..8514a1b 100644
--- a/workflows/advanced_maxq.api.json
+++ b/workflows/advanced_maxq.api.json
@@ -567,45 +567,24 @@
"title": "Show each track per shot"
}
},
- "40": {
+ "41": {
"inputs": {
- "prompt": [
- "39",
- 1
- ],
- "max_length": 400,
- "sampling_mode": "off",
- "thinking": false,
- "use_default_template": true,
- "mtp": "auto",
"clip": [
"16",
0
],
- "image": [
+ "crops": [
"39",
0
- ]
- },
- "class_type": "TextGenerate",
- "_meta": {
- "title": "Who is each track (Qwen3-VL)"
- }
- },
- "41": {
- "inputs": {
+ ],
"segments": [
"39",
- 2
- ],
- "answer": [
- "40",
- 0
+ 1
]
},
"class_type": "H3TrackRoles",
"_meta": {
- "title": "Read the track labels"
+ "title": "Who is each track (Qwen3-VL)"
}
},
"42": {
diff --git a/workflows/montage.api.json b/workflows/montage.api.json
index 941a356..746732b 100644
--- a/workflows/montage.api.json
+++ b/workflows/montage.api.json
@@ -92,7 +92,6 @@
"113": {"class_type": "ComfySwitchNode", "_meta": {"title": "Pass 2 only where the piece has a second person"}, "inputs": {"switch": ["111", 4], "on_false": ["68", 0], "on_true": ["87", 0]}},
"121": {"inputs": {"detection_threshold": 0.35, "max_objects": 0, "detect_interval": 1, "images": ["36", 0], "model": ["26", 0], "conditioning": ["27", 0]}, "class_type": "SAM3_VideoTrack", "_meta": {"title": "SAM 3.1 track every person (whole video)"}},
"122": {"inputs": {"cut_threshold": 40, "max_crops": 32, "people": "<Subject 1>: the main person", "track_data": ["121", 0], "images": ["36", 0]}, "class_type": "H3TrackCrops", "_meta": {"title": "Show each track per shot"}},
- "123": {"inputs": {"prompt": ["122", 1], "max_length": 1200, "sampling_mode": "off", "thinking": false, "use_default_template": true, "mtp": "auto", "clip": ["16", 0], "image": ["122", 0]}, "class_type": "TextGenerate", "_meta": {"title": "Who is each track (Qwen3-VL)"}},
- "124": {"inputs": {"segments": ["122", 2], "answer": ["123", 0]}, "class_type": "H3TrackRoles", "_meta": {"title": "Read the track labels"}},
+ "124": {"inputs": {"clip": ["16", 0], "crops": ["122", 0], "segments": ["122", 1]}, "class_type": "H3TrackRoles", "_meta": {"title": "Who is each track (Qwen3-VL)"}},
"125": {"inputs": {"track_data": ["121", 0], "labels": ["124", 0]}, "class_type": "H3MontagePicks", "_meta": {"title": "Picks without review"}}
}
diff --git a/workflows/people.api.json b/workflows/people.api.json
index 8febe02..79ba553 100644
--- a/workflows/people.api.json
+++ b/workflows/people.api.json
@@ -6,7 +6,6 @@
"5": {"class_type": "SAM3_VideoTrack", "_meta": {"title": "SAM 3.1 track every person"}, "inputs": {"detection_threshold": 0.35, "max_objects": 0, "detect_interval": 1, "images": ["4", 0], "model": ["2", 0], "conditioning": ["3", 0]}},
"6": {"class_type": "H3TrackCrops", "_meta": {"title": "Show each track per shot"}, "inputs": {"cut_threshold": 40, "max_crops": 32, "people": "<Subject 1>: the main person", "track_data": ["5", 0], "images": ["4", 0]}},
"7": {"class_type": "CLIPLoader", "_meta": {"title": "Describer: Qwen3-VL 8B"}, "inputs": {"clip_name": "qwen3vl_8b_int8_convrot.safetensors", "type": "stable_diffusion", "device": "default"}},
- "8": {"class_type": "TextGenerate", "_meta": {"title": "Who is each track (Qwen3-VL)"}, "inputs": {"prompt": ["6", 1], "max_length": 1200, "sampling_mode": "off", "thinking": false, "use_default_template": true, "mtp": "auto", "clip": ["7", 0], "image": ["6", 0]}},
- "9": {"class_type": "H3TrackRoles", "_meta": {"title": "Read the track labels"}, "inputs": {"segments": ["6", 2], "answer": ["8", 0]}},
+ "9": {"class_type": "H3TrackRoles", "_meta": {"title": "Who is each track (Qwen3-VL)"}, "inputs": {"clip": ["7", 0], "crops": ["6", 0], "segments": ["6", 1]}},
"10": {"class_type": "H3MontagePeople", "_meta": {"title": "People (for the person list)"}, "inputs": {"track_data": ["5", 0], "crops": ["6", 0], "labels": ["9", 0], "source_frames": ["1", 0]}}
}