Skip to content

armgit / fuobe

Public Imported from GitHub
0

The open creative studio on ComfyUI: images, video, 3D and audio on open weights, on your own GPU or the cloud. Camera motions, effects, apps, Cinema, Layers, Image to 3D and an AI agent.

Motion transfer: MiniMax H3 as a model choice on your GPU

Adarsh46a6bf79a7a3
diff --git a/scripts/comfy/hand-built/video-motion-transfer-h3.json b/scripts/comfy/hand-built/video-motion-transfer-h3.json
new file mode 100644
index 00000000..87f18c65
--- /dev/null
+++ b/scripts/comfy/hand-built/video-motion-transfer-h3.json
@@ -0,0 +1,344 @@
+{
+ "1": {
+ "class_type": "VHS_LoadVideo",
+ "inputs": {
+ "video": "input.mp4",
+ "force_rate": 24,
+ "custom_width": 0,
+ "custom_height": 0,
+ "frame_load_cap": 141,
+ "skip_first_frames": 0,
+ "select_every_nth": 1,
+ "format": "None"
+ },
+ "_meta": {
+ "title": "1 · Source video — selected motion clip"
+ }
+ },
+ "20": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "example.png"
+ },
+ "_meta": {
+ "title": "Character photo"
+ }
+ },
+ "30": {
+ "class_type": "VRAM_Debug",
+ "inputs": {
+ "empty_cache": true,
+ "gc_collect": true,
+ "unload_all_models": true,
+ "any_input": [
+ "20",
+ 0
+ ],
+ "image_pass": [
+ "1",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Release VRAM before Metric3D"
+ }
+ },
+ "31": {
+ "class_type": "ImageScaleToMaxDimension",
+ "inputs": {
+ "image": [
+ "30",
+ 1
+ ],
+ "largest_size": 768,
+ "upscale_method": "area"
+ },
+ "_meta": {
+ "title": "Metric3D input video"
+ }
+ },
+ "32": {
+ "class_type": "Metric3D-NormalMapPreprocessor",
+ "inputs": {
+ "image": [
+ "31",
+ 0
+ ],
+ "backbone": "vit-small",
+ "fx": 1000,
+ "fy": 1000,
+ "resolution": 512
+ },
+ "_meta": {
+ "title": "4 · Source motion normals"
+ }
+ },
+ "33": {
+ "class_type": "ImageScale",
+ "inputs": {
+ "image": [
+ "32",
+ 0
+ ],
+ "width": 480,
+ "height": 864,
+ "upscale_method": "lanczos",
+ "crop": "disabled"
+ },
+ "_meta": {
+ "title": "Normals match the output canvas"
+ }
+ },
+ "36": {
+ "class_type": "H3SoundtrackOrSilence",
+ "inputs": {
+ "audio": [
+ "1",
+ 2
+ ],
+ "video_info": [
+ "1",
+ 3
+ ]
+ },
+ "_meta": {
+ "title": "Original soundtrack / silence when absent"
+ }
+ },
+ "49": {
+ "class_type": "ModelAttentionBackend",
+ "inputs": {
+ "model": [
+ "51",
+ 0
+ ],
+ "attention": "comfy kitchen attention"
+ },
+ "_meta": {
+ "title": "Comfy Kitchen Attention"
+ }
+ },
+ "50": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "minimax_h3_ref2va_pruned_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "H3 Diffusion Model"
+ }
+ },
+ "51": {
+ "class_type": "LoraLoaderModelOnly",
+ "inputs": {
+ "model": [
+ "50",
+ 0
+ ],
+ "lora_name": "minimax_h3_DMAD_4step_full_lora_avg_rank_39_bf16.safetensors",
+ "strength_model": 1
+ },
+ "_meta": {
+ "title": "DMAD LoRA"
+ }
+ },
+ "52": {
+ "class_type": "MiniMaxH3SigmaShift",
+ "inputs": {
+ "model": [
+ "49",
+ 0
+ ],
+ "shift_video": 12,
+ "shift_audio": 2
+ },
+ "_meta": {
+ "title": "H3 Sigma Shift"
+ }
+ },
+ "53": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
+ "type": "minimax",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "H3 Text Encoder"
+ }
+ },
+ "54": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "minimax_h3_video_vae_int8_convrot.safetensors"
+ },
+ "_meta": {
+ "title": "H3 Video VAE"
+ }
+ },
+ "55": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "minimax_h3_audio_vae_fp32.safetensors"
+ },
+ "_meta": {
+ "title": "H3 Audio VAE"
+ }
+ },
+ "56": {
+ "class_type": "MiniMaxH3ReferenceToVideo",
+ "inputs": {
+ "clip": [
+ "53",
+ 0
+ ],
+ "vae": [
+ "54",
+ 0
+ ],
+ "audio_vae": [
+ "55",
+ 0
+ ],
+ "prompt": "subject_definitions:\n<Picture 1> defines the character's identity, face, hair, body and complete outfit, and the setting, background, colors, materials and lighting throughout the output.\n<Video 1> is a surface-orientation motion guide at 24 fps. Use the moving character's geometry, body pose, arm and leg movements, gestures, head direction, framing, character size and timing, and any camera movement, as the motion reference; the look of the output comes entirely from <Picture 1>.\n<Audio 1> is the original synchronized soundtrack.\n\nsummary:\n[video editing + reference generation + audio reuse] The character from <Picture 1> performs the movement of the character in <Video 1>, inside the setting of <Picture 1>. Keep the identity, face, hair, outfit, background and lighting of <Picture 1>. The picture is the appearance reference; the motion guide is the motion reference.\n\ndetailed_description:\nFrom the first frame the character holds the motion guide's first pose, framing and size, with the setting of <Picture 1> recomposed around them. Follow the motion guide's poses and gestures at the corresponding moments, through the last frame, moving into each new pose as it comes. Match its relative character size, camera perspective and any camera movement. Keep the picture's own setting, natural colors and environment coherent throughout the performance. Keep lighting and contact shadows consistent with the picture. Match visible speech to <Audio 1> when present.\n\noverall_soundscape:\nReuse <Audio 1> exactly as it is.",
+ "width": 480,
+ "height": 864,
+ "length": 141,
+ "ref_image_size": "match",
+ "ref_images.ref_image_0": [
+ "20",
+ 0
+ ],
+ "ref_videos.ref_video_0": [
+ "33",
+ 0
+ ],
+ "ref_video_audios.ref_video_audio_0": [
+ "36",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "5 · Character photo + normal motion reference"
+ }
+ },
+ "57": {
+ "class_type": "BasicGuider",
+ "inputs": {
+ "model": [
+ "52",
+ 0
+ ],
+ "conditioning": [
+ "56",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "H3 Guider"
+ }
+ },
+ "58": {
+ "class_type": "RandomNoise",
+ "inputs": {
+ "noise_seed": 2577489884
+ },
+ "_meta": {
+ "title": "Video seed"
+ }
+ },
+ "59": {
+ "class_type": "KSamplerSelect",
+ "inputs": {
+ "sampler_name": "euler"
+ },
+ "_meta": {
+ "title": "Video sampler"
+ }
+ },
+ "60": {
+ "class_type": "BasicScheduler",
+ "inputs": {
+ "model": [
+ "52",
+ 0
+ ],
+ "scheduler": "simple",
+ "steps": 6,
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "H3 · 6 steps"
+ }
+ },
+ "61": {
+ "class_type": "SamplerCustomAdvanced",
+ "inputs": {
+ "noise": [
+ "58",
+ 0
+ ],
+ "guider": [
+ "57",
+ 0
+ ],
+ "sampler": [
+ "59",
+ 0
+ ],
+ "sigmas": [
+ "60",
+ 0
+ ],
+ "latent_image": [
+ "56",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Generate motion"
+ }
+ },
+ "62": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "61",
+ 0
+ ],
+ "vae": [
+ "54",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Decode video"
+ }
+ },
+ "63": {
+ "class_type": "VHS_VideoCombine",
+ "inputs": {
+ "images": [
+ "62",
+ 0
+ ],
+ "audio": [
+ "36",
+ 0
+ ],
+ "frame_rate": 24,
+ "loop_count": 0,
+ "filename_prefix": "openjutsu_motion/h3/normal_motion",
+ "format": "video/h264-mp4",
+ "pix_fmt": "yuv420p",
+ "crf": 16,
+ "save_metadata": false,
+ "trim_to_audio": false,
+ "pingpong": false,
+ "save_output": true
+ },
+ "_meta": {
+ "title": "6 · Result with the clip's soundtrack"
+ }
+ }
+}
diff --git a/scripts/comfy/library.spec.mjs b/scripts/comfy/library.spec.mjs
index 91e0add5..75db97b3 100644
--- a/scripts/comfy/library.spec.mjs
+++ b/scripts/comfy/library.spec.mjs
@@ -5542,6 +5542,21 @@ export const SPEC = [
license: `${OJ_H3_LICENCE} · Metric3D BSD-2-Clause`,
notes: 'A second renderer for From picture, on native MiniMax H3; the same settings as video-from-picture-solar.',
},
+ {
+ id: 'video-motion-transfer-h3',
+ title: 'Motion transfer on native MiniMax H3 (DMAD, 6 steps): the character photo as the look, the part\'s Metric3D normals as the motion, the clip\'s sound kept',
+ capability: 'motion-transfer',
+ handBuilt: 'hand-built/video-motion-transfer-h3.json',
+ packs: [...OJ_PACKS, 'comfyui_controlnet_aux'],
+ bindings: { video: [b('1', 'video')], image: [b('20', 'image')] },
+ outputs: [{ node: '63', kind: 'video' }],
+ defaults: {},
+ limits: { maxDurationSec: 15 },
+ vramGb: 24,
+ autoDownloads: ['Metric3D vit-small (metric_depth_vit_small_800k.pth) -> custom_nodes/comfyui_controlnet_aux/ckpts/JUGGHM/Metric3D (fetched on first run unless placed there)'],
+ license: `${OJ_H3_LICENCE} · Metric3D BSD-2-Clause`,
+ notes: 'Genjutsu Motion transfer\'s "MiniMax H3" model (oss-h3-motion): video-from-picture-h3 with the character photo itself as Picture 1 (no prepared first frame) and words that put the character in the photo\'s setting. video = the part fitted at 24 fps, image = the character photo. params.extra.openjutsu: seconds, quality 480p | 720p, motion 0 | 512 | 768, seed (the same settings as From picture\'s video).',
+ },
{
id: 'video-fix-faces-h3',
title: 'Fix faces: H3-FaceRefine tracks the character\'s face, MiniMax H3 redraws it in overlapping sections and it is pasted back (faces over 20 % of the frame are left alone)',
diff --git a/src/components/genjutsu/genjutsu-studio.tsx b/src/components/genjutsu/genjutsu-studio.tsx
index b554471d..a2326e5e 100644
--- a/src/components/genjutsu/genjutsu-studio.tsx
+++ b/src/components/genjutsu/genjutsu-studio.tsx
@@ -682,9 +682,13 @@ export function GenjutsuStudio({ examples, live }: { examples?: ExampleRowData |
? longPart
? `${CHARACTER_SWAP.minSeconds}–${CHARACTER_SWAP.maxContinued} s; past 15 s it continues window by window`
: `${CHARACTER_SWAP.minSeconds}–${CHARACTER_SWAP.maxSeconds} s of one continuous shot, the person in its first frame`
- : duration && duration > GENJUTSU.maxSeconds
- ? `Pick up to ${GENJUTSU.maxSeconds} s — only that part comes out`
- : `${GENJUTSU.minSeconds}–${GENJUTSU.maxSeconds} s; the whole clip, or just the part you need`
+ : mode === "motion" && maker?.part
+ ? duration && duration > maker.part.max
+ ? `Pick up to ${maker.part.max} s — only that part comes out`
+ : `${maker.part.min}–${maker.part.max} s; the whole clip, or just the part you need`
+ : duration && duration > GENJUTSU.maxSeconds
+ ? `Pick up to ${GENJUTSU.maxSeconds} s — only that part comes out`
+ : `${GENJUTSU.minSeconds}–${GENJUTSU.maxSeconds} s; the whole clip, or just the part you need`
}
onMeta={source.setBrowserMeta}
/>
@@ -983,6 +987,9 @@ export function GenjutsuStudio({ examples, live }: { examples?: ExampleRowData |
setPicked((p) => ({ ...p, [choiceKey]: id }));
// Another model than Scene edit: back to swapping (Remove it and New background are Scene edit's).
if (mode === "swap" && !options.find((m) => m.id === id)?.actions) setAction("change");
+ // Motion transfer's MiniMax H3 takes up to 15 s: a longer selection is cut back to its first 15 s.
+ const most = mode === "motion" ? options.find((m) => m.id === id)?.part?.max : undefined;
+ if (most && range && range.endTime - range.startTime > most + 0.05) setRange({ ...range, endTime: Math.round((range.startTime + most) * 100) / 100 });
}}
onlyYou={(m) => !!m.features && !m.features.some((f) => !!live?.[f]) && owner}
/>
diff --git a/src/lib/catalog/genjutsu.ts b/src/lib/catalog/genjutsu.ts
index 0ca0ac57..d68939f8 100644
--- a/src/lib/catalog/genjutsu.ts
+++ b/src/lib/catalog/genjutsu.ts
@@ -157,7 +157,8 @@ export type GenjutsuFeature =
| "picture-own-person"
| "picture-h3-renderer"
| "finish-faces"
- | "finish-colours";
+ | "finish-colours"
+ | "motion-h3";
export const GENJUTSU_FEATURES: Record<GenjutsuFeature, { mode: GenjutsuMode; workflows: string[]; maker: string }> = {
"group-swap": { mode: "character", workflows: ["video-group-swap-h3"], maker: "oss-h3-group-swap" },
@@ -171,6 +172,7 @@ export const GENJUTSU_FEATURES: Record<GenjutsuFeature, { mode: GenjutsuMode; wo
"picture-h3-renderer": { mode: "picture", workflows: ["video-from-picture-h3"], maker: "oss-from-picture" },
"finish-faces": { mode: "finish", workflows: ["video-fix-faces-h3"], maker: "oss-h3-fix-faces" },
"finish-colours": { mode: "finish", workflows: ["video-fix-colours"], maker: "oss-fix-colours" },
+ "motion-h3": { mode: "motion", workflows: ["video-motion-transfer-h3"], maker: "oss-h3-motion" },
};
export const GENJUTSU_FEATURE_KEYS = Object.keys(GENJUTSU_FEATURES) as GenjutsuFeature[];
@@ -257,6 +259,7 @@ export function requestFeatures(o: { mode: GenjutsuMode; maker: Maker; character
];
}
if (m.tool) return [m.tool === "faces" ? "finish-faces" : "finish-colours"];
+ if (m.id === MOTION_H3) return ["motion-h3"];
return [];
}
@@ -284,6 +287,8 @@ export function directRunFeatures(modelId: string, settings: Record<string, unkn
return ["finish-faces"];
case "oss-fix-colours":
return ["finish-colours"];
+ case MOTION_H3:
+ return ["motion-h3"];
default:
return null;
}
@@ -363,6 +368,9 @@ const VACE_CLOUD_WINDOW: FrameWindow = { cap: 241, step: 4, base: 1, min: 17 };
const VACE_FUN_CLOUD = "wan-22-vace-inpaint";
const FAL_RES = ["480p", "580p", "720p"];
+/** Motion transfer on MiniMax H3 (your GPU): the character photo is the look, the part's normals the motion. */
+export const MOTION_H3 = "oss-h3-motion";
+
export const ORIGINALS = {
motion: "fuobe-genjutsu-motion",
motionLite: "fuobe-genjutsu-motion-lite",
@@ -481,6 +489,20 @@ export const MAKERS: Maker[] = [
qualities: ["480p", "720p"],
promptOptional: true,
},
+ {
+ id: MOTION_H3,
+ engine: "open",
+ modes: ["motion"],
+ label: "MiniMax H3",
+ note: "Your character in their photo's setting · keeps the clip's sound · 2–15 s · free on your GPU (24 GB)",
+ source: "open",
+ refs: { min: 1, max: 1 },
+ keepsSound: true,
+ qualities: ["480p", "720p"],
+ promptOptional: true,
+ features: ["motion-h3"],
+ part: { min: OPENJUTSU_LIMITS.minSeconds, max: OPENJUTSU_LIMITS.maxSeconds },
+ },
// Character swap (Openjutsu, Akatz Labs' H3 Character Swap).
{
@@ -1345,7 +1367,7 @@ export function planGenjutsu(input: GenjutsuPlanInput): GenjutsuPlan {
function planSteps(input: GenjutsuPlanInput): GenjutsuPlan {
const om = input.maker;
- if (om.group || om.actions || om.review || om.tool) return planOpenjutsu(input);
+ if (om.group || om.actions || om.review || om.tool || om.id === MOTION_H3) return planOpenjutsu(input);
if (input.mode === "character" && input.maker.h3) return planCharacterSwap(input);
if (input.mode === "restyle" && input.maker.id === ORIGINALS.restyle && input.maker.engine === "cloud") return planCloudRestyle(input);
if (input.mode === "restyle" && input.maker.looks === "fuobe") return planFuobeRestyle(input);
@@ -1753,7 +1775,7 @@ export function sceneWords(o: ObjectEdit | undefined, subject?: string): { targe
}
/**
- * Group swap, Scene edit, From picture and Finish on your GPU: the part fitted first (24 fps, the quality's short edge,
+ * Group swap, Scene edit, From picture, Finish and Motion transfer's MiniMax H3 on your GPU: the part fitted first (24 fps, the quality's short edge,
* the clip's sound: video-fit-clip, so ComfyUI never decodes more of the clip than it needs), then one job on the
* Openjutsu graph with its settings (params.extra.openjutsu). From picture's first frame reads the clip itself (one frame).
*/
@@ -1820,6 +1842,21 @@ function planOpenjutsu(input: GenjutsuPlanInput): GenjutsuPlan {
);
return { steps, final: "edit", pieces: 1, sound: false, tracked: false };
}
+ if (m.id === MOTION_H3) {
+ // The character photo is H3's look reference (not a first frame), so there is nothing to approve first.
+ const refs = input.references.slice(0, 1);
+ if (!refs.length) throw new Error(REFS_MISSING.motion);
+ fit(sized(quality === "720p" ? 736 : 480));
+ steps.push(
+ job("motion", "motion-transfer", "Transfer the motion", refs, {
+ seconds: r3(end - start),
+ quality,
+ motion: 0,
+ scene: (input.prompt ?? "").trim().slice(0, OPENJUTSU_LIMITS.sceneChars),
+ }),
+ );
+ return { steps, final: "motion", pieces: 1, sound: false, tracked: false };
+ }
if (m.review) {
const p = input.picture ?? { stage: "frame" as const };
if (p.stage === "frame") {
diff --git a/src/lib/catalog/models.ts b/src/lib/catalog/models.ts
index c9fe0af5..1409f5ae 100644
--- a/src/lib/catalog/models.ts
+++ b/src/lib/catalog/models.ts
@@ -1226,6 +1226,17 @@ const open: ModelDef[] = [
routes: [comfy("picture-video", "video-from-picture-solar", "SolarRenderer: MiniMax H3 with its 4-step and control LoRAs, Metric3D normals as the motion (or native H3 + DMAD)")],
options: { seed: true, resolutions: ["480p", "720p"], maxImages: 1 },
}),
+ o({
+ id: "oss-h3-motion",
+ name: "MiniMax H3",
+ vendor: "MiniMax × Openjutsu",
+ family: "minimax-h3",
+ kind: "video",
+ tagline: "Your character from one photo performs the clip's movement in the photo's own setting · the clip's sound kept · 24 GB GPU",
+ hidden: true,
+ routes: [comfy("motion-transfer", "video-motion-transfer-h3", "Native MiniMax H3 + DMAD: the character photo as the look, the part's Metric3D normals as the motion")],
+ options: { seed: true, resolutions: ["480p", "720p"], maxImages: 1 },
+ }),
o({
id: "oss-h3-fix-faces",
name: "Fix faces",
diff --git a/src/lib/openjutsu-graphs.ts b/src/lib/openjutsu-graphs.ts
index 81457a83..33697c48 100644
--- a/src/lib/openjutsu-graphs.ts
+++ b/src/lib/openjutsu-graphs.ts
@@ -555,6 +555,8 @@ export const OPENJUTSU_WORKFLOWS = {
describe: "video-scene-describe",
solar: "video-from-picture-solar",
h3: "video-from-picture-h3",
+ /** Motion transfer's MiniMax H3: the From picture H3 graph with the character photo itself as Picture 1. */
+ motionH3: "video-motion-transfer-h3",
faces: "video-fix-faces-h3",
colours: "video-fix-colours",
} as const;
@@ -615,12 +617,13 @@ export function openjutsuGraph(id: string, wf: ComfyWorkflow, o: OpenjutsuSettin
case OPENJUTSU_WORKFLOWS.describe:
return describeScene(wf, { frames: pictureFrames(num(o.seconds, 6)), ownPerson: o.ownPerson === true });
case OPENJUTSU_WORKFLOWS.solar:
- case OPENJUTSU_WORKFLOWS.h3: {
+ case OPENJUTSU_WORKFLOWS.h3:
+ case OPENJUTSU_WORKFLOWS.motionH3: {
const w = ctx.clip?.width;
const h = ctx.clip?.height;
if (!w || !h) throw new Error("Couldn't read the clip's size to make the video.");
const motion = o.motion === 512 || o.motion === 768 ? o.motion : 0;
- return pictureVideo(wf, { renderer: id === OPENJUTSU_WORKFLOWS.h3 ? "h3" : "solar", seconds: num(o.seconds, 6), width: w, height: h, quality: str(o.quality, "480p"), motion, seed, description: str(o.scene) });
+ return pictureVideo(wf, { renderer: id === OPENJUTSU_WORKFLOWS.solar ? "solar" : "h3", seconds: num(o.seconds, 6), width: w, height: h, quality: str(o.quality, "480p"), motion, seed, description: str(o.scene) });
}
case OPENJUTSU_WORKFLOWS.faces:
return pruneFace(wf, { style: o.faceStyle === "photo" ? "photo" : "mouth", seed, chunkSeconds: (CHUNK_SECONDS as readonly number[]).includes(num(o.chunkSeconds, 6.5)) ? num(o.chunkSeconds, 6.5) : 6.5 });
diff --git a/src/server/genjutsu.ts b/src/server/genjutsu.ts
index 613a741a..e9663c73 100644
--- a/src/server/genjutsu.ts
+++ b/src/server/genjutsu.ts
@@ -29,6 +29,7 @@ import {
GENJUTSU,
getMaker,
modeOpen,
+ MOTION_H3,
OPENJUTSU_LIMITS,
requestFeatures,
type FeatureCheck,
@@ -418,7 +419,7 @@ function notesFor(body: GenjutsuBody, m: Maker, source: RemoveSource, range: Rem
const fps = source.fps ?? 30;
const fuobeLook = body.mode === "restyle" && m.looks === "fuobe";
const len = range.end - range.start;
- if (m.group || m.actions || m.review || m.tool) {
+ if (m.group || m.actions || m.review || m.tool || m.id === MOTION_H3) {
notes.push(...openjutsuNotes(body, m, range));
return notes;
}
@@ -510,6 +511,9 @@ function openjutsuNotes(body: GenjutsuBody, m: Maker, range: RemoveRange): strin
} else if (m.actions) {
notes.push(`About ${minutes(50)} min on your GPU · keeps the clip's sound`);
if (body.object?.action === "background") notes.push("The people stay exactly as filmed");
+ } else if (m.id === MOTION_H3) {
+ notes.push(`About ${minutes(60)} min on your GPU · keeps the clip's sound`);
+ notes.push("Your character performs the clip's moves in their photo's own setting");
} else if (m.review) {
notes.push(body.picture?.stage === "video" ? `About ${minutes(60)} min on your GPU · keeps the clip's sound` : "The first frame takes about a minute: check it before the video is made");
} else if (m.tool === "faces") {
diff --git a/tests/comfy-library-4.test.ts b/tests/comfy-library-4.test.ts
index 0dba22e1..7cd53127 100644
--- a/tests/comfy-library-4.test.ts
+++ b/tests/comfy-library-4.test.ts
@@ -171,6 +171,7 @@ describe("round-4 ComfyUI workflows", () => {
"video-scene-describe",
"video-from-picture-solar",
"video-from-picture-h3",
+ "video-motion-transfer-h3",
"video-fix-faces-h3",
"video-fix-colours",
]);
diff --git a/tests/comfy-openjutsu-modes.test.ts b/tests/comfy-openjutsu-modes.test.ts
index 6e6c208b..5ee421b4 100644
--- a/tests/comfy-openjutsu-modes.test.ts
+++ b/tests/comfy-openjutsu-modes.test.ts
@@ -63,6 +63,8 @@ describe("the Openjutsu graphs in the library", () => {
it("the models Genjutsu runs point at them, one by one and the H3 renderer as variants", () => {
expect(getModel("oss-h3-group-swap")!.routes[0].endpoint).toBe(OPENJUTSU_WORKFLOWS.group);
expect(getModel("oss-from-picture")!.routes[0].endpoint).toBe(OPENJUTSU_WORKFLOWS.solar);
+ expect(getModel("oss-h3-motion")!.routes[0]).toMatchObject({ op: "motion-transfer", provider: "comfyui", endpoint: OPENJUTSU_WORKFLOWS.motionH3 });
+ expect(getModel("oss-h3-motion")!.name).toBe("MiniMax H3");
const has = () => true;
const r = (endpoint: string, extra: Record<string, unknown>) => resolveWorkflowId(endpoint, { op: "x", clips: 0, images: 0, audio2: false, extra, has });
expect(r(OPENJUTSU_WORKFLOWS.group, { openjutsu: { onePerPerson: true } })).toBe(OPENJUTSU_WORKFLOWS.groupOneByOne);
diff --git a/tests/e2e/genjutsu-motion-h3.mjs b/tests/e2e/genjutsu-motion-h3.mjs
new file mode 100644
index 00000000..74d06823
--- /dev/null
+++ b/tests/e2e/genjutsu-motion-h3.mjs
@@ -0,0 +1,125 @@
+// Motion transfer's "MiniMax H3" model choice, browser check at 390 and 1440 px.
+// Owner (a studio without a password): Motion transfer's Model list on your GPU shows Fuobe Genjutsu first, then
+// MiniMax H3 marked "Only you"; picking it says 2–15 s, the price check runs it on MiniMax H3 and refuses 20 s in words.
+// With --guest or --account (a studio with a password and public sign-up; the account signs up and has no GPU or key,
+// so neither adds files; MiniMax H3 not open yet): the page never names MiniMax H3, the price check for it answers
+// "That isn't available here.", and Fuobe Genjutsu's is never refused that way.
+// --open: MiniMax H3 has opened (gpu-tested.json), so a visitor sees it too and its price check answers.
+// Nothing scrolls sideways.
+// Usage: node tests/e2e/genjutsu-motion-h3.mjs [appUrl] [--guest | --account] [--open] [--shots <dir>]. Exits 1 on a failed check.
+import fs from "node:fs";
+import path from "node:path";
+import { launch, root } from "./_browser.mjs";
+
+const argv = process.argv.slice(2);
+const app = (argv.find((a) => !a.startsWith("--") && argv[argv.indexOf(a) - 1] !== "--shots") ?? "http://localhost:3000").replace(/\/$/, "");
+const who = argv.includes("--guest") ? "guest" : argv.includes("--account") ? "account" : "owner";
+const opened = argv.includes("--open");
+const shots = argv.includes("--shots") ? argv[argv.indexOf("--shots") + 1] : undefined;
+if (shots) fs.mkdirSync(shots, { recursive: true });
+
+const failures = [];
+const check = (label, ok, extra = "") => {
+ console.log(`${ok ? "ok " : "FAIL"} ${label.padEnd(76)}${extra ? ` ${extra}` : ""}`);
+ if (!ok) failures.push(label);
+};
+const H3 = "oss-h3-motion";
+const NOT_HERE = "That isn't available here.";
+
+async function upload(request, file, type, name) {
+ const res = await request.post(`${app}/api/uploads`, { multipart: { file: { name, mimeType: type, buffer: fs.readFileSync(path.join(root, file)) } } });
+ if (!res.ok()) throw new Error(`upload failed: ${res.status()}`);
+ return (await res.json()).url;
+}
+const estimate = (request, body) => request.post(`${app}/api/genjutsu/estimate`, { data: body, failOnStatusCode: false });
+const motionBody = (clip, pic, modelId) => ({
+ engine: "open",
+ mode: "motion",
+ ...(modelId ? { modelId } : {}),
+ quality: "720p",
+ references: [pic],
+ source: { url: clip, duration: 6, fps: 24, width: 1024, height: 768, hasAudio: true },
+ range: { start: 0, end: 6 },
+});
+
+const browser = await launch();
+try {
+ for (const [width, height] of [
+ [390, 844],
+ [1440, 900],
+ ]) {
+ const context = await browser.newContext({ viewport: { width, height }, ...(width < 500 ? { isMobile: true, hasTouch: true } : {}) });
+ await context.addInitScript(() => {
+ try {
+ localStorage.setItem("fuobe.engine", "open");
+ } catch {}
+ });
+ const page = await context.newPage();
+ const request = context.request;
+ const shot = async (name) => shots && (await page.screenshot({ path: path.join(shots, `${who}-${name}-${width}.png`), fullPage: true }));
+ const sideways = () => page.evaluate(() => document.documentElement.scrollWidth - document.documentElement.clientWidth);
+ const open = async (url) => {
+ await page.goto(`${app}${url}`, { waitUntil: "load", timeout: 180_000 });
+ await page.getByRole("tablist", { name: "Genjutsu modes" }).waitFor({ timeout: 120_000 });
+ await page.waitForTimeout(1500);
+ };
+ const models = page.getByRole("radiogroup", { name: "Model" }).getByRole("radio");
+
+ if (who === "account") {
+ // Public sign-up: the account's cookie lands in this browser context.
+ const res = await request.post(`${app}/api/auth/signup`, { data: { email: `motion-h3-${width}-${Date.now()}@example.com`, password: `Mh3-${Date.now()}-check!` }, failOnStatusCode: false });
+ check(`${width}: an account signs up`, res.ok(), String(res.status()));
+ }
+
+ if (who !== "owner") {
+ // A visitor (a guest, or an account with no GPU or key) adds no files: the page and the price check only.
+ await open("/genjutsu");
+ const text = await page.evaluate(() => document.body.innerText);
+ check(`${width}: ${who === "account" ? "an" : "a"} ${who}'s Genjutsu names MiniMax H3 only once it opens`, text.includes("MiniMax H3") === false || opened, opened ? "open" : "");
+ check(`${width}: /genjutsu fits the screen`, (await sideways()) <= 0);
+ await shot("genjutsu");
+ // The price check refuses a model that isn't open before it reads any file.
+ const res = await estimate(request, motionBody("/api/files/none.mp4", "/api/files/none.png", H3));
+ const said = (await res.text()).slice(0, 200);
+ if (opened) check(`${width}: ${who === "account" ? "an" : "a"} ${who}'s price check for MiniMax H3 isn't refused as not here`, !said.includes(NOT_HERE), `${res.status()} ${said}`);
+ else check(`${width}: ${who === "account" ? "an" : "a"} ${who}'s price check for MiniMax H3: "${NOT_HERE}"`, res.status() === 422 && said.includes(NOT_HERE), `${res.status()} ${said}`);
+ const original = await estimate(request, motionBody("/api/files/none.mp4", "/api/files/none.png"));
+ const its = (await original.text()).slice(0, 200);
+ check(`${width}: Fuobe Genjutsu's price check isn't refused as not here`, !its.includes(NOT_HERE), `${original.status()} ${its}`);
+ } else {
+ const clip = await upload(request, "scripts/eval/fixtures/walk-6s.mp4", "video/mp4", "walk.mp4");
+ const pic = await upload(request, "scripts/eval/fixtures/character/drawn-face-2.png", "image/png", "character.png");
+ await open(`/genjutsu?video=${encodeURIComponent(clip)}&image=${encodeURIComponent(pic)}`);
+ await page.waitForFunction(() => document.body.innerText.includes("Fuobe Genjutsu"), null, { timeout: 120_000 }).catch(() => {});
+ await models.first().waitFor({ timeout: 60_000 }).catch(() => {});
+ const labels = (await models.allInnerTexts()).map((t) => t.split("\n")[0].trim());
+ check(`${width}: Model: Fuobe Genjutsu first, then MiniMax H3`, /^Fuobe Genjutsu/.test(labels[0] ?? "") && labels.some((l) => l.startsWith("MiniMax H3")), JSON.stringify(labels));
+ const h3 = models.filter({ hasText: "MiniMax H3" });
+ const onlyYou = (await h3.innerText()).includes("Only you");
+ check(`${width}: MiniMax H3 is marked "Only you" ${opened ? "no more" : "until it opens"}`, onlyYou === !opened);
+ check(`${width}: the tab and the modes keep their names`, (await page.getByRole("tab", { selected: true }).innerText()).replace(/Only you$/, "").trim() === "Motion transfer");
+ await h3.click();
+ await page.waitForTimeout(800);
+ check(`${width}: MiniMax H3 picked`, (await h3.getAttribute("aria-checked")) === "true");
+ check(`${width}: the part's hint says 2–15 s`, await page.getByText("2–15 s; the whole clip, or just the part you need").isVisible().catch(() => false));
+ check(`${width}: MiniMax H3 fits the screen`, (await sideways()) <= 0);
+ await shot("motion-h3");
+ const res = await estimate(request, motionBody(clip, pic, H3));
+ const est = await res.json().catch(() => ({}));
+ check(`${width}: the price check runs it on MiniMax H3`, res.ok() && est.modelId === H3 && est.modelName === "MiniMax H3", `${res.status()} ${JSON.stringify(est).slice(0, 160)}`);
+ const notes = (est.notes ?? []).join(" | ");
+ check(`${width}: its notes give the time and the sound, and name no other model`, /min on your GPU · keeps the clip's sound/.test(notes) && !/Wan Animate/.test(notes), notes);
+ check(`${width}: the page names no other model's GPU`, !(await page.evaluate(() => document.body.innerText)).includes("Wan Animate 2 needs"));
+ const long = await estimate(request, { ...motionBody(clip, pic, H3), source: { url: clip, duration: 30, fps: 24, width: 1024, height: 768, hasAudio: true }, range: { start: 0, end: 20 } });
+ check(`${width}: more than 15 s is refused in words`, long.status() === 422 && (await long.text()).includes("Pick a part between 2 and 15 seconds"), String(long.status()));
+ }
+ await context.close();
+ }
+} finally {
+ await browser.close();
+}
+if (failures.length) {
+ console.log(`\n${failures.length} failed`);
+ process.exit(1);
+}
+console.log("\nall good");
diff --git a/tests/genjutsu-openjutsu.test.ts b/tests/genjutsu-openjutsu.test.ts
index e6a01163..6ad55a5a 100644
--- a/tests/genjutsu-openjutsu.test.ts
+++ b/tests/genjutsu-openjutsu.test.ts
@@ -2,6 +2,7 @@ import { describe, expect, it } from "vitest";
import {
chooseMaker,
decodeSetup,
+ directRunFeatures,
encodeSetup,
fitSize,
GENJUTSU_FEATURES,
@@ -10,6 +11,7 @@ import {
getMaker,
makersFor,
modeOpen,
+ MOTION_H3,
ORIGINALS,
planGenjutsu,
requestFeatures,
@@ -41,7 +43,53 @@ describe("Genjutsu: the Openjutsu modes", () => {
for (const mode of ["character", "swap", "picture", "finish"] as const) {
for (const m of makersFor("open", mode, mode === "swap" || mode === "character" ? "type" : undefined, none)) expect(m.features, m.id).toBeUndefined();
}
- expect(Object.keys(GENJUTSU_FEATURES)).toHaveLength(11);
+ expect(Object.keys(GENJUTSU_FEATURES)).toHaveLength(12);
+ });
+
+ it("Motion transfer's MiniMax H3: a model choice the owner sees after the Original, a visitor only once it opens", () => {
+ const h3 = open(MOTION_H3);
+ expect(h3).toMatchObject({ label: "MiniMax H3", modes: ["motion"], source: "open", refs: { min: 1, max: 1 }, keepsSound: true, qualities: ["480p", "720p"], features: ["motion-h3"], part: { min: 2, max: 15 } });
+ expect(GENJUTSU_FEATURES["motion-h3"]).toEqual({ mode: "motion", workflows: ["video-motion-transfer-h3"], maker: MOTION_H3 });
+ expect(makersFor("open", "motion").map((m) => m.id)).toEqual([ORIGINALS.motionLite, MOTION_H3]);
+ expect(makersFor("open", "motion", undefined, none).map((m) => m.id)).toEqual([ORIGINALS.motionLite]);
+ expect(makersFor("open", "motion", undefined, (f) => f === "motion-h3").map((m) => m.id)).toEqual([ORIGINALS.motionLite, MOTION_H3]);
+ expect(makersFor("cloud", "motion").map((m) => m.id)).not.toContain(MOTION_H3);
+ // The Original stays the default; H3 runs when picked (the owner, or anyone once it opens).
+ expect(chooseMaker({ engine: "open", mode: "motion" })).toMatchObject({ maker: { id: ORIGINALS.motionLite } });
+ expect(chooseMaker({ engine: "open", mode: "motion", modelId: MOTION_H3 })).toMatchObject({ maker: { id: MOTION_H3 } });
+ expect(chooseMaker({ engine: "open", mode: "motion", modelId: MOTION_H3, open: none })).toMatchObject({ maker: { id: ORIGINALS.motionLite } });
+ expect(requestFeatures({ mode: "motion", maker: h3 })).toEqual(["motion-h3"]);
+ expect(directRunFeatures(MOTION_H3, { seconds: 5 })).toEqual(["motion-h3"]);
+ const code = encodeSetup({ mode: "motion", engine: "open", model: MOTION_H3 });
+ expect(decodeSetup(code)?.model).toBe(MOTION_H3);
+ expect(decodeSetup(code, none)?.model).toBeUndefined();
+ });
+
+ it("Motion transfer's MiniMax H3: 2–15 s, one character photo, then the part at 24 fps and one job on the H3 graph", () => {
+ const h3 = open(MOTION_H3);
+ const c = (o: Partial<Parameters<typeof genjutsuProblem>[0]> = {}) => genjutsuProblem({ mode: "motion", maker: h3, source, range: { start: 0, end: 6 }, references: 1, ...o });
+ expect(c()).toBeNull();
+ expect(c({ references: 0 })).toBe("Add a picture of your character");
+ expect(c({ range: { start: 0, end: 1.5 } })).toBe("Pick a part between 2 and 15 seconds");
+ expect(c({ range: { start: 0, end: 16 } })).toBe("Pick a part between 2 and 15 seconds");
+ expect(c({ range: { start: 2, end: 17 } })).toBeNull();
+
+ const p = oj({ mode: "motion", maker: h3, references: [ref, "/api/files/two.png"], seed: 9, prompt: "She smiles at the end." });
+ expect(p.steps.map((s) => s.key)).toEqual(["part", "motion"]);
+ expect(step(p, "part").request).toMatchObject({ modelId: "oss-fit-clip", op: "trim", params: { startTime: 2, endTime: 8, fps: 24, extra: { width: 1308, height: 736 } } });
+ const job = step(p, "motion");
+ expect(job.request).toMatchObject({ modelId: MOTION_H3, op: "motion-transfer", feature: "genjutsu", inputs: { images: [ref] }, params: { seed: 9, resolution: "720p" } });
+ expect(job.request.params?.extra?.openjutsu).toEqual({ seconds: 6, quality: "720p", motion: 0, scene: "She smiles at the end.", seed: 9 });
+ expect(job.after).toEqual(["part"]);
+ expect(job.chain).toEqual([{ slot: "video" }]);
+ expect(p).toMatchObject({ final: "motion", pieces: 1, sound: false });
+ // The graph keeps the part's sound itself: nothing is put back afterwards.
+ expect(p.steps.map((s) => s.request.modelId)).not.toContain("oss-mux");
+
+ const small = oj({ mode: "motion", maker: h3, references: [ref], quality: "480p" });
+ expect(step(small, "part").request.params?.extra).toEqual({ width: 854, height: 480 });
+ expect(step(small, "motion").request.params?.extra?.openjutsu).toMatchObject({ quality: "480p", scene: "" });
+ expect(() => oj({ mode: "motion", maker: h3, references: [] })).toThrow(/picture of your character/);
});
it("two characters or more move the swap to Group swap on your GPU (Recast in the cloud); one stays Fuobe's", () => {
diff --git a/tests/openjutsu-graphs.test.ts b/tests/openjutsu-graphs.test.ts
index 65a8fd16..726ffae9 100644
--- a/tests/openjutsu-graphs.test.ts
+++ b/tests/openjutsu-graphs.test.ts
@@ -176,6 +176,39 @@ describe("From picture's graphs", () => {
});
});
+describe("Motion transfer's MiniMax H3 graph", () => {
+ it("is From picture's H3 graph with the character photo as Picture 1, in the photo's setting", () => {
+ const g = graph(W.motionH3);
+ const picture = graph(W.h3);
+ expect(Object.keys(g).sort()).toEqual(Object.keys(picture).sort());
+ for (const id of Object.keys(g)) expect(g[id].class_type, id).toBe(picture[id].class_type);
+ expect(g["20"]).toMatchObject({ class_type: "LoadImage", _meta: { title: "Character photo" } });
+ expect(g["56"].inputs["ref_images.ref_image_0"]).toEqual(["20", 0]);
+ expect(g["56"].inputs.ref_image_size).toBe("match");
+ const prompt = String(g["56"].inputs.prompt);
+ expect(prompt).toMatch(/^subject_definitions:\n<Picture 1> defines the character's identity, face, hair, body and complete outfit, and the setting/);
+ expect(prompt).toContain("inside the setting of <Picture 1>");
+ expect(prompt).toContain("overall_soundscape:\nReuse <Audio 1> exactly as it is.");
+ // Only what is wanted: the picture is never called a first frame, and no negatives.
+ expect(prompt).not.toMatch(/first frame you|approved|prepared|\bno\b|\bnot\b|\bwithout\b|\bavoid\b/i);
+ expect(danglingLinks(g)).toEqual([]);
+ });
+
+ it("takes the settings as From picture's H3 video does: frames on the grid, the clip's shape, the words opening the description", () => {
+ const g = openjutsuGraph(W.motionH3, graph(W.motionH3), { seconds: 5.17, quality: "720p", motion: 0, seed: 1001, scene: "She lifts her hat at the end." }, { generationId: "g1", clip: { width: 1024, height: 768 } });
+ expect(g["1"].inputs.frame_load_cap).toBe(124);
+ expect(g["56"].inputs).toMatchObject({ width: 992, height: 736, length: 124 });
+ expect(g["33"].inputs).toMatchObject({ width: 992, height: 736 });
+ expect(g["58"].inputs.noise_seed).toBe(1001);
+ expect(g["60"].inputs.steps).toBe(6);
+ expect(String(g["56"].inputs.prompt)).toContain("detailed_description:\nShe lifts her hat at the end. From the first frame the character holds the motion guide's first pose");
+ const small = openjutsuGraph(W.motionH3, graph(W.motionH3), { seconds: 15, quality: "480p" }, { generationId: "g2", clip: { width: 1920, height: 1080 } });
+ expect(small["56"].inputs).toMatchObject({ width: 864, height: 480, length: 345 });
+ expect(() => openjutsuGraph(W.motionH3, graph(W.motionH3), {}, { generationId: "g3" })).toThrow(/clip's size/);
+ expect(openjutsuLeftOut(W.motionH3, {})).toEqual([]);
+ });
+});
+
describe("Finish's graphs", () => {
it("Fix faces: match the photo drops the blurred face; largest_face; sections", () => {
const photo = pruneFace(graph(W.faces), { style: "photo", seed: 2, chunkSeconds: 4 });
diff --git a/workflows/comfyui/manifest.json b/workflows/comfyui/manifest.json
index 221178da..d1b4b9da 100644
--- a/workflows/comfyui/manifest.json
+++ b/workflows/comfyui/manifest.json
@@ -25679,6 +25679,108 @@
"Metric3D vit-small (metric_depth_vit_small_800k.pth) -> custom_nodes/comfyui_controlnet_aux/ckpts/JUGGHM/Metric3D (fetched on first run unless placed there)"
]
},
+ {
+ "id": "video-motion-transfer-h3",
+ "title": "Motion transfer on native MiniMax H3 (DMAD, 6 steps): the character photo as the look, the part's Metric3D normals as the motion, the clip's sound kept",
+ "capability": "motion-transfer",
+ "file": "video-motion-transfer-h3.json",
+ "source": "hand-built (scripts/comfy/hand-built/video-motion-transfer-h3.json)",
+ "bindings": {
+ "video": [
+ {
+ "node": "1",
+ "input": "video"
+ }
+ ],
+ "image": [
+ {
+ "node": "20",
+ "input": "image"
+ }
+ ],
+ "filenamePrefix": [
+ {
+ "node": "63",
+ "input": "filename_prefix"
+ }
+ ]
+ },
+ "outputs": [
+ {
+ "node": "63",
+ "kind": "video"
+ }
+ ],
+ "defaults": {},
+ "limits": {
+ "maxDurationSec": 15
+ },
+ "models": [
+ {
+ "file": "minimax_h3_ref2va_pruned_int8_convrot.safetensors",
+ "folder": "diffusion_models",
+ "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors",
+ "sizeGb": 20.97
+ },
+ {
+ "file": "minimax_h3_DMAD_4step_full_lora_avg_rank_39_bf16.safetensors",
+ "folder": "loras",
+ "url": "https://huggingface.co/Kijai/MiniMax-H3-experimental/resolve/f5c3b1d5a63e008a691fca1b6096fd57a5307536/loras/minimax_h3_DMAD_4step_full_lora_avg_rank_39_bf16.safetensors",
+ "sizeGb": 0.37
+ },
+ {
+ "file": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
+ "folder": "text_encoders",
+ "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
+ "sizeGb": 15.69
+ },
+ {
+ "file": "minimax_h3_video_vae_int8_convrot.safetensors",
+ "folder": "vae",
+ "url": "https://huggingface.co/Kijai/MiniMax-H3-experimental/resolve/f5c3b1d5a63e008a691fca1b6096fd57a5307536/minimax_h3_video_vae_int8_convrot.safetensors",
+ "sizeGb": 3.17
+ },
+ {
+ "file": "minimax_h3_audio_vae_fp32.safetensors",
+ "folder": "vae",
+ "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/1c41cfca8ebba91d0af792a05c5761fb2c3a7975/vae/minimax_h3_audio_vae_fp32.safetensors",
+ "sizeGb": 0.61
+ }
+ ],
+ "customNodes": [
+ {
+ "name": "ComfyUI-Fantastic-MiniMaxH3-PromptBuilder",
+ "repo": "https://github.com/Adudeguyman/ComfyUI-Fantastic-MiniMaxH3-PromptBuilder/tree/22e719fe89336c628383363182a4da3cb58d4f9b"
+ },
+ {
+ "name": "ComfyUI-KJNodes",
+ "repo": "https://github.com/kijai/ComfyUI-KJNodes"
+ },
+ {
+ "name": "ComfyUI-MiniMaxH3-Context-Loop",
+ "repo": "https://github.com/ethanfel/ComfyUI-MiniMaxH3-Context-Loop/tree/43afeffcc570beb5f7382593e79e4b211c7e02f6"
+ },
+ {
+ "name": "ComfyUI-VideoHelperSuite",
+ "repo": "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite"
+ },
+ {
+ "name": "comfyui-h3-oneclick-swap",
+ "repo": "https://github.com/D3voz/comfyui-h3-oneclick-swap/tree/e44a56e92920000e675d14be484aea0d7498d63e"
+ },
+ {
+ "name": "comfyui_controlnet_aux",
+ "repo": "https://github.com/Fannovel16/comfyui_controlnet_aux/tree/a587a4c1594524c1d2de5cd1a86cd868ff448e1c"
+ }
+ ],
+ "vramGb": 24,
+ "license": "MiniMax H3 Community License (H3 Ref2VA, its VAEs, the packaged Qwen3-VL text encoder, the DMAD LoRA derived from it): territory EXCLUDES the US, the EU, the UK and South Korea; commercial use above US$20M yearly revenue needs MiniMax's written authorization; show \"MiniMax H3\" on the product's interface; no outputs used to improve other AI models · Qwen3-VL 8B describer Apache-2.0 · SAM 3.1 under Meta's SAM License · graphs from D3voz/openjutsu (MIT) · Context Loop nodes GPL-3.0, Fantastic PromptBuilder MIT, H3 OneClick Swap MIT · Metric3D BSD-2-Clause",
+ "validated": false,
+ "notes": "Genjutsu Motion transfer's \"MiniMax H3\" model (oss-h3-motion): video-from-picture-h3 with the character photo itself as Picture 1 (no prepared first frame) and words that put the character in the photo's setting. video = the part fitted at 24 fps, image = the character photo. params.extra.openjutsu: seconds, quality 480p | 720p, motion 0 | 512 | 768, seed (the same settings as From picture's video).",
+ "autoDownloads": [
+ "Metric3D vit-small (metric_depth_vit_small_800k.pth) -> custom_nodes/comfyui_controlnet_aux/ckpts/JUGGHM/Metric3D (fetched on first run unless placed there)"
+ ]
+ },
{
"id": "video-fix-faces-h3",
"title": "Fix faces: H3-FaceRefine tracks the character's face, MiniMax H3 redraws it in overlapping sections and it is pasted back (faces over 20 % of the frame are left alone)",
diff --git a/workflows/comfyui/requirements.json b/workflows/comfyui/requirements.json
index 0940a8f3..db71c835 100644
--- a/workflows/comfyui/requirements.json
+++ b/workflows/comfyui/requirements.json
@@ -1,6 +1,6 @@
{
"v": 1,
- "hash": "f1227447c9269c8a200b00ee6bba5fe3ab84aa885a980acb09d765bc3cae7b82",
+ "hash": "e4952cc83ec3bd1d85076e85f4879f748688d86fe2fa4fdc630accc84eaf6226",
"comfyui": {"min":"0.42.0","testedCommit":"5841c187"},
"folders": ["audio_encoders","background_removal","checkpoints","clip_vision","dbs","diffusion_models","facerestore_models","foley","frame_interpolation","geometry_estimation","insightface","latent_upscale_models","loras","mmaudio","model_patches","optical_flow","reuse","text_encoders","thinksound","upscale_models","vae"],
"sentinels": ["AILab_Qwen3ASRSubtitle","AILab_Qwen3TTSVoiceClone_Advanced","AILab_Qwen3TTSVoiceDesign_Advanced","AUSBOSS_NODES_CropForInpaint","AUSBOSS_NODES_ImageCropRotatePad","AUSBOSS_NODES_MaskByTouch","AUSBOSS_NODES_StitchInpaint","Add Subtitles To Frames","Apply Whisper","CFGOverride","ClothesSegment","ComfyMathExpression","CropFuobeLive","DBSLoader","DBSSeparate","DownloadAndLoadWav2VecModel","DualModelGuider","FL_ChatterboxDialogTTS","FL_ChatterboxMultilingualTTS","FL_ChatterboxVC","GetImageRangeFromBatch","GetImageSizeAndCount","GrowMaskWithBlur","H3AdaLNLoRAFix","H3AdvancedSwapPlan","H3CharacterSwapAssemble","H3CharacterSwapController","H3CharacterSwapExpandMask","H3CharacterSwapModels","H3CharacterSwapPrepareVideo","H3CharacterSwapRecoverMasks","H3CharacterSwapSelectSubject","H3CharacterSwapSettings","H3CharacterSwapShot","H3CharacterSwapWindowPlan","H3ClipShots","H3FaceChunks","H3FaceJoin","H3FaceMaskSAM","H3FaceStitch","H3FaceTrackCrop","H3FillShots","H3GreyMannequins","H3ObjectSwapPlan","H3PeopleMask","H3RelayAppendWindow","H3RelayApplyEditMask","H3RelayApplyHistory","H3RelayExpandMask","H3RelayFinishWindows","H3RelayPrepareSource","H3RelayRecoverMasks","H3RelayReviewWindows","H3RelaySamplingMemory","H3RelaySelectMask","H3RelayTextMemory","H3RelayWindowInputs","H3RelayWindowPlan","H3RoleMask","H3SLAAttention","H3SoundtrackOrSilence","H3SourceSlice","H3SubjectPrompt","H3TrackCrops","H3TrackRoles","HunyuanDependenciesLoader","HunyuanFoleySampler","HunyuanModelLoader","INTConstant","Ideogram4Scheduler","ImageBatchExtendWithOverlap","ImageDetailContrast","ImageGridtoBatch","ImageResizeKJv2","IndexTTS2Simple","Krea2EditGroundedEncode","Krea2EditModelPatch","Krea2OstrisEditModelPatch","LTXAVTextEncoderLoader","LTXAddVideoICLoRAGuide","LTXICLoRALoaderModelOnly","LTXVAddGuide","LTXVAudioVAEDecode","LTXVAudioVAELoader","LTXVConcatAVLatent","LTXVConditioning","LTXVCropGuides","LTXVDualCFGGuider","LTXVEmptyLatentAudio","LTXVImgToVideoInplace","LTXVLatentUpsampler","LTXVPreprocess","LTXVScheduler","LTXVSeparateAVLatent","LTXVTiledFusionSampler","LatentSyncNode","LoadBackgroundRemovalModel","LoadImageFuobeLive","LoadVideoDepthAnythingModel","MMAudioFeatureUtilsLoader","MMAudioModelLoader","MMAudioSampler","MelBandRoFormerModelLoader","MelBandRoFormerSampler","Metric3D-NormalMapPreprocessor","MiniMaxH3ChainAssemble","MiniMaxH3ChainContext","MiniMaxH3ChainCurrent","MiniMaxH3ChainLoopEnd","MiniMaxH3ChainLoopStart","MiniMaxH3ChainPlanModern","MiniMaxH3ChainReview","MiniMaxH3ChainSegmentSave","MiniMaxH3ContexMaskedTarget","MiniMaxH3FantasticVideoEditLatent","MiniMaxH3GenerationProfile","MiniMaxH3LoopTrim","MiniMaxH3SourceTimeline","MiniMaxH3TurboLoRA","MiniMaxH3TurboSampler","MultiTalkModelLoader","MultiTalkWav2VecEmbeds","OpenH3RegenFastVAEDecode","OpenH3RegenFinish","OpenH3RegenLora","OpenH3RegenPrepareDraft","OpenH3RegenRefineLatent","OpenH3RegenSigmas","OpenH3RegenUpscale","OpenH3SaveRefinedLatent","Orion4D_FXMax_DCTLToneMapper","PasteBackFuobeLive","Qwen21EncodeFuobeLive","Qwen21ReferenceFuobeLive","QwenImage21Cache","REUSEEnhance","REUSELoader","RIFE VFI","RMBG","ReActorFaceSwap","RemoveBackground","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SAMLoader","SaveImageFuobeLive","SeedVR2Conditioning","SeedVR2PostProcessing","SeedVR2Preprocess","SolarRendererConditioning","SolarRendererLoraLoader","SolarRendererModel","SolarRendererSigmas","TS_ImageToSVGStringColor_Vtracer","TS_SVGStringToSVGBytesIO","TextEncodeFibo2","TextEncodeKrea2OstrisEdit","TextEncodeQwenImage21","ThinkSoundFeatureUtilsLoader","ThinkSoundModelLoader","ThinkSoundSampler","Trellis2Conditioning","Trellis2ShapeStage","Trellis2TextureStage","Trellis2UpsampleStage","VHS_BatchManager","VHS_LoadAudioUpload","VHS_LoadVideo","VHS_SelectEveryNthImage","VHS_VideoCombine","VHS_VideoInfo","VHS_VideoInfoLoaded","VRAM_Debug","VideoDepthAnythingOutput","VideoDepthAnythingProcess","VideoLengthAdjuster","ViggleTurboLora","ViggleTurboSigmas","VoxCPM2_Clone","VoxCPM2_TTS","WanVideoBlockSwap","WanVideoClipVisionEncode","WanVideoDecode","WanVideoEncode","WanVideoImageToVideoMultiTalk","WanVideoLoraSelect","WanVideoModelLoader","WanVideoPassImagesFromSamples","WanVideoSampler","WanVideoTextEncodeCached","WanVideoVAELoader","ZenImage21AdapterLoader","ZenImage21TextEncode"],
@@ -484,6 +484,7 @@
"video-inpaint-wan-vace-painted": {"core":["CLIPLoader","CLIPTextEncode","CheckpointLoaderSimple","ComfyMathExpression","CreateVideo","GetImageSize","GetVideoComponents","GrowMask","ImageCompositeMasked","ImageFromBatch","ImageScale","ImageToMask","InvertMask","KSampler","LoadImageMask","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","SAM3_TrackToMask","SAM3_VideoTrack","SaveImage","SaveVideo","TrimAudioDuration","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","Video Slice","WanVaceToVideo"],"packs":{"ComfyUI-KJNodes":["GrowMaskWithBlur"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors","diffusion_models/wan2.1_vace_14B_fp16.safetensors","loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
"video-insert-wan-vace": {"core":["CLIPLoader","CLIPTextEncode","ComfyMathExpression","CreateVideo","GetImageSize","GetVideoComponents","GrowMask","ImageCompositeMasked","ImageFromBatch","ImageScale","ImageToMask","InvertMask","KSampler","LoadImage","LoadImageMask","LoadVideo","LoraLoaderModelOnly","MaskToImage","ModelSamplingSD3","PrimitiveFloat","PrimitiveInt","RepeatImageBatch","SaveVideo","TrimAudioDuration","TrimVideoLatent","UNETLoader","VAEDecode","VAELoader","Video Slice","WanVaceToVideo"],"packs":{"ComfyUI-KJNodes":["GrowMaskWithBlur"]},"files":["diffusion_models/wan2.1_vace_14B_fp16.safetensors","loras/lightx2v_T2V_14B_cfg_step_distill_v2_lora_rank64_bf16.safetensors","text_encoders/umt5_xxl_fp8_e4m3fn_scaled.safetensors","vae/wan_2.1_vae.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":[],"validated":true},
"video-mask-h3-relay": {"core":["CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","GetImageSize","GetVideoComponents","ImageBatch","ImageFromBatch","ImageScale","LoadVideo","MaskToImage","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","Video Slice"],"packs":{"h3-relay":["H3RelayPrepareSource","H3RelayRecoverMasks","H3RelaySelectMask"]},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors"],"optional":[],"vramGb":6,"isolated":false,"firstRun":[]},
+ "video-motion-transfer-h3": {"core":["BasicGuider","BasicScheduler","CLIPLoader","ImageScale","ImageScaleToMaxDimension","KSamplerSelect","LoadImage","LoraLoaderModelOnly","MiniMaxH3ReferenceToVideo","MiniMaxH3SigmaShift","ModelAttentionBackend","RandomNoise","SamplerCustomAdvanced","UNETLoader","VAEDecode","VAELoader"],"packs":{"ComfyUI-Fantastic-MiniMaxH3-PromptBuilder":[],"ComfyUI-KJNodes":["VRAM_Debug"],"ComfyUI-MiniMaxH3-Context-Loop":[],"ComfyUI-VideoHelperSuite":["VHS_LoadVideo","VHS_VideoCombine"],"comfyui-h3-oneclick-swap":["H3SoundtrackOrSilence"],"comfyui_controlnet_aux":["Metric3D-NormalMapPreprocessor"]},"files":["diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors","loras/minimax_h3_DMAD_4step_full_lora_avg_rank_39_bf16.safetensors","text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors","vae/minimax_h3_audio_vae_fp32.safetensors","vae/minimax_h3_video_vae_int8_convrot.safetensors"],"optional":[],"vramGb":24,"isolated":false,"firstRun":["Metric3D vit-small (metric_depth_vit_small_800k.pth) -> custom_nodes/comfyui_controlnet_aux/ckpts/JUGGHM/Metric3D (fetched on first run unless placed there)"]},
"video-mux-audio": {"core":["AudioAdjustVolume","AudioMerge","ConcatenateVideo","EmptyAudio","LoadAudio","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
"video-mux-audio-replace": {"core":["ConcatenateVideo","LoadAudio","LoadVideo","SaveVideo"],"packs":{},"files":[],"optional":[],"vramGb":0,"isolated":false,"firstRun":[],"validated":true},
"video-person-remove-h3-mask": {"core":["CLIPTextEncode","CheckpointLoaderSimple","CreateVideo","EmptyImage","GetImageSize","GetVideoComponents","GrowMask","ImageCompositeMasked","ImageFromBatch","LoadVideo","SAM3_Detect","SAM3_TrackToMask","SAM3_VideoTrack","SaveVideo","ThresholdMask"],"packs":{},"files":["checkpoints/sam3.1_multiplex_fp16.safetensors"],"optional":[],"vramGb":6,"isolated":false,"firstRun":[],"validated":true},
diff --git a/workflows/comfyui/video-motion-transfer-h3.json b/workflows/comfyui/video-motion-transfer-h3.json
new file mode 100644
index 00000000..ef4fe3be
--- /dev/null
+++ b/workflows/comfyui/video-motion-transfer-h3.json
@@ -0,0 +1,344 @@
+{
+ "1": {
+ "class_type": "VHS_LoadVideo",
+ "inputs": {
+ "video": "input.mp4",
+ "force_rate": 24,
+ "custom_width": 0,
+ "custom_height": 0,
+ "frame_load_cap": 141,
+ "skip_first_frames": 0,
+ "select_every_nth": 1,
+ "format": "None"
+ },
+ "_meta": {
+ "title": "1 · Source video — selected motion clip"
+ }
+ },
+ "20": {
+ "class_type": "LoadImage",
+ "inputs": {
+ "image": "example.png"
+ },
+ "_meta": {
+ "title": "Character photo"
+ }
+ },
+ "30": {
+ "class_type": "VRAM_Debug",
+ "inputs": {
+ "empty_cache": true,
+ "gc_collect": true,
+ "unload_all_models": true,
+ "any_input": [
+ "20",
+ 0
+ ],
+ "image_pass": [
+ "1",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Release VRAM before Metric3D"
+ }
+ },
+ "31": {
+ "class_type": "ImageScaleToMaxDimension",
+ "inputs": {
+ "image": [
+ "30",
+ 1
+ ],
+ "largest_size": 768,
+ "upscale_method": "area"
+ },
+ "_meta": {
+ "title": "Metric3D input video"
+ }
+ },
+ "32": {
+ "class_type": "Metric3D-NormalMapPreprocessor",
+ "inputs": {
+ "image": [
+ "31",
+ 0
+ ],
+ "backbone": "vit-small",
+ "fx": 1000,
+ "fy": 1000,
+ "resolution": 512
+ },
+ "_meta": {
+ "title": "4 · Source motion normals"
+ }
+ },
+ "33": {
+ "class_type": "ImageScale",
+ "inputs": {
+ "image": [
+ "32",
+ 0
+ ],
+ "width": 480,
+ "height": 864,
+ "upscale_method": "lanczos",
+ "crop": "disabled"
+ },
+ "_meta": {
+ "title": "Normals match the output canvas"
+ }
+ },
+ "36": {
+ "class_type": "H3SoundtrackOrSilence",
+ "inputs": {
+ "audio": [
+ "1",
+ 2
+ ],
+ "video_info": [
+ "1",
+ 3
+ ]
+ },
+ "_meta": {
+ "title": "Original soundtrack / silence when absent"
+ }
+ },
+ "49": {
+ "class_type": "ModelAttentionBackend",
+ "inputs": {
+ "model": [
+ "51",
+ 0
+ ],
+ "attention": "comfy kitchen attention"
+ },
+ "_meta": {
+ "title": "Comfy Kitchen Attention"
+ }
+ },
+ "50": {
+ "class_type": "UNETLoader",
+ "inputs": {
+ "unet_name": "minimax_h3_ref2va_pruned_int8_convrot.safetensors",
+ "weight_dtype": "default"
+ },
+ "_meta": {
+ "title": "H3 Diffusion Model"
+ }
+ },
+ "51": {
+ "class_type": "LoraLoaderModelOnly",
+ "inputs": {
+ "model": [
+ "50",
+ 0
+ ],
+ "lora_name": "minimax_h3_DMAD_4step_full_lora_avg_rank_39_bf16.safetensors",
+ "strength_model": 1
+ },
+ "_meta": {
+ "title": "DMAD LoRA"
+ }
+ },
+ "52": {
+ "class_type": "MiniMaxH3SigmaShift",
+ "inputs": {
+ "model": [
+ "49",
+ 0
+ ],
+ "shift_video": 12,
+ "shift_audio": 2
+ },
+ "_meta": {
+ "title": "H3 Sigma Shift"
+ }
+ },
+ "53": {
+ "class_type": "CLIPLoader",
+ "inputs": {
+ "clip_name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
+ "type": "minimax",
+ "device": "default"
+ },
+ "_meta": {
+ "title": "H3 Text Encoder"
+ }
+ },
+ "54": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "minimax_h3_video_vae_int8_convrot.safetensors"
+ },
+ "_meta": {
+ "title": "H3 Video VAE"
+ }
+ },
+ "55": {
+ "class_type": "VAELoader",
+ "inputs": {
+ "vae_name": "minimax_h3_audio_vae_fp32.safetensors"
+ },
+ "_meta": {
+ "title": "H3 Audio VAE"
+ }
+ },
+ "56": {
+ "class_type": "MiniMaxH3ReferenceToVideo",
+ "inputs": {
+ "clip": [
+ "53",
+ 0
+ ],
+ "vae": [
+ "54",
+ 0
+ ],
+ "audio_vae": [
+ "55",
+ 0
+ ],
+ "prompt": "subject_definitions:\n<Picture 1> defines the character's identity, face, hair, body and complete outfit, and the setting, background, colors, materials and lighting throughout the output.\n<Video 1> is a surface-orientation motion guide at 24 fps. Use the moving character's geometry, body pose, arm and leg movements, gestures, head direction, framing, character size and timing, and any camera movement, as the motion reference; the look of the output comes entirely from <Picture 1>.\n<Audio 1> is the original synchronized soundtrack.\n\nsummary:\n[video editing + reference generation + audio reuse] The character from <Picture 1> performs the movement of the character in <Video 1>, inside the setting of <Picture 1>. Keep the identity, face, hair, outfit, background and lighting of <Picture 1>. The picture is the appearance reference; the motion guide is the motion reference.\n\ndetailed_description:\nFrom the first frame the character holds the motion guide's first pose, framing and size, with the setting of <Picture 1> recomposed around them. Follow the motion guide's poses and gestures at the corresponding moments, through the last frame, moving into each new pose as it comes. Match its relative character size, camera perspective and any camera movement. Keep the picture's own setting, natural colors and environment coherent throughout the performance. Keep lighting and contact shadows consistent with the picture. Match visible speech to <Audio 1> when present.\n\noverall_soundscape:\nReuse <Audio 1> exactly as it is.",
+ "width": 480,
+ "height": 864,
+ "length": 141,
+ "ref_image_size": "match",
+ "ref_images.ref_image_0": [
+ "20",
+ 0
+ ],
+ "ref_videos.ref_video_0": [
+ "33",
+ 0
+ ],
+ "ref_video_audios.ref_video_audio_0": [
+ "36",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "5 · Character photo + normal motion reference"
+ }
+ },
+ "57": {
+ "class_type": "BasicGuider",
+ "inputs": {
+ "model": [
+ "52",
+ 0
+ ],
+ "conditioning": [
+ "56",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "H3 Guider"
+ }
+ },
+ "58": {
+ "class_type": "RandomNoise",
+ "inputs": {
+ "noise_seed": 2577489884
+ },
+ "_meta": {
+ "title": "Video seed"
+ }
+ },
+ "59": {
+ "class_type": "KSamplerSelect",
+ "inputs": {
+ "sampler_name": "euler"
+ },
+ "_meta": {
+ "title": "Video sampler"
+ }
+ },
+ "60": {
+ "class_type": "BasicScheduler",
+ "inputs": {
+ "model": [
+ "52",
+ 0
+ ],
+ "scheduler": "simple",
+ "steps": 6,
+ "denoise": 1
+ },
+ "_meta": {
+ "title": "H3 · 6 steps"
+ }
+ },
+ "61": {
+ "class_type": "SamplerCustomAdvanced",
+ "inputs": {
+ "noise": [
+ "58",
+ 0
+ ],
+ "guider": [
+ "57",
+ 0
+ ],
+ "sampler": [
+ "59",
+ 0
+ ],
+ "sigmas": [
+ "60",
+ 0
+ ],
+ "latent_image": [
+ "56",
+ 1
+ ]
+ },
+ "_meta": {
+ "title": "Generate motion"
+ }
+ },
+ "62": {
+ "class_type": "VAEDecode",
+ "inputs": {
+ "samples": [
+ "61",
+ 0
+ ],
+ "vae": [
+ "54",
+ 0
+ ]
+ },
+ "_meta": {
+ "title": "Decode video"
+ }
+ },
+ "63": {
+ "class_type": "VHS_VideoCombine",
+ "inputs": {
+ "images": [
+ "62",
+ 0
+ ],
+ "audio": [
+ "36",
+ 0
+ ],
+ "frame_rate": 24,
+ "loop_count": 0,
+ "filename_prefix": "fuobe/video-motion-transfer-h3",
+ "format": "video/h264-mp4",
+ "pix_fmt": "yuv420p",
+ "crf": 16,
+ "save_metadata": false,
+ "trim_to_audio": false,
+ "pingpong": false,
+ "save_output": true
+ },
+ "_meta": {
+ "title": "6 · Result with the clip's soundtrack"
+ }
+ }
+}