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.

Use H3 Source Slice from comfyui-h3-oneclick-swap

D3voz1ee2997b176b
diff --git a/lib/setup.ts b/lib/setup.ts
index c86e200..09b5c1c 100644
--- a/lib/setup.ts
+++ b/lib/setup.ts
@@ -30,8 +30,8 @@ export type NodeRegistry = Record<string, NodeInfo>;
const PACKS = [
{ name: "ComfyUI-Spectrum-MiniMax-H3", url: "https://github.com/xmarre/ComfyUI-Spectrum-MiniMax-H3", nodes: ["SpectrumApplyMiniMaxH3"] },
- { name: "ComfyUI-MiniMaxH3-Context-Loop (0.7.3+)", url: "https://github.com/ethanfel/ComfyUI-MiniMaxH3-Context-Loop", nodes: ["MiniMaxH3GenerationProfile", "MiniMaxH3SourceTimeline", "MiniMaxH3ChainPlanModern", "MiniMaxH3ChainLoopStart", "MiniMaxH3ChainCurrent", "MiniMaxH3ChainContext", "MiniMaxH3ChainSegmentSave", "MiniMaxH3ChainReview", "MiniMaxH3ChainLoopEnd", "MiniMaxH3ChainAssemble", "MiniMaxH3ContexLoopSourceSlice", "MiniMaxH3ContexLoopMaskSlice", "MiniMaxH3ContexMaskedTarget", "MiniMaxH3ContexMaskGridPreview", "MiniMaxH3LoopTrim"] },
- { name: "comfyui-h3-oneclick-swap", url: "https://github.com/D3voz/comfyui-h3-oneclick-swap", nodes: ["H3OneClickSwapPlan", "H3AdvancedSwapPlan", "H3ObjectSwapPlan", "H3ObjectPlacementMask", "H3AddFitCheck", "H3AddMovingArea", "H3PaintedEditArea", "H3SoundtrackOrSilence", "H3PeopleMask", "H3GreyMannequins", "H3ClipShots", "H3FillShots", "H3TrackCrops", "H3TrackRoles", "H3RoleMask", "H3SubjectPrompt", "H3MontagePeople", "H3MontageTracks", "H3MontagePicks", "H3MontagePlan", "H3MontagePass", "H3FaceChunks", "H3FaceJoin"] },
+ { name: "ComfyUI-MiniMaxH3-Context-Loop (0.7.3+)", url: "https://github.com/ethanfel/ComfyUI-MiniMaxH3-Context-Loop", nodes: ["MiniMaxH3GenerationProfile", "MiniMaxH3SourceTimeline", "MiniMaxH3ChainPlanModern", "MiniMaxH3ChainLoopStart", "MiniMaxH3ChainCurrent", "MiniMaxH3ChainContext", "MiniMaxH3ChainSegmentSave", "MiniMaxH3ChainReview", "MiniMaxH3ChainLoopEnd", "MiniMaxH3ChainAssemble", "MiniMaxH3ContexLoopMaskSlice", "MiniMaxH3ContexMaskedTarget", "MiniMaxH3ContexMaskGridPreview", "MiniMaxH3LoopTrim"] },
+ { name: "comfyui-h3-oneclick-swap", url: "https://github.com/D3voz/comfyui-h3-oneclick-swap", nodes: ["H3OneClickSwapPlan", "H3AdvancedSwapPlan", "H3ObjectSwapPlan", "H3ObjectPlacementMask", "H3AddFitCheck", "H3AddMovingArea", "H3PaintedEditArea", "H3SoundtrackOrSilence", "H3SourceSlice", "H3PeopleMask", "H3GreyMannequins", "H3ClipShots", "H3FillShots", "H3TrackCrops", "H3TrackRoles", "H3RoleMask", "H3SubjectPrompt", "H3MontagePeople", "H3MontageTracks", "H3MontagePicks", "H3MontagePlan", "H3MontagePass", "H3FaceChunks", "H3FaceJoin"] },
{ name: "ComfyUI-Fantastic-MiniMaxH3-PromptBuilder", url: "https://github.com/Adudeguyman/ComfyUI-Fantastic-MiniMaxH3-PromptBuilder", nodes: ["MiniMaxH3FantasticVideoEditLatent"] },
{ name: "ComfyUI-KJNodes", url: "https://github.com/kijai/ComfyUI-KJNodes", nodes: ["GrowMaskWithBlur", "ImageAndMaskPreview", "VRAM_Debug"] },
{ name: "ComfyUI-VideoHelperSuite", url: "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite", nodes: ["VHS_LoadVideo", "VHS_SelectEveryNthImage", "VHS_VideoCombine"] },
diff --git a/test/advanced.test.ts b/test/advanced.test.ts
index 9e7566c..95d4d53 100644
--- a/test/advanced.test.ts
+++ b/test/advanced.test.ts
@@ -56,7 +56,7 @@ test("without No lip-sync every pass hears the soundtrack and sees no faces", ()
assert.equal(Object.keys(pruned).length, Object.keys(g).length - 6);
for (const node of Object.values(pruned)) {
if (node.class_type === "MiniMaxH3ReferenceToVideo") assert.equal(pruned[(node.inputs["ref_video_audios.ref_video_audio_0"] as [string, number])[0]].class_type, "MiniMaxH3ChainCurrent");
- if (node.class_type === "MiniMaxH3ContexLoopSourceSlice") assert.equal(pruned[(node.inputs.source_audio as [string, number])[0]].class_type, "TrimAudioDuration");
+ if (node.class_type === "H3SourceSlice") assert.equal(pruned[(node.inputs.source_audio as [string, number])[0]].class_type, "TrimAudioDuration");
if (node.class_type === "H3GreyMannequins") assert.ok(!("faces" in node.inputs));
}
assert.ok(!("no_lip_sync" in pruned[nodeByTitle(pruned, "Swap Plan (roles, seed, size)")].inputs));
diff --git a/test/simple.test.ts b/test/simple.test.ts
index 822e1c1..320cd70 100644
--- a/test/simple.test.ts
+++ b/test/simple.test.ts
@@ -75,7 +75,7 @@ test("without No lip-sync H3 hears the soundtrack and the mannequin gets no face
assert.deepEqual(byClass(pruned, "AudioAdjustVolume"), []);
assert.ok(!Object.values(pruned).some((node) => /faces/.test(node._meta?.title ?? "")));
const [ref] = byClass(pruned, "MiniMaxH3ReferenceToVideo");
- const [src] = byClass(pruned, "MiniMaxH3ContexLoopSourceSlice");
+ const [src] = byClass(pruned, "H3SourceSlice");
const [mannequin] = byClass(pruned, "H3GreyMannequins");
assert.equal(pruned[(ref.inputs["ref_video_audios.ref_video_audio_0"] as [string, number])[0]].class_type, "MiniMaxH3ChainCurrent");
assert.equal(pruned[(src.inputs.source_audio as [string, number])[0]].class_type, "TrimAudioDuration");
@@ -86,7 +86,7 @@ test("without No lip-sync H3 hears the soundtrack and the mannequin gets no face
test("with No lip-sync H3 hears silence and the plan drops the lip-sync line", () => {
const pruned = pruneSimple(graph, settings(false, true));
const [ref] = byClass(pruned, "MiniMaxH3ReferenceToVideo");
- const [src] = byClass(pruned, "MiniMaxH3ContexLoopSourceSlice");
+ const [src] = byClass(pruned, "H3SourceSlice");
for (const link of [ref.inputs["ref_video_audios.ref_video_audio_0"], src.inputs.source_audio]) {
assert.deepEqual(pruned[(link as [string, number])[0]].inputs.volume, -100);
}
diff --git a/workflows/advanced.api.json b/workflows/advanced.api.json
index f56c092..1e6300f 100644
--- a/workflows/advanced.api.json
+++ b/workflows/advanced.api.json
@@ -856,7 +856,7 @@
0
]
},
- "class_type": "MiniMaxH3ContexLoopSourceSlice",
+ "class_type": "H3SourceSlice",
"_meta": {
"title": "Source clip (frames + audio)"
}
diff --git a/workflows/advanced_maxq.api.json b/workflows/advanced_maxq.api.json
index bb0cca2..4437ea9 100644
--- a/workflows/advanced_maxq.api.json
+++ b/workflows/advanced_maxq.api.json
@@ -750,7 +750,7 @@
0
]
},
- "class_type": "MiniMaxH3ContexLoopSourceSlice",
+ "class_type": "H3SourceSlice",
"_meta": {
"title": "Source clip (frames + audio)"
}
diff --git a/workflows/build/oneclick_advanced_build.js b/workflows/build/oneclick_advanced_build.js
index af2f3b9..ff02f31 100644
--- a/workflows/build/oneclick_advanced_build.js
+++ b/workflows/build/oneclick_advanced_build.js
@@ -218,7 +218,7 @@ link(soundtrack, 0, muteClip, "audio");
link(cur, "source_audio_slice", muteRef, "audio");
curGroup = engineGroup;
-const src = add("MiniMaxH3ContexLoopSourceSlice", "Source clip (frames + audio)", [lx, 1360], {source_fps: 24, crop: "center"});
+const src = add("H3SourceSlice", "Source clip (frames + audio)", [lx, 1360], {source_fps: 24, crop: "center"});
const noise = add("RandomNoise", "Clip Seed", [lx, 1560], {control_after_generate: "fixed"});
link(cur, "state", src, "state");
link(avae, 0, src, "audio_vae");
diff --git a/workflows/build/oneclick_object_build.js b/workflows/build/oneclick_object_build.js
index 5071ac2..b877707 100644
--- a/workflows/build/oneclick_object_build.js
+++ b/workflows/build/oneclick_object_build.js
@@ -125,7 +125,7 @@ link(start, "state", cur, "state");
const cx = lx + 420;
const ref = add("MiniMaxH3ReferenceToVideo", "Reference Conditioning", [cx, 60], {ref_image_size: "match"});
ref.size = [360, 300];
-const src = add("MiniMaxH3ContexLoopSourceSlice", "Source clip (frames + audio)", [cx, 420], {source_fps: 24, crop: "center"});
+const src = add("H3SourceSlice", "Source clip (frames + audio)", [cx, 420], {source_fps: 24, crop: "center"});
const motionAll = add("ImageScaleToMaxDimension", "Motion reference video (~512 px)", [vx, 1340], {upscale_method: "area", largest_size: 512});
const clipStart = add("ComfyMathExpression", "Clip start frame", [cx, 640], {0: "round(a * 24)"});
const motion = add("ImageFromBatch", "Motion reference for this clip", [cx, 740], {batch_index: 0, length: 141});
diff --git a/workflows/build/oneclick_single_build.js b/workflows/build/oneclick_single_build.js
index 5a53bc6..e60a00c 100644
--- a/workflows/build/oneclick_single_build.js
+++ b/workflows/build/oneclick_single_build.js
@@ -152,7 +152,7 @@ link(start, "state", cur, "state");
const cx = lx + 420;
const ref = add("MiniMaxH3ReferenceToVideo", "Reference Conditioning", [cx, 60], {ref_image_size: "match"});
ref.size = [360, 300];
-const src = add("MiniMaxH3ContexLoopSourceSlice", "Source clip (frames + audio)", [cx, 420], {source_fps: 24, crop: "center"});
+const src = add("H3SourceSlice", "Source clip (frames + audio)", [cx, 420], {source_fps: 24, crop: "center"});
const motionAll = add("ImageScaleToMaxDimension", "Motion reference video (~512 px)", [vx, 1340], {upscale_method: "area", largest_size: 512});
const clipStart = add("ComfyMathExpression", "Clip start frame", [cx, 640], {0: "round(a * 24)"});
const motion = add("ImageFromBatch", "Motion reference for this clip", [cx, 740], {batch_index: 0, length: 141});
diff --git a/workflows/montage.api.json b/workflows/montage.api.json
index 1ca2d55..6bbd711 100644
--- a/workflows/montage.api.json
+++ b/workflows/montage.api.json
@@ -32,7 +32,7 @@
"47": {"inputs": {"text": "hat", "clip": ["26", 1]}, "class_type": "CLIPTextEncode", "_meta": {"title": "SAM: hats"}},
"48": {"inputs": {"detection_threshold": 0.35, "max_objects": 0, "detect_interval": 1, "images": ["37", 0], "model": ["26", 0], "conditioning": ["47", 0]}, "class_type": "SAM3_VideoTrack", "_meta": {"title": "SAM 3.1 track hats"}},
"49": {"inputs": {"object_indices": "", "track_data": ["48", 0]}, "class_type": "SAM3_TrackToMask", "_meta": {"title": "All hats"}},
- "50": {"inputs": {"source_fps": 24, "crop": "center", "state": ["32", 0], "latent": ["59", 1], "audio_vae": ["24", 0], "source_frames": ["8", 0], "source_audio": ["101", 0]}, "class_type": "MiniMaxH3ContexLoopSourceSlice", "_meta": {"title": "Source clip (frames + audio)"}},
+ "50": {"inputs": {"source_fps": 24, "crop": "center", "state": ["32", 0], "latent": ["59", 1], "audio_vae": ["24", 0], "source_frames": ["8", 0], "source_audio": ["101", 0]}, "class_type": "H3SourceSlice", "_meta": {"title": "Source clip (frames + audio)"}},
"51": {"inputs": {"noise_seed": ["32", 5]}, "class_type": "RandomNoise", "_meta": {"title": "Clip Seed"}},
"52": {"inputs": {"headroom": 0.1, "hold_frames": 2, "subject": 0, "track_data": ["111", 0], "labels": ["111", 1]}, "class_type": "H3RoleMask", "_meta": {"title": "Pass 1: labelled people (+ headroom)"}},
"53": {"inputs": {"headroom": 0, "hold_frames": 1, "subject": 0, "track_data": ["111", 0], "labels": ["111", 1]}, "class_type": "H3RoleMask", "_meta": {"title": "Pass 1: labelled people, no headroom (mannequin)"}},
diff --git a/workflows/object.api.json b/workflows/object.api.json
index 8ff85ef..db43a52 100644
--- a/workflows/object.api.json
+++ b/workflows/object.api.json
@@ -439,7 +439,7 @@
0
]
},
- "class_type": "MiniMaxH3ContexLoopSourceSlice",
+ "class_type": "H3SourceSlice",
"_meta": {
"title": "Source clip (frames + audio)",
"cnr_id": "comfyui-workflow-encrypt",
diff --git a/workflows/simple.api.json b/workflows/simple.api.json
index c4061d0..5c19ce9 100644
--- a/workflows/simple.api.json
+++ b/workflows/simple.api.json
@@ -463,7 +463,7 @@
0
]
},
- "class_type": "MiniMaxH3ContexLoopSourceSlice",
+ "class_type": "H3SourceSlice",
"_meta": {
"title": "Source clip (frames + audio)"
}