diff --git a/.claude/settings.local.json.tmp.3530818.d2f908315140 b/.claude/settings.local.json.tmp.3530818.d2f908315140 deleted file mode 100644 index 512a469..0000000 --- a/.claude/settings.local.json.tmp.3530818.d2f908315140 +++ /dev/null @@ -1,78 +0,0 @@ -{ - "permissions": { - "allow": [ - "Bash(curl -sS -m 5 -o /dev/null -w \"HTTP %{http_code}\\\\n\" http://localhost:8188)", - "Bash(ssh *)", - "Bash(ssh-keygen -y -P \"\" -f ~/.ssh/id_ed25519_echelon)", - "Bash(ssh-add -l)", - "Bash(env)", - "Bash(echo \"exit: $?\")", - "Read(//run/user/1000/keyring/**)", - "Read(//tmp/**)", - "Bash(SSH_AUTH_SOCK=/run/user/1000/gnupg/S.gpg-agent.ssh ssh-add -l)", - "Bash(SSH_AUTH_SOCK=/run/user/1000/keyring/.ssh ssh-add -l)", - "Bash(echo \"exit2: $?\")", - "Bash(export SSH_AUTH_SOCK=/run/user/1000/keyring/.ssh)", - "Bash(curl -s \"https://huggingface.co/api/models/Comfy-Org/MiniMax-H3/tree/main?recursive=true\")", - "Bash(python3 -c ' *)", - "WebFetch(domain:github.com)", - "WebSearch", - "WebFetch(domain:huggingface.co)", - "Bash(curl -s \"https://huggingface.co/api/models/Comfy-Org/MiniMax-H3/tree/main/diffusion_models\")", - "WebFetch(domain:docs.comfy.org)", - "WebFetch(domain:blog.comfy.org)", - "WebFetch(domain:raw.githubusercontent.com)", - "WebFetch(domain:recipes.vllm.ai)", - "Bash(chmod +x scripts/pod/*.sh scripts/local/*.sh)", - "Bash(curl -sL https://raw.githubusercontent.com/Comfy-Org/ComfyUI/master/comfy_extras/nodes_minimax_h3.py -o nodes_minimax_h3.py)", - "WebFetch(domain:docs.sglang.io)", - "Bash(scp -P 14278 scripts/pod/download-weights.sh scripts/pod/start-comfyui.sh root@216.243.220.136:/workspace/minimax-h3/)", - "Bash(scp -P 14278 scripts/pod/extra_model_paths.yaml root@216.243.220.136:/ComfyUI/extra_model_paths.yaml)", - "WebFetch(domain:comfyui-wiki.com)", - "WebFetch(domain:docs.runpod.io)", - "Bash(curl -s \"https://api.github.com/repos/Comfy-Org/workflow_templates/git/trees/main?recursive=1\")", - "WebFetch(domain:kingy.ai)", - "Bash(bash /home/bt/dev/storyteller/cloud-worker/scripts/local/port-forward.sh)", - "Bash(curl -s -o /dev/null -w \"%{http_code}\" http://127.0.0.1:8188/)", - "Bash(python3 -)", - "Bash(curl -s http://127.0.0.1:8188/object_info)", - "Bash(curl -s \"https://api.github.com/search/issues?q=repo:Comfy-Org/ComfyUI+minimax+h3&per_page=30\")", - "Bash(curl -s http://127.0.0.1:8188/object_info/UNETLoader)", - "Bash(curl -s http://127.0.0.1:8188/object_info/VAELoader)", - "Bash(curl -s http://127.0.0.1:8188/object_info/CLIPLoader)", - "Bash(curl -s http://127.0.0.1:8188/object_info/CreateVideo)", - "Bash(python3 -m json.tool)", - "Bash(curl -s http://127.0.0.1:8188/object_info/SaveVideo)", - "Bash(python3 -c \"import json,sys; d=json.load\\(sys.stdin\\); print\\(json.dumps\\(d['SaveVideo']['input'],indent=1\\)[:800]\\)\")", - "Bash(scp -q -O -P 14278 /home/bt/dev/storyteller/cloud-worker/scripts/pod/make-test-images.py root@216.243.220.136:/workspace/minimax-h3/)", - "Bash(timeout 550 python3 bench/minimax_bench.py --task t2v --width 608 --height 352 --seconds 5 --steps 20 --label smoke_t2v 2>&1)", - "Bash(timeout 550 python3 bench/minimax_bench.py --task i2v --width 608 --height 352 --seconds 5 --label smoke_i2v --warm)", - "Bash(timeout 550 python3 bench/minimax_bench.py --task ref2v --width 608 --height 352 --seconds 5 --label smoke_ref2v)", - "Bash(scp -q -O -P 14278 /home/bt/dev/storyteller/cloud-worker/scripts/pod/download-weights-tmpfs.sh root@216.243.220.136:/workspace/minimax-h3/)", - "Bash(scp -q -O -P 14278 /home/bt/dev/storyteller/cloud-worker/scripts/pod/extra_model_paths.yaml root@216.243.220.136:/ComfyUI/extra_model_paths.yaml)", - "Bash(ffmpeg -v error -i /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/scratchpad/smoke_t2v.mp4 -vf 'select=eq\\(n\\\\,60\\)' -frames:v 1 /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/scratchpad/t2v_frame.png -y)", - "Bash(ffmpeg -v error -i /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/scratchpad/smoke_ref2v.mp4 -vf 'select=eq\\(n\\\\,60\\)' -frames:v 1 /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/scratchpad/ref2v_frame.png -y)", - "Bash(python3 -c \"import ast; ast.parse\\(open\\('bench/minimax_bench.py'\\).read\\(\\)\\); print\\('syntax ok'\\)\")", - "Bash(python3 *)", - "Bash(git add *)", - "Bash(git commit -q -m 'MiniMax H3 on RunPod: install/download scripts, ComfyUI wiring, benchmark harness, research docs *)", - "Bash(tail -6 /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/tasks/betgtau6s.output)", - "Bash(git commit -q -m 'WEIGHTS.md: final download status — all 9 files present, none in progress *)", - "Bash(git commit -q -m 'docs: pad markdown table columns for raw-text readability *)", - "Bash(tail -4 /tmp/claude-1000/-home-bt-dev-storyteller-cloud-worker/309f1cfc-b7d8-47ef-a9b1-357cee94033d/tasks/betgtau6s.output)", - "Bash(git commit -q -m 'bench: multi-reference ref2v support \\(1-8 ref images, match/max sizing\\) *)", - "Bash(curl -s http://127.0.0.1:8188/queue)", - "Bash(curl -s -o /dev/null -w \"local tunnel: %{http_code}\\\\n\" --max-time 5 http://127.0.0.1:8188/)", - "Bash(ls -la ~/.ssh/)", - "Bash(git rm *)", - "Bash(scp -q -O -P 17561 scripts/pod/download-weights.sh scripts/pod/start-comfyui.sh scripts/pod/make-test-images.py root@216.243.220.136:/workspace/minimax-h3/)", - "Bash(scp -q -O -P 17561 scripts/pod/extra_model_paths.yaml root@216.243.220.136:/ComfyUI/extra_model_paths.yaml)", - "Bash(curl -s -o /dev/null -w \"tunnel to ComfyUI: %{http_code}\\\\n\" http://127.0.0.1:8188/)", - "Bash(curl -s -o /dev/null -w \"tunnel: %{http_code}\\\\n\" --max-time 8 http://127.0.0.1:8188/)", - "Bash(curl -s --max-time 8 http://127.0.0.1:8188/object_info/UNETLoader)", - "Bash(pkill -f \"ssh -N -L 8188\")", - "Bash(kill 3568392)", - "Bash(git commit -q -m 'pod reset recovery: new SSH port, consolidated downloads to 1T volume, retire tmpfs overflow *)" - ] - } -} diff --git a/README.md b/README.md index f90508e..3552e39 100644 --- a/README.md +++ b/README.md @@ -7,14 +7,18 @@ Current test rig: 1x B200 (180 GB) pod — connection details in `pod-info.txt`. ## Layout -- `scripts/pod/` — runs on the pod - - `install-minimax-h3.sh` — one-shot setup on a fresh pod (after `install-comfy.sh`) - - `download-weights.sh` — all weight families → `/workspace/minimax-h3/models` - - `download-weights-tmpfs.sh` — overflow files → `/dev/shm` (network-volume - quota workaround; ephemeral, re-run after pod restart) +- `comfyui/` — ComfyUI configs stored for easy rebuild - `extra_model_paths.yaml` — installed to `/ComfyUI/extra_model_paths.yaml` + - `workflows/` — the three MiniMax H3 workflows (t2v, i2v, r2v), installed + to `/ComfyUI/user/default/workflows/` +- `scripts/pod/` — runs on the pod + - `install-minimax-h3.sh` — one-shot rebuild (ComfyUI clone + deps + configs + + workflows + images + weight downloads + launch); idempotent, survives + pod resets since it stages from `/workspace` + - `download-weights.sh` — all weight families → `/workspace/minimax-h3/models` - `start-comfyui.sh` — headless ComfyUI in tmux on 127.0.0.1:8188 - `make-test-images.py` — synthetic reference/first-frame images → `/ComfyUI/input` +- `scripts/local/push-to-pod.sh` — stage repo files onto the pod's persistent volume - `scripts/local/port-forward.sh` — persistent tunnel `localhost:8188` → pod ComfyUI panel (auto-reconnects) - `bench/minimax_bench.py` — API-based benchmark harness (t2v / i2v / ref2v × @@ -28,6 +32,10 @@ Current test rig: 1x B200 (180 GB) pod — connection details in `pod-info.txt`. ## Quick start ```bash +# rebuild the pod from scratch (e.g. after a reset wiped the container disk) +scripts/local/push-to-pod.sh +ssh -p 17561 root@216.243.220.136 'bash /workspace/minimax-h3/install-minimax-h3.sh' + # tunnel to the ComfyUI panel (leave running) scripts/local/port-forward.sh & open http://localhost:8188 diff --git a/scripts/pod/extra_model_paths.yaml b/comfyui/extra_model_paths.yaml similarity index 100% rename from scripts/pod/extra_model_paths.yaml rename to comfyui/extra_model_paths.yaml diff --git a/comfyui/workflows/video_minimax_h3_i2v.json b/comfyui/workflows/video_minimax_h3_i2v.json new file mode 100644 index 0000000..65b7b1c --- /dev/null +++ b/comfyui/workflows/video_minimax_h3_i2v.json @@ -0,0 +1,1692 @@ +{ + "id": "e3f2b845-8f2c-4b5a-9caf-eac1029d3e7e", + "revision": 0, + "last_node_id": 120, + "last_link_id": 228, + "nodes": [ + { + "id": 92, + "type": "SaveVideo", + "pos": [ + -210, + 4850 + ], + "size": [ + 1030, + 126 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "name": "video", + "type": "VIDEO", + "link": 194 + } + ], + "outputs": [ + { + "name": "video", + "type": "VIDEO", + "links": null + } + ], + "properties": {}, + "widgets_values": [ + "video/MiniMax_H3", + "auto", + "auto" + ] + }, + { + "id": 114, + "type": "LoadImage", + "pos": [ + -1610, + 4860 + ], + "size": [ + 450, + 630 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 218 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "transparent_rgb_gaming_mouse.png", + "image" + ] + }, + { + "id": 115, + "type": "ResolutionSelector", + "pos": [ + -1110, + 5230 + ], + "size": [ + 270, + 170 + ], + "flags": {}, + "order": 1, + "mode": 0, + "showAdvanced": false, + "inputs": [], + "outputs": [ + { + "name": "width", + "type": "INT", + "links": [ + 219 + ] + }, + { + "name": "height", + "type": "INT", + "links": [ + 220 + ] + } + ], + "properties": { + "Node name for S&R": "ResolutionSelector" + }, + "widgets_values": [ + "1:1 (Square)", + 0.4, + 32 + ] + }, + { + "id": 105, + "type": "4c314f31-ecda-4b08-ae98-faaba1bf613f", + "pos": [ + -730, + 4850 + ], + "size": [ + 480, + 630 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "name": "first_frame", + "shape": 7, + "type": "IMAGE", + "link": 218 + }, + { + "name": "last_frame", + "shape": 7, + "type": "IMAGE", + "link": null + }, + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 219 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 220 + }, + { + "label": "duration", + "name": "value_1", + "type": "FLOAT", + "widget": { + "name": "value_1" + }, + "link": null + }, + { + "label": "audio_vae", + "name": "vae_name_1", + "type": "COMBO", + "widget": { + "name": "vae_name_1" + }, + "link": null + } + ], + "outputs": [ + { + "name": "VIDEO", + "type": "VIDEO", + "links": [ + 194 + ] + } + ], + "properties": { + "previewExposures": [] + }, + "widgets_values": [ + "Editorial tech product film. The transparent gaming mouse from in its original scene: a pitch-black studio void with a dark, subtle reflective surface, lit by dramatic duotone vibrant blue and warm neon orange rim lighting, deep soft shadow falloff into pure black. Monochromatic dark palette with electric blue and amber accents. Material motif: glowing internal metallic micro-components and glossy acrylic refractions. The environment is constant throughout.\nSHOT 1: The scene opens exactly on image 1, the mouse resting confidently on the dark surface; the blue and orange lights slowly pulse brighter, refracting deeply through the transparent acrylic shell as the camera executes a slow, deliberate push-in to reveal the intricate circuitry.\nSHOT 2: Cut to an extreme macro profile of the ridged scroll wheel and layered internal micro-components; the camera glides slowly along the side as a sharp beam of warm orange light sweeps across the metallic textures, contrasting perfectly against the deep blue ambient glow.\nSHOT 3: Cut to a low-angle beauty shot: the mouse levitates weightlessly a few centimeters above the dark reflective surface, rotating in a slow, precise orbit; the duotone lighting flares gently along the glassy transparent edges before fading slowly into a sleek silhouette.\nAudio: deep pulsing sub-bass room tone, sharp tactile mechanical clicks, a sweeping glassy whoosh on cuts, and a rising electronic swell that resolves to near-silence on the final fade.
", + 1344, + 768, + 5, + 168866841893410, + "minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "minimax_h3_video_vae_fp16.safetensors", + "minimax_h3_audio_vae_fp32.safetensors" + ] + }, + { + "id": 116, + "type": "MarkdownNote", + "pos": [ + -2090, + 4860 + ], + "size": [ + 450, + 630 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: MiniMax H3", + "properties": {}, + "widgets_values": [ + "## MiniMax H3\n\n[MiniMax H3](https://www.minimax.io/blog/minimax-h3) is MiniMax's general-purpose, omni-modal generation model. It jointly understands text, image, video, and audio, and generates video with **native stereo audio**: voice, sound effects, and music are modeled jointly in a single forward pass, not layered on afterward. Output is up to 2K resolution, 24fps, and up to about 15 seconds.\n\n## About this workflow\n\nThis template runs the **Image to Video** task (`MiniMaxH3ImageToVideo` node), which covers both:\n\n- **t2va** (text-to-video), when no images are connected\n- **fl2va** (first/last-frame image-to-video), when `first_frame` and/or `last_frame` are connected\n\n**Key inputs**\n\n- **first_frame / last_frame**: optional keyframes; the model generates the motion between them\n- **prompt**: describe the shots, motion, and the accompanying audio (dialogue, SFX, music) in one block\n- **width / height**: set via Resolution Selector. H3's native canvas is a 768px short edge, capped at 768x1344 pixels, rounded to a multiple of 32\n- **duration (seconds)**: converted to a valid frame `length` by the Math Expression node, snapping up to the model's 17-frame-per-block (17k+5) grid at 24fps" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 117, + "type": "MarkdownNote", + "pos": [ + -2570, + 4860 + ], + "size": [ + 440, + 680 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: Model Links", + "properties": {}, + "widgets_values": [ + "## Model Links\n\n**vae**\n\n- [minimax_h3_video_vae_fp16.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors)\n- [minimax_h3_audio_vae_fp32.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors)\n\n**diffusion_models**\n\n- [minimax_h3_fl2va_pruned_int8_convrot.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors)\n\n**text_encoders**\n\n- [qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors](https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors)\n\n\n## Model Storage Location\n\n```\n📂 ComfyUI/\n├── 📂 models/\n│ ├── 📂 vae/\n│ │ ├── minimax_h3_video_vae_fp16.safetensors\n│ │ └── minimax_h3_audio_vae_fp32.safetensors\n│ ├── 📂 diffusion_models/\n│ │ └── minimax_h3_fl2va_pruned_int8_convrot.safetensors\n│ └── 📂 text_encoders/\n│ └── qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors\n```\n\n## Report Issue\n\nNote: Please update ComfyUI first ([guide](https://docs.comfy.org/installation/update_comfyui)) and prepare required models. Desktop/Cloud updates follow stable releases, so some nightly-supported models may not be available yet.\n\n- Cannot run / runtime errors: [ComfyUI/issues](https://github.com/comfyanonymous/ComfyUI/issues)\n- UI / frontend issues: [ComfyUI_frontend/issues](https://github.com/Comfy-Org/ComfyUI_frontend/issues)\n- Workflow issues: [workflow_templates/issues](https://github.com/Comfy-Org/workflow_templates/issues)\n" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 118, + "type": "MarkdownNote", + "pos": [ + -1130, + 5460 + ], + "size": [ + 300, + 520 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: Size Settings Reference", + "properties": {}, + "widgets_values": [ + "| megapixels | Aspect | Output (multiple=32) |\n|---|---|---|\n| 0.2 | 16:9 | 608 x 352 |\n| 0.3 | 16:9 | 736 x 416 |\n| 0.4 | 16:9 | 864 x 480 |\n| 0.5 | 16:9 | 960 x 544 |\n| 0.6 | 16:9 | 1056 x 608 |\n| 0.7 | 16:9 | 1152 x 640 |\n| 0.8 | 16:9 | 1216 x 672 |\n| 0.9 | 16:9 | 1280 x 736 |\n| 0.98 | 16:9 | 1344 x 768 |\n| 1.0 | 16:9 | 1376 x 768 |\n| 1.2 | 16:9 | 1504 x 832 |\n| 1.5 | 16:9 | 1664 x 928 |\n| 1.8 | 16:9 | 1824 x 1024 |\n| 2.0 | 16:9 | 1920 x 1088 |\n" + ], + "color": "#222", + "bgcolor": "#000" + }, + { + "id": 119, + "type": "ImageScaleToTotalPixels", + "pos": [ + -1520, + 5610 + ], + "size": [ + 280, + 150 + ], + "flags": {}, + "order": 5, + "mode": 0, + "showAdvanced": true, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": null + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 228 + ] + } + ], + "properties": { + "Node name for S&R": "ImageScaleToTotalPixels" + }, + "widgets_values": [ + "nearest-exact", + 1, + 32 + ] + }, + { + "id": 120, + "type": "GetImageSize", + "pos": [ + -1490, + 5810 + ], + "size": [ + 230, + 80 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 228 + } + ], + "outputs": [ + { + "name": "width", + "type": "INT", + "links": null + }, + { + "name": "height", + "type": "INT", + "links": null + }, + { + "name": "batch_size", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "GetImageSize" + }, + "widgets_values": [] + } + ], + "links": [ + [ + 194, + 105, + 0, + 92, + 0, + "VIDEO" + ], + [ + 218, + 114, + 0, + 105, + 0, + "IMAGE" + ], + [ + 219, + 115, + 0, + 105, + 2, + "INT" + ], + [ + 220, + 115, + 1, + 105, + 3, + "INT" + ], + [ + 228, + 119, + 0, + 120, + 0, + "IMAGE" + ] + ], + "groups": [ + { + "id": 5, + "title": "Use Image Size", + "bounding": [ + -1530, + 5540, + 296.484375, + 354 + ], + "color": "#3f789e", + "flags": {} + } + ], + "definitions": { + "subgraphs": [ + { + "id": "4c314f31-ecda-4b08-ae98-faaba1bf613f", + "version": 1, + "state": { + "lastGroupId": 5, + "lastNodeId": 120, + "lastLinkId": 228, + "lastRerouteId": 0 + }, + "revision": 0, + "config": {}, + "name": "Image to Video (MiniMax H3)", + "inputNode": { + "id": -10, + "bounding": [ + -2560, + 4720, + 128, + 268 + ] + }, + "outputNode": { + "id": -20, + "bounding": [ + 690, + 4810, + 128, + 68 + ] + }, + "inputs": [ + { + "id": "d6eaa195-2266-4016-b7ed-b2d17a3e53c2", + "name": "first_frame", + "type": "IMAGE", + "linkIds": [ + 195 + ], + "pos": [ + -2456, + 4744 + ] + }, + { + "id": "03b95567-f496-4279-9d38-989dd34fa882", + "name": "last_frame", + "type": "IMAGE", + "linkIds": [ + 196 + ], + "pos": [ + -2456, + 4764 + ] + }, + { + "id": "d7302ca7-24ed-44c4-8ac9-736540dab7fb", + "name": "prompt", + "type": "STRING", + "linkIds": [ + 197 + ], + "pos": [ + -2456, + 4784 + ] + }, + { + "id": "709e2d94-3172-496f-ad86-7d672f3df568", + "name": "width", + "type": "INT", + "linkIds": [ + 200 + ], + "pos": [ + -2456, + 4804 + ] + }, + { + "id": "8205b85b-19bb-47f6-8418-89cd42940c1d", + "name": "height", + "type": "INT", + "linkIds": [ + 201 + ], + "pos": [ + -2456, + 4824 + ] + }, + { + "id": "a40e5e96-4307-4a8e-a4f8-13a27d4bc9d3", + "name": "value_1", + "type": "FLOAT", + "linkIds": [ + 206 + ], + "label": "duration", + "pos": [ + -2456, + 4844 + ] + }, + { + "id": "9f8734bc-c2b3-43b0-911e-e89560e8b777", + "name": "noise_seed", + "type": "INT", + "linkIds": [ + 207 + ], + "pos": [ + -2456, + 4864 + ] + }, + { + "id": "9a6d2811-673c-47e0-aa94-dda7c83621e4", + "name": "unet_name", + "type": "COMBO", + "linkIds": [ + 221 + ], + "pos": [ + -2456, + 4884 + ] + }, + { + "id": "7100a787-5536-4002-840b-1d2fd071010a", + "name": "clip_name", + "type": "COMBO", + "linkIds": [ + 227 + ], + "pos": [ + -2456, + 4904 + ] + }, + { + "id": "d40632fd-e0ae-4319-b85d-5479db4d6e11", + "name": "vae_name", + "type": "COMBO", + "linkIds": [ + 223 + ], + "pos": [ + -2456, + 4924 + ] + }, + { + "id": "2992852c-4b20-439a-8771-c866ec1996e6", + "name": "vae_name_1", + "type": "COMBO", + "linkIds": [ + 224 + ], + "label": "audio_vae", + "pos": [ + -2456, + 4944 + ] + } + ], + "outputs": [ + { + "id": "adb2611c-e490-4fca-8067-b718c992f8cc", + "name": "VIDEO", + "type": "VIDEO", + "linkIds": [ + 168 + ], + "localized_name": "VIDEO", + "pos": [ + 714, + 4834 + ] + } + ], + "widgets": [], + "nodes": [ + { + "id": 11, + "type": "VAELoader", + "pos": [ + -2020, + 5020 + ], + "size": [ + 640, + 70 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [ + { + "localized_name": "vae_name", + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": 223 + } + ], + "outputs": [ + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "links": [ + 8, + 190 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "minimax_h3_video_vae_fp16.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_video_vae_fp16.safetensors", + "directory": "vae" + } + ] + }, + "widgets_values": [ + "minimax_h3_video_vae_fp16.safetensors" + ] + }, + { + "id": 24, + "type": "VAELoader", + "pos": [ + -2020, + 5160 + ], + "size": [ + 650, + 70 + ], + "flags": {}, + "order": 10, + "mode": 0, + "inputs": [ + { + "localized_name": "vae_name", + "name": "vae_name", + "type": "COMBO", + "widget": { + "name": "vae_name" + }, + "link": 224 + } + ], + "outputs": [ + { + "localized_name": "VAE", + "name": "VAE", + "type": "VAE", + "links": [ + 23 + ] + } + ], + "properties": { + "Node name for S&R": "VAELoader", + "models": [ + { + "name": "minimax_h3_audio_vae_fp32.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/vae/minimax_h3_audio_vae_fp32.safetensors", + "directory": "vae" + } + ] + }, + "widgets_values": [ + "minimax_h3_audio_vae_fp32.safetensors" + ] + }, + { + "id": 23, + "type": "VAEDecodeAudio", + "pos": [ + -30, + 4970 + ], + "size": [ + 230, + 60 + ], + "flags": { + "collapsed": false + }, + "order": 9, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 226 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 23 + } + ], + "outputs": [ + { + "localized_name": "AUDIO", + "name": "AUDIO", + "type": "AUDIO", + "links": [ + 166 + ] + } + ], + "properties": { + "Node name for S&R": "VAEDecodeAudio" + }, + "widgets_values": [] + }, + { + "id": 10, + "type": "VAEDecode", + "pos": [ + -30, + 4850 + ], + "size": [ + 230, + 60 + ], + "flags": { + "collapsed": false + }, + "order": 3, + "mode": 0, + "inputs": [ + { + "localized_name": "samples", + "name": "samples", + "type": "LATENT", + "link": 225 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 8 + } + ], + "outputs": [ + { + "localized_name": "IMAGE", + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 167 + ] + } + ], + "properties": { + "Node name for S&R": "VAEDecode" + }, + "widgets_values": [] + }, + { + "id": 17, + "type": "KSamplerSelect", + "pos": [ + -780, + 4950 + ], + "size": [ + 370, + 70 + ], + "flags": {}, + "order": 0, + "mode": 0, + "inputs": [], + "outputs": [ + { + "localized_name": "SAMPLER", + "name": "SAMPLER", + "type": "SAMPLER", + "links": [ + 16 + ] + } + ], + "properties": { + "Node name for S&R": "KSamplerSelect" + }, + "widgets_values": [ + "res_multistep" + ] + }, + { + "id": 9, + "type": "BasicScheduler", + "pos": [ + -780, + 5100 + ], + "size": [ + 370, + 130 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 5 + } + ], + "outputs": [ + { + "localized_name": "SIGMAS", + "name": "SIGMAS", + "type": "SIGMAS", + "links": [ + 18 + ] + } + ], + "properties": { + "Node name for S&R": "BasicScheduler" + }, + "widgets_values": [ + "simple", + 20, + 1 + ] + }, + { + "id": 14, + "type": "SamplerCustomAdvanced", + "pos": [ + -360, + 4860 + ], + "size": [ + 230, + 140 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [ + { + "localized_name": "noise", + "name": "noise", + "type": "NOISE", + "link": 40 + }, + { + "localized_name": "guider", + "name": "guider", + "type": "GUIDER", + "link": 12 + }, + { + "localized_name": "sampler", + "name": "sampler", + "type": "SAMPLER", + "link": 16 + }, + { + "localized_name": "sigmas", + "name": "sigmas", + "type": "SIGMAS", + "link": 18 + }, + { + "localized_name": "latent_image", + "name": "latent_image", + "type": "LATENT", + "link": 188 + } + ], + "outputs": [ + { + "localized_name": "output", + "name": "output", + "type": "LATENT", + "links": [ + 225, + 226 + ] + }, + { + "localized_name": "denoised_output", + "name": "denoised_output", + "type": "LATENT", + "links": null + } + ], + "properties": { + "Node name for S&R": "SamplerCustomAdvanced" + }, + "widgets_values": [] + }, + { + "id": 16, + "type": "BasicGuider", + "pos": [ + -780, + 4820 + ], + "size": [ + 360, + 60 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [ + { + "localized_name": "model", + "name": "model", + "type": "MODEL", + "link": 193 + }, + { + "localized_name": "conditioning", + "name": "conditioning", + "type": "CONDITIONING", + "link": 187 + } + ], + "outputs": [ + { + "localized_name": "GUIDER", + "name": "GUIDER", + "type": "GUIDER", + "links": [ + 12 + ] + } + ], + "properties": { + "Node name for S&R": "BasicGuider" + }, + "widgets_values": [] + }, + { + "id": 6, + "type": "UNETLoader", + "pos": [ + -2020, + 4670 + ], + "size": [ + 640, + 90 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [ + { + "localized_name": "unet_name", + "name": "unet_name", + "type": "COMBO", + "widget": { + "name": "unet_name" + }, + "link": 221 + } + ], + "outputs": [ + { + "localized_name": "MODEL", + "name": "MODEL", + "type": "MODEL", + "links": [ + 5, + 193 + ] + } + ], + "properties": { + "Node name for S&R": "UNETLoader", + "models": [ + { + "name": "minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "directory": "diffusion_models" + } + ] + }, + "widgets_values": [ + "minimax_h3_fl2va_pruned_int8_convrot.safetensors", + "default" + ] + }, + { + "id": 13, + "type": "CLIPLoader", + "pos": [ + -2020, + 4830 + ], + "size": [ + 640, + 120 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [ + { + "localized_name": "clip_name", + "name": "clip_name", + "type": "COMBO", + "widget": { + "name": "clip_name" + }, + "link": 227 + } + ], + "outputs": [ + { + "localized_name": "CLIP", + "name": "CLIP", + "type": "CLIP", + "links": [ + 189 + ] + } + ], + "properties": { + "Node name for S&R": "CLIPLoader", + "models": [ + { + "name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "url": "https://huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "directory": "text_encoders" + } + ] + }, + "widgets_values": [ + "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors", + "minimax", + "default" + ] + }, + { + "id": 15, + "type": "RandomNoise", + "pos": [ + -780, + 4660 + ], + "size": [ + 360, + 90 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [ + { + "localized_name": "noise_seed", + "name": "noise_seed", + "type": "INT", + "widget": { + "name": "noise_seed" + }, + "link": 207 + } + ], + "outputs": [ + { + "localized_name": "NOISE", + "name": "NOISE", + "type": "NOISE", + "links": [ + 40 + ] + } + ], + "properties": { + "Node name for S&R": "RandomNoise" + }, + "widgets_values": [ + 1, + "randomize" + ] + }, + { + "id": 91, + "type": "CreateVideo", + "pos": [ + 300, + 4890 + ], + "size": [ + 270, + 110 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [ + { + "localized_name": "images", + "name": "images", + "type": "IMAGE", + "link": 167 + }, + { + "localized_name": "audio", + "name": "audio", + "shape": 7, + "type": "AUDIO", + "link": 166 + } + ], + "outputs": [ + { + "localized_name": "VIDEO", + "name": "VIDEO", + "type": "VIDEO", + "links": [ + 168 + ] + } + ], + "properties": { + "Node name for S&R": "CreateVideo" + }, + "widgets_values": [ + 24, + 8 + ] + }, + { + "id": 104, + "type": "MiniMaxH3ImageToVideo", + "pos": [ + -1290, + 4630 + ], + "size": [ + 430, + 550 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [ + { + "localized_name": "clip", + "name": "clip", + "type": "CLIP", + "link": 189 + }, + { + "localized_name": "vae", + "name": "vae", + "type": "VAE", + "link": 190 + }, + { + "localized_name": "first_frame", + "name": "first_frame", + "shape": 7, + "type": "IMAGE", + "link": 195 + }, + { + "localized_name": "last_frame", + "name": "last_frame", + "shape": 7, + "type": "IMAGE", + "link": 196 + }, + { + "localized_name": "prompt", + "name": "prompt", + "type": "STRING", + "widget": { + "name": "prompt" + }, + "link": 197 + }, + { + "localized_name": "width", + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 200 + }, + { + "localized_name": "height", + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 201 + }, + { + "localized_name": "length", + "name": "length", + "type": "INT", + "widget": { + "name": "length" + }, + "link": 199 + } + ], + "outputs": [ + { + "localized_name": "positive", + "name": "positive", + "type": "CONDITIONING", + "links": [ + 187 + ] + }, + { + "localized_name": "LATENT", + "name": "LATENT", + "type": "LATENT", + "links": [ + 188 + ] + } + ], + "properties": { + "Node name for S&R": "MiniMaxH3ImageToVideo" + }, + "widgets_values": [ + "Vaporwave title sequence look: pink and blue gradient palette, VHS tracking artifacts, Greek statue motifs, chrome palm trees, RGB chromatic aberration, lo-fi retro atmosphere, mood languid and nostalgic.\n\nTimeline:\n[0s-1s] VHS static opens the frame, the title \"COMFYUI\" appears with RGB split and a slight horizontal jitter.\n[1s-2.5s] Hard cut, a Greek plaster bust close-up, pink-purple gradient sky, a pixelated sun.\n[2.5s-4s] Clean \"STARRING\" credits appear, \"LATENT\" and \"CONTROLNET\" each shown exactly once.\n[4s-5s] Final card \"DIRECTED BY COMFYUI\" holds, one VHS tracking glitch settling into stability.\n\nHard cuts only, transitions landing with tape jumps, no push-ins, no dissolves.\n\nAudio: lo-fi vaporwave score, slow drum machine with soft bass, VHS tape-noise sample joins at 2.5s, melody fading for the last 1s.\n\nAll text must be clearly legible, do not misspell English, no Chinese characters, do not repeat names or job titles, no soft dissolves, no subtitle bars.", + 1344, + 768, + 73 + ] + }, + { + "id": 107, + "type": "ComfyMathExpression", + "pos": [ + -1710, + 5410 + ], + "size": [ + 360, + 160 + ], + "flags": { + "collapsed": false + }, + "order": 13, + "mode": 0, + "inputs": [ + { + "label": "a", + "localized_name": "values.a", + "name": "values.a", + "type": "FLOAT,INT,BOOLEAN", + "link": 205 + }, + { + "label": "b", + "localized_name": "values.b", + "name": "values.b", + "shape": 7, + "type": "FLOAT,INT,BOOLEAN", + "link": null + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": null + }, + { + "localized_name": "INT", + "name": "INT", + "type": "INT", + "links": [ + 199 + ] + }, + { + "localized_name": "BOOL", + "name": "BOOL", + "type": "BOOLEAN", + "links": null + } + ], + "properties": { + "Node name for S&R": "ComfyMathExpression" + }, + "widgets_values": [ + "max(5, round(a * 24)) + (5 - (max(5, round(a * 24)) % 17)) % 17" + ] + }, + { + "id": 111, + "type": "PrimitiveFloat", + "pos": [ + -2020, + 5410 + ], + "size": [ + 270, + 70 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [ + { + "localized_name": "value", + "name": "value", + "type": "FLOAT", + "widget": { + "name": "value" + }, + "link": 206 + } + ], + "outputs": [ + { + "localized_name": "FLOAT", + "name": "FLOAT", + "type": "FLOAT", + "links": [ + 205 + ] + } + ], + "title": "Float (duration)", + "properties": { + "Node name for S&R": "PrimitiveFloat" + }, + "widgets_values": [ + 2 + ] + } + ], + "groups": [ + { + "id": 1, + "title": "Models", + "bounding": [ + -2050, + 4540, + 700, + 800 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 2, + "title": "Sampling", + "bounding": [ + -810, + 4540, + 700, + 800 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 3, + "title": "Conditioning", + "bounding": [ + -1320, + 4540, + 480, + 800 + ], + "color": "#3f789e", + "flags": {} + }, + { + "id": 4, + "title": "Decoding and create video", + "bounding": [ + -90, + 4540, + 700, + 800 + ], + "color": "#3f789e", + "flags": {} + } + ], + "links": [ + { + "id": 23, + "origin_id": 24, + "origin_slot": 0, + "target_id": 23, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 8, + "origin_id": 11, + "origin_slot": 0, + "target_id": 10, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 5, + "origin_id": 6, + "origin_slot": 0, + "target_id": 9, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 40, + "origin_id": 15, + "origin_slot": 0, + "target_id": 14, + "target_slot": 0, + "type": "NOISE" + }, + { + "id": 12, + "origin_id": 16, + "origin_slot": 0, + "target_id": 14, + "target_slot": 1, + "type": "GUIDER" + }, + { + "id": 16, + "origin_id": 17, + "origin_slot": 0, + "target_id": 14, + "target_slot": 2, + "type": "SAMPLER" + }, + { + "id": 18, + "origin_id": 9, + "origin_slot": 0, + "target_id": 14, + "target_slot": 3, + "type": "SIGMAS" + }, + { + "id": 188, + "origin_id": 104, + "origin_slot": 1, + "target_id": 14, + "target_slot": 4, + "type": "LATENT" + }, + { + "id": 193, + "origin_id": 6, + "origin_slot": 0, + "target_id": 16, + "target_slot": 0, + "type": "MODEL" + }, + { + "id": 187, + "origin_id": 104, + "origin_slot": 0, + "target_id": 16, + "target_slot": 1, + "type": "CONDITIONING" + }, + { + "id": 167, + "origin_id": 10, + "origin_slot": 0, + "target_id": 91, + "target_slot": 0, + "type": "IMAGE" + }, + { + "id": 166, + "origin_id": 23, + "origin_slot": 0, + "target_id": 91, + "target_slot": 1, + "type": "AUDIO" + }, + { + "id": 189, + "origin_id": 13, + "origin_slot": 0, + "target_id": 104, + "target_slot": 0, + "type": "CLIP" + }, + { + "id": 190, + "origin_id": 11, + "origin_slot": 0, + "target_id": 104, + "target_slot": 1, + "type": "VAE" + }, + { + "id": 168, + "origin_id": 91, + "origin_slot": 0, + "target_id": -20, + "target_slot": 0, + "type": "VIDEO" + }, + { + "id": 195, + "origin_id": -10, + "origin_slot": 0, + "target_id": 104, + "target_slot": 2, + "type": "IMAGE" + }, + { + "id": 196, + "origin_id": -10, + "origin_slot": 1, + "target_id": 104, + "target_slot": 3, + "type": "IMAGE" + }, + { + "id": 197, + "origin_id": -10, + "origin_slot": 2, + "target_id": 104, + "target_slot": 4, + "type": "STRING" + }, + { + "id": 199, + "origin_id": 107, + "origin_slot": 1, + "target_id": 104, + "target_slot": 7, + "type": "INT" + }, + { + "id": 200, + "origin_id": -10, + "origin_slot": 3, + "target_id": 104, + "target_slot": 5, + "type": "INT" + }, + { + "id": 201, + "origin_id": -10, + "origin_slot": 4, + "target_id": 104, + "target_slot": 6, + "type": "INT" + }, + { + "id": 205, + "origin_id": 111, + "origin_slot": 0, + "target_id": 107, + "target_slot": 0, + "type": "FLOAT" + }, + { + "id": 206, + "origin_id": -10, + "origin_slot": 5, + "target_id": 111, + "target_slot": 0, + "type": "FLOAT" + }, + { + "id": 207, + "origin_id": -10, + "origin_slot": 6, + "target_id": 15, + "target_slot": 0, + "type": "INT" + }, + { + "id": 221, + "origin_id": -10, + "origin_slot": 7, + "target_id": 6, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 223, + "origin_id": -10, + "origin_slot": 9, + "target_id": 11, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 224, + "origin_id": -10, + "origin_slot": 10, + "target_id": 24, + "target_slot": 0, + "type": "COMBO" + }, + { + "id": 225, + "origin_id": 14, + "origin_slot": 0, + "target_id": 10, + "target_slot": 0, + "type": "LATENT" + }, + { + "id": 226, + "origin_id": 14, + "origin_slot": 0, + "target_id": 23, + "target_slot": 0, + "type": "LATENT" + }, + { + "id": 227, + "origin_id": -10, + "origin_slot": 8, + "target_id": 13, + "target_slot": 0, + "type": "COMBO" + } + ], + "extra": {} + } + ] + }, + "config": {}, + "extra": { + "frontendVersion": "1.47.11", + "VHS_latentpreview": false, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true, + "ds": { + "scale": 1.075154262068966, + "offset": [ + 1481.4819098512912, + -4731.499462177808 + ] + } + }, + "version": 0.4 +} \ No newline at end of file diff --git a/comfyui/workflows/video_minimax_h3_r2v.json b/comfyui/workflows/video_minimax_h3_r2v.json new file mode 100644 index 0000000..8bd66ea --- /dev/null +++ b/comfyui/workflows/video_minimax_h3_r2v.json @@ -0,0 +1,1259 @@ +{ + "id": "e3f2b845-8f2c-4b5a-9caf-eac1029d3e7e", + "revision": 0, + "last_node_id": 140, + "last_link_id": 282, + "nodes": [ + { + "id": 92, + "type": "SaveVideo", + "pos": [ + 1150, + 4880 + ], + "size": [ + 1210, + 126 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "video", + "type": "VIDEO", + "link": 260 + } + ], + "outputs": [ + { + "name": "video", + "type": "VIDEO", + "links": null + } + ], + "properties": {}, + "widgets_values": [ + "video/MiniMax_H3", + "auto", + "auto" + ] + }, + { + "id": 115, + "type": "ResolutionSelector", + "pos": [ + -1480, + 5610 + ], + "size": [ + 270, + 170 + ], + "flags": {}, + "order": 0, + "mode": 0, + "showAdvanced": false, + "inputs": [], + "outputs": [ + { + "name": "width", + "type": "INT", + "links": [ + 276 + ] + }, + { + "name": "height", + "type": "INT", + "links": [ + 277 + ] + } + ], + "title": "Resolution Selector (Size)", + "properties": { + "Node name for S&R": "ResolutionSelector" + }, + "widgets_values": [ + "16:9 (Widescreen)", + 0.4, + 32 + ], + "color": "#322", + "bgcolor": "#533" + }, + { + "id": 116, + "type": "MarkdownNote", + "pos": [ + -2030, + 4850 + ], + "size": [ + 450, + 889.6875 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Note: MiniMax H3", + "properties": {}, + "widgets_values": [ + "## MiniMax H3\n\n[MiniMax H3](https://www.minimax.io/blog/minimax-h3) is MiniMax's general-purpose, omni-modal generation model. It jointly understands text, image, video, and audio, and generates video with **native stereo audio**: voice, sound effects, and music are modeled jointly in a single forward pass, not layered on afterward. Output is up to 2K resolution, 24fps, and up to about 15 seconds.\n\n## ComfyUI links\n- [ComfyUI#15224](https://github.com/Comfy-Org/ComfyUI/pull/15224)\n- [🤗 Comfy-Org/MiniMax-H3](https://huggingface.co/Comfy-Org/MiniMax-H3)\n\n## About this workflow\n\nThis template runs the **reference-to-video (ref2va)** task using the `MiniMaxH3ReferenceToVideo` node. It takes any mix of reference images, videos, and standalone audio, and weaves them into the generation to lock in a character's identity, a style, a motion, a camera move, or a voice.\n\n**Key inputs**\n\n- **ref_images / ref_videos / ref_video_audios / ref_audios**: up to 9 reference images, 3 reference videos (each may carry its own paired soundtrack), and 3 standalone reference audio clips\n- **prompt**: reference the inputs by tag, in the exact order they were connected, for example ``, `