feat: revert editor to pristine upstream, drop format label mapping and T2V==R2V, fix editor delivery

- frontend/src + messages restored byte-identical to upstream v1.3.3:
  format normalization shims, isMoxieEditorFormat gates, bundle marker,
  tooltip reword, and their tests all removed; editor bundle rebuilt from
  that pristine source so the editor behaves exactly like upstream
- format combo shows 'MiniMax' again (options=[MiniMax]); legacy queued
  'Moxie Multimedia' values still normalized to MiniMax at execution
- T2V resolves natively again: t2v stays t2v in h3_task_type,
  _multitrack_task_type and getMultiTrackTaskType; generation-mode t2v
  mapping and the zero-media cloud fallback removed (upstream behavior);
  Python tests and stub scripts updated accordingly
- editor delivery fix: core lets WEB_DIRECTORY overwrite the pack's
  EXTENSION_WEB_DIRS entry, so the /extensions listing never contained
  dist/release and a fresh browser never imported the editor (it only
  ever appeared from stale browser cache). web/js/editor-loader.js now
  imports the editor entry from the pack's own static mount, which
  serves index.js with no-cache (chunks stay cacheable); the
  /extensions/<pack>/index.js route was removed as a 404 trap
- shipped Moxie*.json templates carry format value MiniMax

Verified: frontend diff vs upstream = 0; bundle string checks + chunk
refs; vitest 565/566 (same pre-existing jsdom URL.revokeObjectURL env
failure); py_compile; test_t2v_r2v_and_loader.py ALL PASS;
test_rtx_upscale_integration.py ALL PASS
This commit is contained in:
Z User 2026-09-27 21:24:56 +00:00
parent 55d454f80d
commit 8ede97ab11
39 changed files with 234 additions and 257 deletions

View File

@ -6,11 +6,13 @@
### ⚡ Improvements
- **MultiTrack Editor / MultiTrack Project**: A **T2V selection now produces the exact same value as the R2V setting**. The shipped Moxie model set is reference-conditioned (ref2v), so text-to-video conditioning produced broken renders; the editor's T2V entry point, explicit `[start-end,t2v]` prompt-override tags, and every task-type resolver (`h3_task_type`, the editor task output, and the frontend type computation) now resolve T2V to `r2v`, and the local sampler treats a raw `t2v` value as reference conditioning. Reference-mode with zero reference media renders as text-only locally; the optional MiniMax cloud path falls back to its native text-only request mode instead of erroring. `i2v`, `l2v`, `v2v`, and edit flows are unchanged.
- **MultiTrack Editor**: The editor frontend was **reverted to the pristine upstream v1.3.3 source** — the MiniMax/Moxie format display-label mapping and every workaround built around it were removed. The shipped editor bundle is now built from that pristine source, so its behavior is exactly the battle-tested upstream editor (Shot/Context continuity, reference-size, audio lock, and MiniMax prompt placeholders all key on the native `MiniMax` format value again).
- **Editor delivery fix**: A fresh browser could previously end up without the editor bundle entirely. ComfyUI core lets a pack's `WEB_DIRECTORY` overwrite its extension web-dir registration, so the browser's `/extensions` listing only ever contained this pack's helper scripts — never the editor entry — and the editor only appeared from stale browser cache. A small static loader (`web/js/editor-loader.js`, served with the helpers) now imports the editor entry from the pack's own route, which serves `index.js` with `no-cache` so the entry is always revalidated while its content-hashed chunks stay cacheable. After updating: restart ComfyUI and reload the page once; no cache-clearing gymnastics required.
- **MultiTrack Editor / MultiTrack Project**: **T2V resolves natively again** (`t2v` stays `t2v`, matching upstream) — the model now handles text-to-video with the updated prompting, so the earlier T2V→R2V normalization was removed from the editor type computation, `h3_task_type`, `_multitrack_task_type`, and the generation-mode mapping. The reference-mode-with-zero-media cloud fallback was removed accordingly (reference mode raises for missing media again, as upstream).
- **Moxie Multimedia Loader**: The loader now **looks like it loads a single model**. Only the diffusion-model picker (plus the attention backend) is visible; the LoRA, video VAE, audio VAE, and CLIP widgets were removed and their files are auto-selected from the pack's `models/loras`, `models/vae`, `models/audio_vae`, and `models/clip` folders (first file in sorted order, matching the bundled model set). The LoRA is applied automatically with strength 1.0; remove the file from `models/loras` to disable it. Missing auxiliary models raise the same clear setup error as before. Workflows saved before this change keep working — extra widget values are ignored.
- **MultiTrack Project / Moxie Project Video Combine**: Single-pass projects now condition and sample at half the editor-selected resolution internally. The project timeline is composed at the segments' own size, and Moxie Project Video Combine restores the exact editor-selected resolution in pixel space before any output leaves the node (RTX Video Super Resolution via the optional `nvidia-vfx` package when available, with an automatic Lanczos fallback otherwise) — so every output carries the full editor resolution regardless of template wiring. The editor resolution therefore stays the final output resolution while the sampling chain runs smaller and faster. Dual-pass, SelfLift, and passthrough modes are unchanged.
- **Moxie Project Video Combine**: Removed the leftover `VIDEO` and `FILENAME_PREFIX` outputs. The node now exposes exactly the components consumed downstream — `images`, `audio`, and `fps`, matching the core `GetVideoComponents` layout — and the output file name is chosen on `easy saveVideo`. The full-featured `easy multitrackProjectVideoCombine` node keeps its `VIDEO` and `FILENAME_PREFIX` outputs. Workflows saved before this change that wired the removed outputs need those links reconnected once; the shipped Moxie-consolidated template is already rewired.
- **MultiTrack Editor / MultiTrack Project**: The `format` combo now displays `Moxie Multimedia` while the internal format value stays `MiniMax`, so saved projects, conditioning caches, and all downstream logic keep working untouched (workflows saved before this change need the format re-picked once after updating). The per-run `Output upscale` console line was removed; the resolution restore now happens silently.
- **MultiTrack Editor / MultiTrack Project**: The `format` combo shows `MiniMax` again (the `Moxie Multimedia` display label was removed together with the rest of the mapping). Workflows saved while the label was shown need the format re-picked once; queued legacy label values are still normalized to `MiniMax` at execution time. The per-run `Output upscale` console line was removed earlier; the resolution restore now happens silently.
- **Moxie Multimedia Loader**: The `lora_name` combo now defaults to the bundled turbo LoRA (`MM3step.safetensors`) so a fresh clone of the pack works out of the box, with a `none` entry to disable LoRA. Previously the default was a `"<no files found>"` placeholder, which silently skipped LoRA application even when a LoRA was bundled.
- **Moxie Preview Override**: The `tiny_vae` combo now lists files from the node pack's own `models/vae_approx` folder first (shipping `MM-preview.safetensors` for MiniMax H3 previews as the default), falling back to ComfyUI's standard `models/vae_approx` directory. The folder is rescanned on every schema refresh, so newly dropped files appear without restarting ComfyUI.
- **Moxie Multimedia Loader**: Locked the loader to the MiniMax H3 model set. The `clip_type` dropdown (which previously exposed every CLIP recipe in ComfyUI) was removed; the H3 Qwen3-VL text encoder is now always loaded with the `minimax` CLIP recipe. Any older ComfyUI build without `CLIPType.MINIMAX` raises a clear startup error instead of silently loading the wrong encoder.

View File

@ -808,13 +808,13 @@
"widgets_values": [
"960 x 544 (16:9)",
"pad",
"Moxie Multimedia",
"MiniMax",
"{\"muted\":false,\"volume_db\":0,\"task_markers\":[],\"task_overview\":false,\"tracks\":[{\"id\":\"cd1e7db3-76b9-4647-9562-eb6f069f3145\",\"name\":\"Task 0\",\"type\":\"task\",\"task_mode\":\"default\",\"color\":\"var(--multitrack-task-bg)\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[]},{\"id\":\"5a9a2c48-7e96-40f8-963b-4167b9fab93d\",\"name\":\"Video 0\",\"type\":\"video\",\"color\":\"var(--primary)\",\"muted\":true,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":false},{\"id\":\"8ff60ca1-50ff-4fe1-994d-7e984e2d2343\",\"name\":\"Audio 0\",\"type\":\"audio\",\"color\":\"var(--highlight)\",\"muted\":false,\"solo\":true,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":true},{\"id\":\"26f04bfa-35a5-4b13-b496-f67a4e221359\",\"name\":\"Subtitle 0\",\"type\":\"subtitle\",\"color\":\"#9D4937\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"visible\":false}],\"total_length\":120,\"frame_rate\":24}"
],
"widgets_values_named": {
"resolution": "960 x 544 (16:9)",
"resolution.resize_method": "pad",
"format": "Moxie Multimedia",
"format": "MiniMax",
"track_data": "{\"muted\":false,\"volume_db\":0,\"task_markers\":[],\"task_overview\":false,\"tracks\":[{\"id\":\"cd1e7db3-76b9-4647-9562-eb6f069f3145\",\"name\":\"Task 0\",\"type\":\"task\",\"task_mode\":\"default\",\"color\":\"var(--multitrack-task-bg)\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[]},{\"id\":\"5a9a2c48-7e96-40f8-963b-4167b9fab93d\",\"name\":\"Video 0\",\"type\":\"video\",\"color\":\"var(--primary)\",\"muted\":true,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":false},{\"id\":\"8ff60ca1-50ff-4fe1-994d-7e984e2d2343\",\"name\":\"Audio 0\",\"type\":\"audio\",\"color\":\"var(--highlight)\",\"muted\":false,\"solo\":true,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":true},{\"id\":\"26f04bfa-35a5-4b13-b496-f67a4e221359\",\"name\":\"Subtitle 0\",\"type\":\"subtitle\",\"color\":\"#9D4937\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"visible\":false}],\"total_length\":120,\"frame_rate\":24}"
}
},

View File

@ -258,13 +258,13 @@
"widgets_values": [
"960 x 544 (16:9)",
"pad",
"Moxie Multimedia",
"MiniMax",
"{\"muted\":false,\"volume_db\":0,\"task_markers\":[],\"task_overview\":false,\"tracks\":[{\"id\":\"cd1e7db3-76b9-4647-9562-eb6f069f3145\",\"name\":\"Task 0\",\"type\":\"task\",\"task_mode\":\"default\",\"color\":\"var(--multitrack-task-bg)\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[]},{\"id\":\"5a9a2c48-7e96-40f8-963b-4167b9fab93d\",\"name\":\"Video 0\",\"type\":\"video\",\"color\":\"var(--primary)\",\"muted\":true,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":false},{\"id\":\"8ff60ca1-50ff-4fe1-994d-7e984e2d2343\",\"name\":\"Audio 0\",\"type\":\"audio\",\"color\":\"var(--highlight)\",\"muted\":false,\"solo\":true,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":true},{\"id\":\"26f04bfa-35a5-4b13-b496-f67a4e221359\",\"name\":\"Subtitle 0\",\"type\":\"subtitle\",\"color\":\"#9D4937\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"visible\":false}],\"total_length\":120,\"frame_rate\":24}"
],
"widgets_values_named": {
"resolution": "960 x 544 (16:9)",
"resolution.resize_method": "pad",
"format": "Moxie Multimedia",
"format": "MiniMax",
"track_data": "{\"muted\":false,\"volume_db\":0,\"task_markers\":[],\"task_overview\":false,\"tracks\":[{\"id\":\"cd1e7db3-76b9-4647-9562-eb6f069f3145\",\"name\":\"Task 0\",\"type\":\"task\",\"task_mode\":\"default\",\"color\":\"var(--multitrack-task-bg)\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[]},{\"id\":\"5a9a2c48-7e96-40f8-963b-4167b9fab93d\",\"name\":\"Video 0\",\"type\":\"video\",\"color\":\"var(--primary)\",\"muted\":true,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":false},{\"id\":\"8ff60ca1-50ff-4fe1-994d-7e984e2d2343\",\"name\":\"Audio 0\",\"type\":\"audio\",\"color\":\"var(--highlight)\",\"muted\":false,\"solo\":true,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":true},{\"id\":\"26f04bfa-35a5-4b13-b496-f67a4e221359\",\"name\":\"Subtitle 0\",\"type\":\"subtitle\",\"color\":\"#9D4937\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"visible\":false}],\"total_length\":120,\"frame_rate\":24}"
}
},

View File

@ -999,13 +999,13 @@
"widgets_values": [
"960 x 544 (16:9)",
"pad",
"Moxie Multimedia",
"MiniMax",
"{\"muted\":false,\"volume_db\":0,\"task_markers\":[],\"task_overview\":false,\"tracks\":[{\"id\":\"cd1e7db3-76b9-4647-9562-eb6f069f3145\",\"name\":\"Task 0\",\"type\":\"task\",\"task_mode\":\"default\",\"color\":\"var(--multitrack-task-bg)\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[]},{\"id\":\"5a9a2c48-7e96-40f8-963b-4167b9fab93d\",\"name\":\"Video 0\",\"type\":\"video\",\"color\":\"var(--primary)\",\"muted\":true,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":false},{\"id\":\"8ff60ca1-50ff-4fe1-994d-7e984e2d2343\",\"name\":\"Audio 0\",\"type\":\"audio\",\"color\":\"var(--highlight)\",\"muted\":false,\"solo\":true,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":true},{\"id\":\"26f04bfa-35a5-4b13-b496-f67a4e221359\",\"name\":\"Subtitle 0\",\"type\":\"subtitle\",\"color\":\"#9D4937\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"visible\":false}],\"total_length\":120,\"frame_rate\":24}"
],
"widgets_values_named": {
"resolution": "960 x 544 (16:9)",
"resolution.resize_method": "pad",
"format": "Moxie Multimedia",
"format": "MiniMax",
"track_data": "{\"muted\":false,\"volume_db\":0,\"task_markers\":[],\"task_overview\":false,\"tracks\":[{\"id\":\"cd1e7db3-76b9-4647-9562-eb6f069f3145\",\"name\":\"Task 0\",\"type\":\"task\",\"task_mode\":\"default\",\"color\":\"var(--multitrack-task-bg)\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[]},{\"id\":\"5a9a2c48-7e96-40f8-963b-4167b9fab93d\",\"name\":\"Video 0\",\"type\":\"video\",\"color\":\"var(--primary)\",\"muted\":true,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":false},{\"id\":\"8ff60ca1-50ff-4fe1-994d-7e984e2d2343\",\"name\":\"Audio 0\",\"type\":\"audio\",\"color\":\"var(--highlight)\",\"muted\":false,\"solo\":true,\"volume_db\":0,\"locked\":false,\"segments\":[],\"audio_locked\":true},{\"id\":\"26f04bfa-35a5-4b13-b496-f67a4e221359\",\"name\":\"Subtitle 0\",\"type\":\"subtitle\",\"color\":\"#9D4937\",\"muted\":false,\"solo\":false,\"volume_db\":0,\"locked\":false,\"segments\":[],\"visible\":false}],\"total_length\":120,\"frame_rate\":24}"
}
},

View File

@ -44,11 +44,16 @@ if not os.path.exists(os.path.join(root_path, dist_path)):
dist_path = os.path.join(root_path, dist_path)
if os.path.exists(dist_path):
# The editor entry file (index.js) keeps a stable URL across releases, so a
# browser may hold an old cached copy that imports chunk files which no
# longer exist (chunk names are content-hashed and rotated on every build).
# Serve index.js with no-cache so it is always revalidated (304 when
# unchanged); hashed chunks stay cacheable forever.
# Editor delivery (see web/js/editor-loader.js for the full story):
# core lets WEB_DIRECTORY (./web) overwrite this pack's EXTENSION_WEB_DIRS
# entry, so the browser /extensions listing only contains the helper JS in
# web/js - never dist/release. web/js/editor-loader.js is listed instead
# and imports the editor entry from this pack's own static mount below.
#
# The entry file (index.js) keeps a stable URL across releases, so it is
# served with no-cache and always revalidated (304 when unchanged); its
# relative chunk imports resolve against the same mount and are
# content-hashed, so those may be cached forever.
async def _serve_editor_index(request: web.Request) -> web.StreamResponse:
return web.FileResponse(
os.path.join(dist_path, 'index.js'),
@ -56,15 +61,12 @@ if os.path.exists(dist_path):
)
server.PromptServer.instance.app.add_routes([
# Registered before the static mounts below (and before core's own
# /extensions/<name> mount, which happens later in server.add_routes),
# so aiohttp registration order lets these win for index.js.
# Do NOT register "/extensions/<pack>/index.js" here: relative chunk
# imports under that URL would resolve into web/ (core's mount) and
# 404. The loader imports "/<pack>/index.js" from this mount instead.
web.get(f"/{project_name}/index.js", _serve_editor_index),
web.get(f"/extensions/{project_name}/index.js", _serve_editor_index),
web.static(f"/{project_name}/", dist_path),
])
_nodes.EXTENSION_WEB_DIRS[project_name] = dist_path
else:
print(f"Warning: Dist directory not found for {project_name}. Frontend assets will be served.")

View File

@ -1 +1 @@
import{a as b}from"./index-xk3sxqv7.js";import{Aa as T,Ca as D}from"./index-1wrhp8dx.js";import{sc as z}from"./index-xcg45zk8.js";var E=z(T(),1),G=z(b(),1);function k(){let q=globalThis.LiteGraph;return Boolean(q?.vueNodesMode)}function x(q){let j=q.width;if(Object.defineProperty(q,"width",{configurable:!0,enumerable:!0,get:()=>j,set:(X)=>{if(k())j=X}}),!k())j=void 0}function U(q,j={}){return function(Y,Z,A,L){let B=j.defaultValue??"",$=null,F=document.createElement("div");if(F.classList.add("comfyui-react-widget",D),j.height!==void 0)F.style.height=`${j.height}px`;let K=Y;function P(){try{return JSON.parse(B)}catch{return B}}function Q(){$?.render(E.default.createElement(q,{value:P(),onChange:(J)=>{B=typeof J==="string"?J:JSON.stringify(J),K.setDirtyCanvas(!0,!0),Q()},inputName:Z,widget:H,node:K,app:L}))}let H=K.addDOMWidget(Z,"react-widget",F,{getValue:()=>B,setValue:(J)=>{B=J,Q()},getMinHeight:()=>30,getMaxHeight:()=>Y.size[1],hideOnZoom:!0,serialize:!0,...j.domWidgetOptions});if(j.keepResponsiveWidthInLiteGraph)x(H);return H.inputEl=F,H.serializeValue=()=>B,$=G.createRoot(F),Q(),{widget:H}}}export{U as createReactWidget};
import{a as b}from"./index-jeya184m.js";import{Aa as T,Ca as D}from"./index-gzeb3d88.js";import{oc as z}from"./index-dzqmqdeq.js";var E=z(T(),1),G=z(b(),1);function k(){let q=globalThis.LiteGraph;return Boolean(q?.vueNodesMode)}function x(q){let j=q.width;if(Object.defineProperty(q,"width",{configurable:!0,enumerable:!0,get:()=>j,set:(X)=>{if(k())j=X}}),!k())j=void 0}function U(q,j={}){return function(Y,Z,A,L){let B=j.defaultValue??"",$=null,F=document.createElement("div");if(F.classList.add("comfyui-react-widget",D),j.height!==void 0)F.style.height=`${j.height}px`;let K=Y;function P(){try{return JSON.parse(B)}catch{return B}}function Q(){$?.render(E.default.createElement(q,{value:P(),onChange:(J)=>{B=typeof J==="string"?J:JSON.stringify(J),K.setDirtyCanvas(!0,!0),Q()},inputName:Z,widget:H,node:K,app:L}))}let H=K.addDOMWidget(Z,"react-widget",F,{getValue:()=>B,setValue:(J)=>{B=J,Q()},getMinHeight:()=>30,getMaxHeight:()=>Y.size[1],hideOnZoom:!0,serialize:!0,...j.domWidgetOptions});if(j.keepResponsiveWidthInLiteGraph)x(H);return H.inputEl=F,H.serializeValue=()=>B,$=G.createRoot(F),Q(),{widget:H}}}export{U as createReactWidget};

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
import{rc as C}from"./index-6y5pqcvv.js";function A(B,j,q,H=new Set){let G=B,J=j;while(G!==null&&J!==null){let Z=`${G}:${J}`;if(H.has(Z)){console.debug(`[trace] Cycle detected at node ${G}, slot ${J}`);break}H.add(Z);let X=q.getNodeById(G);if(!X)break;let z=X.outputs?.[J];if(!z)break;console.debug(`[trace] Node #${G} "${X.name||X.type||"unknown"}" slot ${J} isList=${z.shape==6}`);let K=z.link;if(K===null||K===void 0)return console.debug(`[trace] Root source found: #${G}`),G;let Y=q.links[K];if(!Y)break;G=Y.origin_id,J=Y.origin_slot}return console.debug("[trace] Root source: none"),null}function v(B){if(B?.type!=="LoadVideo")return;let j=B.widgets?.find((q)=>q.name==="file")?.value??B.widgets_values?.[0];return typeof j==="string"&&j.trim()?j:void 0}function L(B,j,q,H){try{let J=B?.getInputLink?.(q);if(J)return J}catch(J){console.error("[timeline-utils] failed to read input link:",J)}let G=j.link;if(G===null||G===void 0)return null;return H?.links?.[G]??null}function F(B,j){let q=B.widgets?.find((J)=>J?.name==="skip_empty");if(typeof q?.value==="boolean")return q.value;let H=B.inputs?.findIndex((J)=>J.name==="skip_empty")??-1,G=H>=0?B.widgets_values?.[H]:void 0;if(typeof G==="boolean")return G;return j!=="audio"}function f(B,j,q){if(!B?.inputs||!j?.graph)return[];let H=[],G=q.toUpperCase();for(let[J,Z]of B.inputs.entries()){if((Z.type??"").toUpperCase()!==G)continue;let X=L(B,Z,J,j.graph);if(!X)continue;let{origin_id:z,origin_slot:K}=X,Y=j.graph.getNodeById(z);if(!Y)continue;if((Y.outputs?.[K]).shape==6){let U=Y.inputs.map((M,P)=>({inp:M,index:P,link:L(Y,M,P,j.graph)})).filter(({inp:M,link:P})=>(M.type??"").toUpperCase()===G&&P!==null).sort((M,P)=>{let $=parseInt(M.inp.name.match(/(\d+)$/)?.[1]??"0",10),Q=parseInt(P.inp.name.match(/(\d+)$/)?.[1]??"0",10);return $-Q});if(U.length>0){let M=F(Y,q);for(let[P,{inp:$,link:Q}]of U.entries()){let O,V,W;if(Q){let E=A(Q.origin_id,Q.origin_slot,j.graph);if(E!==null){let b=j.graph.getNodeById(E);if(q=="image")O=b?.imgs?.[0]?.currentSrc;else if(q=="audio")V=b.widgets_values?.[0]??b.widgets?.[0]?.value;else if(q==="video")W=v(b)}}let w=M?`${q}${P+1}`:$.name;H.push({label:$.name,img:O,audio_name:V,video_name:W,value:`__slot__:${w}`})}}}else{let U,M,P,$=A(X.origin_id,X.origin_slot,j.graph),Q=$!==null?j.graph.getNodeById($):Y;if(q=="image")U=Q?.imgs?.[0]?.currentSrc;else if(q=="audio"&&Q?.type=="LoadAudio")M=Q.widgets_values?.[0]??Q.widgets?.[0]?.value;else if(q==="video")P=v(Q);H.push({label:Z.name,img:U,audio_name:M,video_name:P,value:`__slot__:${Z.name}`})}break}return H}function N(B,j,q){if(j<=0||q<=0)return B;return B.map((H)=>{if(H.start_frame===void 0||H.end_frame===void 0)return H;let G=Math.max(0,Math.min(q-1,Math.round(H.start_frame/j*q))),J=Math.round((H.end_frame+1)/j*q),Z=Math.max(G,Math.min(q-1,J-1));return{...H,start_frame:G,end_frame:Z}})}function R(B,j){return Math.ceil(B*j/4)*4+1}function g(B,j){return Math.ceil(B*j)}function D(B,j){return(B-1)/j}function k(B,j,q){if(q==="frames")return`${B}f`;return`${D(B,j).toFixed(2)}s`}function I(B,j){let q=B.trim();if(q.endsWith("s")){let J=Number.parseFloat(q.slice(0,-1));if(Number.isNaN(J))return Number.NaN;return R(J,j)}let H=q.endsWith("f")?q.slice(0,-1):q,G=Number.parseInt(H,10);return Number.isNaN(G)?Number.NaN:G}var _={audio:"#34d399",prompt:"#a78bfa",image:"#fb923c",video:"#60a5fa",maintain:"var(--muted)"};function c(B){let j=B??((J)=>""),q=121,H=24;return{tracks:[{id:C(),name:j("timeline.defaultTrackName",{n:1}),type:"maintain",color:_.maintain,muted:!1,locked:!1,segments:[]},{id:C(),name:j("timeline.defaultAudioTrackName",{n:1}),type:"audio",color:_.audio,muted:!1,locked:!1,segments:[]}],total_length:121,frame_rate:24}}function l(B,j,q,H){let G=B/(q-1)*H,J=(j+1)/(q-1)*H;return{left:G,width:Math.max(J-G,2)}}
import{nc as C}from"./index-v2752ewf.js";function A(B,j,q,H=new Set){let G=B,J=j;while(G!==null&&J!==null){let Z=`${G}:${J}`;if(H.has(Z)){console.debug(`[trace] Cycle detected at node ${G}, slot ${J}`);break}H.add(Z);let X=q.getNodeById(G);if(!X)break;let z=X.outputs?.[J];if(!z)break;console.debug(`[trace] Node #${G} "${X.name||X.type||"unknown"}" slot ${J} isList=${z.shape==6}`);let K=z.link;if(K===null||K===void 0)return console.debug(`[trace] Root source found: #${G}`),G;let Y=q.links[K];if(!Y)break;G=Y.origin_id,J=Y.origin_slot}return console.debug("[trace] Root source: none"),null}function v(B){if(B?.type!=="LoadVideo")return;let j=B.widgets?.find((q)=>q.name==="file")?.value??B.widgets_values?.[0];return typeof j==="string"&&j.trim()?j:void 0}function L(B,j,q,H){try{let J=B?.getInputLink?.(q);if(J)return J}catch(J){console.error("[timeline-utils] failed to read input link:",J)}let G=j.link;if(G===null||G===void 0)return null;return H?.links?.[G]??null}function F(B,j){let q=B.widgets?.find((J)=>J?.name==="skip_empty");if(typeof q?.value==="boolean")return q.value;let H=B.inputs?.findIndex((J)=>J.name==="skip_empty")??-1,G=H>=0?B.widgets_values?.[H]:void 0;if(typeof G==="boolean")return G;return j!=="audio"}function f(B,j,q){if(!B?.inputs||!j?.graph)return[];let H=[],G=q.toUpperCase();for(let[J,Z]of B.inputs.entries()){if((Z.type??"").toUpperCase()!==G)continue;let X=L(B,Z,J,j.graph);if(!X)continue;let{origin_id:z,origin_slot:K}=X,Y=j.graph.getNodeById(z);if(!Y)continue;if((Y.outputs?.[K]).shape==6){let U=Y.inputs.map((M,P)=>({inp:M,index:P,link:L(Y,M,P,j.graph)})).filter(({inp:M,link:P})=>(M.type??"").toUpperCase()===G&&P!==null).sort((M,P)=>{let $=parseInt(M.inp.name.match(/(\d+)$/)?.[1]??"0",10),Q=parseInt(P.inp.name.match(/(\d+)$/)?.[1]??"0",10);return $-Q});if(U.length>0){let M=F(Y,q);for(let[P,{inp:$,link:Q}]of U.entries()){let O,V,W;if(Q){let E=A(Q.origin_id,Q.origin_slot,j.graph);if(E!==null){let b=j.graph.getNodeById(E);if(q=="image")O=b?.imgs?.[0]?.currentSrc;else if(q=="audio")V=b.widgets_values?.[0]??b.widgets?.[0]?.value;else if(q==="video")W=v(b)}}let w=M?`${q}${P+1}`:$.name;H.push({label:$.name,img:O,audio_name:V,video_name:W,value:`__slot__:${w}`})}}}else{let U,M,P,$=A(X.origin_id,X.origin_slot,j.graph),Q=$!==null?j.graph.getNodeById($):Y;if(q=="image")U=Q?.imgs?.[0]?.currentSrc;else if(q=="audio"&&Q?.type=="LoadAudio")M=Q.widgets_values?.[0]??Q.widgets?.[0]?.value;else if(q==="video")P=v(Q);H.push({label:Z.name,img:U,audio_name:M,video_name:P,value:`__slot__:${Z.name}`})}break}return H}function N(B,j,q){if(j<=0||q<=0)return B;return B.map((H)=>{if(H.start_frame===void 0||H.end_frame===void 0)return H;let G=Math.max(0,Math.min(q-1,Math.round(H.start_frame/j*q))),J=Math.round((H.end_frame+1)/j*q),Z=Math.max(G,Math.min(q-1,J-1));return{...H,start_frame:G,end_frame:Z}})}function R(B,j){return Math.ceil(B*j/4)*4+1}function g(B,j){return Math.ceil(B*j)}function D(B,j){return(B-1)/j}function k(B,j,q){if(q==="frames")return`${B}f`;return`${D(B,j).toFixed(2)}s`}function I(B,j){let q=B.trim();if(q.endsWith("s")){let J=Number.parseFloat(q.slice(0,-1));if(Number.isNaN(J))return Number.NaN;return R(J,j)}let H=q.endsWith("f")?q.slice(0,-1):q,G=Number.parseInt(H,10);return Number.isNaN(G)?Number.NaN:G}var _={audio:"#34d399",prompt:"#a78bfa",image:"#fb923c",video:"#60a5fa",maintain:"var(--muted)"};function c(B){let j=B??((J)=>""),q=121,H=24;return{tracks:[{id:C(),name:j("timeline.defaultTrackName",{n:1}),type:"maintain",color:_.maintain,muted:!1,locked:!1,segments:[]},{id:C(),name:j("timeline.defaultAudioTrackName",{n:1}),type:"audio",color:_.audio,muted:!1,locked:!1,segments:[]}],total_length:121,frame_rate:24}}function l(B,j,q,H){let G=B/(q-1)*H,J=(j+1)/(q-1)*H;return{left:G,width:Math.max(J-G,2)}}
export{f as Da,N as Ea,R as Fa,g as Ga,D as Ha,k as Ia,I as Ja,_ as Ka,c as La,l as Ma};

View File

@ -1,2 +1,2 @@
var j=Object.create;var{getPrototypeOf:k,defineProperty:f,getOwnPropertyNames:l}=Object;var m=Object.prototype.hasOwnProperty;function n(a){return this[a]}var o,p,s=(a,b,c)=>{var g=a!=null&&typeof a==="object";if(g){var h=b?o??=new WeakMap:p??=new WeakMap,i=h.get(a);if(i)return i}c=a!=null?j(k(a)):{};let d=b||!a||!a.__esModule?f(c,"default",{value:a,enumerable:!0}):c;for(let e of l(a))if(!m.call(d,e))f(d,e,{get:n.bind(a,e),enumerable:!0});if(g)h.set(a,d);return d};var t=(a,b)=>()=>(b||a((b={exports:{}}).exports,b),b.exports);var q=(a)=>a;function r(a,b){this[a]=q.bind(null,b)}var u=(a,b)=>{for(var c in b)f(a,c,{get:b[c],enumerable:!0,configurable:!0,set:r.bind(b,c)})};var v=(a,b)=>()=>(a&&(b=a(a=0)),b);var w=((a)=>typeof require<"u"?require:typeof Proxy<"u"?new Proxy(a,{get:(b,c)=>(typeof require<"u"?require:b)[c]}):a)(function(a){if(typeof require<"u")return require.apply(this,arguments);throw Error('Dynamic require of "'+a+'" is not supported')});
export{s as sc,t as tc,u as uc,v as vc,w as wc};
export{s as oc,t as pc,u as qc,v as rc,w as sc};

58
dist/release/chunks/index-gt4adwg1.js vendored Normal file

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

File diff suppressed because one or more lines are too long

View File

@ -1,2 +1,2 @@
var B=()=>{if(typeof crypto<"u"&&typeof crypto.randomUUID==="function")return crypto.randomUUID();let c=crypto.getRandomValues(new Uint8Array(16));c[6]=c[6]&15|64,c[8]=c[8]&63|128;let j=Array.from(c,(z)=>z.toString(16).padStart(2,"0")).join("");return`${j.slice(0,8)}-${j.slice(8,12)}-${j.slice(12,16)}-${j.slice(16,20)}-${j.slice(20)}`};
export{B as rc};
export{B as nc};

File diff suppressed because one or more lines are too long

2
dist/release/chunks/index-y3kz7k0j.js vendored Normal file

File diff suppressed because one or more lines are too long

View File

@ -1 +0,0 @@
import{$b as _,Ab as z,Bb as A,Cb as B,Db as C,Eb as D,Fb as E,Gb as F,Hb as G,Ib as H,Jb as I,Kb as J,Lb as K,Mb as L,Nb as M,Ob as N,Pb as O,Qb as P,Rb as Q,Sb as R,Tb as S,Ub as T,Vb as U,Wb as V,Xb as W,Yb as X,Zb as Y,_b as Z,ac as $,bb as a,bc as aa,cb as b,cc as ba,db as c,dc as ca,eb as d,ec as da,fb as e,fc as ea,gb as f,gc as fa,hb as g,hc as ga,ib as h,ic as ha,jb as i,jc as ia,kb as j,kc as ja,lb as k,lc as ka,mb as l,mc as la,nb as m,nc as ma,ob as n,oc as na,pb as o,pc as oa,qb as p,qc as pa,rb as q,sb as r,tb as s,ub as t,vb as u,wb as v,xb as w,yb as x,zb as y}from"./index-9zskwz7p.js";import"./index-6y5pqcvv.js";import"./index-xcg45zk8.js";export{ja as updateMultiTrackSegmentDuration,ga as updateMultiTrackSegmentContent,Q as syncMatchingTasksToPrimaryVideoTrack,ha as syncMatchingTasksToPrimaryVideoSegment,W as splitMultiTrackSegmentByFrames,H as snapTimeToFrame,K as snapSecondsToFrame,I as snapMultiTrackResizeTime,J as snapMultiTrackMoveStartTime,la as setMultiTrackAudioTrackLock,M as segmentDuration,A as secondsToFrame,ia as resizeTaskSegmentEnd,ka as remapTrackDataFrameRate,L as remapFrameToRate,na as parseMultiTrackPreviewResolution,F as parseMultiTrackDurationTimecode,pa as normalizeTrackData,q as normalizeFormatValue,D as multiTrackDbToLinearGain,$ as moveSelectedSegments,_ as moveSegmentBetweenCompatibleTracks,z as mergeSelectedTaskSegments,r as isMoxieEditorFormat,U as getSelectedTaskUserPromptPatch,T as getSelectedTaskUserPrompt,fa as getSelectedMultiTrackSegment,ba as getSegmentDragPreviewSegments,aa as getSegmentDragPlaceholder,s as getMultiTrackTrackHeight,y as getMultiTrackTaskType,x as getMultiTrackTaskModeLabel,ca as getMultiTrackPreviewFrame,P as getInheritedTaskSegmentContent,da as getActivePreviewVideoSegment,ea as getActivePreviewAudioSources,B as frameToSeconds,G as formatMultiTrackTime,E as formatMultiTrackDurationTimecode,V as distributeMultiTrackSegmentsEvenly,Z as deleteSegmentsWithLinkedTasks,Y as deleteSegmentWithLinkedTasks,t as createMultiTrackVideoContent,u as createMultiTrackAudioContent,oa as createDefaultTrackData,ma as collectMultiTrackPreviewResolutionInput,X as cloneMultiTrackSegment,C as clampMultiTrackVolumeDb,N as calculateTotalLength,O as calculateTotalDuration,v as calculateReplacementAudioEndFrame,S as applyCombinedTaskTexts,R as addDefaultTaskSegmentIfRangeEmpty,w as MULTITRACK_TRACK_COLORS,d as MULTITRACK_TASK_MODES,h as MULTITRACK_REF_IMAGE_SIZES,k as MULTITRACK_MIN_VOLUME_DB,c as MULTITRACK_MIN_DURATION_SECONDS,m as MULTITRACK_MEDIA_TRACK_LIMIT,l as MULTITRACK_MAX_VOLUME_DB,n as MULTITRACK_FRAME_RATE_OPTIONS,j as MULTITRACK_DEFAULT_VOLUME_DB,b as MULTITRACK_DEFAULT_TOTAL_LENGTH,e as MULTITRACK_DEFAULT_TASK_MODE,i as MULTITRACK_DEFAULT_REF_IMAGE_SIZE,a as MULTITRACK_DEFAULT_FRAME_RATE,g as MULTITRACK_DEFAULT_CONTINUITY_MODE,f as MULTITRACK_CONTINUITY_MODES,p as FORMAT_INTERNAL_VALUE,o as FORMAT_DISPLAY_LABEL};

View File

@ -0,0 +1 @@
import{$b as _,Ab as z,Bb as A,Cb as B,Db as C,Eb as D,Fb as E,Gb as F,Hb as G,Ib as H,Jb as I,Kb as J,Lb as K,Mb as L,Nb as M,Ob as N,Pb as O,Qb as P,Rb as Q,Sb as R,Tb as S,Ub as T,Vb as U,Wb as V,Xb as W,Yb as X,Zb as Y,_b as Z,ac as $,bb as a,bc as aa,cb as b,cc as ba,db as c,dc as ca,eb as d,ec as da,fb as e,fc as ea,gb as f,gc as fa,hb as g,hc as ga,ib as h,ic as ha,jb as i,jc as ia,kb as j,kc as ja,lb as k,lc as ka,mb as l,mc as la,nb as m,ob as n,pb as o,qb as p,rb as q,sb as r,tb as s,ub as t,vb as u,wb as v,xb as w,yb as x,zb as y}from"./index-y3kz7k0j.js";import"./index-v2752ewf.js";import"./index-dzqmqdeq.js";export{fa as updateMultiTrackSegmentDuration,ca as updateMultiTrackSegmentContent,M as syncMatchingTasksToPrimaryVideoTrack,da as syncMatchingTasksToPrimaryVideoSegment,S as splitMultiTrackSegmentByFrames,D as snapTimeToFrame,G as snapSecondsToFrame,E as snapMultiTrackResizeTime,F as snapMultiTrackMoveStartTime,ha as setMultiTrackAudioTrackLock,I as segmentDuration,w as secondsToFrame,ea as resizeTaskSegmentEnd,ga as remapTrackDataFrameRate,H as remapFrameToRate,ja as parseMultiTrackPreviewResolution,B as parseMultiTrackDurationTimecode,la as normalizeTrackData,z as multiTrackDbToLinearGain,X as moveSelectedSegments,W as moveSegmentBetweenCompatibleTracks,v as mergeSelectedTaskSegments,Q as getSelectedTaskUserPromptPatch,P as getSelectedTaskUserPrompt,ba as getSelectedMultiTrackSegment,Z as getSegmentDragPreviewSegments,Y as getSegmentDragPlaceholder,o as getMultiTrackTrackHeight,u as getMultiTrackTaskType,t as getMultiTrackTaskModeLabel,_ as getMultiTrackPreviewFrame,L as getInheritedTaskSegmentContent,$ as getActivePreviewVideoSegment,aa as getActivePreviewAudioSources,x as frameToSeconds,C as formatMultiTrackTime,A as formatMultiTrackDurationTimecode,R as distributeMultiTrackSegmentsEvenly,V as deleteSegmentsWithLinkedTasks,U as deleteSegmentWithLinkedTasks,p as createMultiTrackVideoContent,q as createMultiTrackAudioContent,ka as createDefaultTrackData,ia as collectMultiTrackPreviewResolutionInput,T as cloneMultiTrackSegment,y as clampMultiTrackVolumeDb,J as calculateTotalLength,K as calculateTotalDuration,r as calculateReplacementAudioEndFrame,O as applyCombinedTaskTexts,N as addDefaultTaskSegmentIfRangeEmpty,s as MULTITRACK_TRACK_COLORS,d as MULTITRACK_TASK_MODES,h as MULTITRACK_REF_IMAGE_SIZES,k as MULTITRACK_MIN_VOLUME_DB,c as MULTITRACK_MIN_DURATION_SECONDS,m as MULTITRACK_MEDIA_TRACK_LIMIT,l as MULTITRACK_MAX_VOLUME_DB,n as MULTITRACK_FRAME_RATE_OPTIONS,j as MULTITRACK_DEFAULT_VOLUME_DB,b as MULTITRACK_DEFAULT_TOTAL_LENGTH,e as MULTITRACK_DEFAULT_TASK_MODE,i as MULTITRACK_DEFAULT_REF_IMAGE_SIZE,a as MULTITRACK_DEFAULT_FRAME_RATE,g as MULTITRACK_DEFAULT_CONTINUITY_MODE,f as MULTITRACK_CONTINUITY_MODES};

View File

@ -1 +1 @@
import{Da as a,Ea as b,Fa as c,Ga as d,Ha as e,Ia as f,Ja as g,Ka as h,La as i,Ma as j}from"./index-eqdkw1y2.js";import"./index-6y5pqcvv.js";import"./index-xcg45zk8.js";export{j as segmentPixelRect,c as secondsToFrames,d as secondsToAudioFrames,b as scaleImageItemsToDuration,g as parseTimeInput,e as framesToSeconds,f as formatTime,i as createDefaultTimelineData,a as computeSlotItems,h as TRACK_DEFAULT_COLORS};
import{Da as a,Ea as b,Fa as c,Ga as d,Ha as e,Ia as f,Ja as g,Ka as h,La as i,Ma as j}from"./index-dtsnfbjr.js";import"./index-v2752ewf.js";import"./index-dzqmqdeq.js";export{j as segmentPixelRect,c as secondsToFrames,d as secondsToAudioFrames,b as scaleImageItemsToDuration,g as parseTimeInput,e as framesToSeconds,f as formatTime,i as createDefaultTimelineData,a as computeSlotItems,h as TRACK_DEFAULT_COLORS};

File diff suppressed because one or more lines are too long

View File

@ -187,7 +187,7 @@
"videoAudioLockTooltip": "(Only effective in MultiTrack Project) Locking makes video generation follow this video track's visual timeline. Video and audio track locks can be enabled together; when both are enabled, the audio track takes priority for audio locking and replacement.",
"enableSpeakerReference": "Reuse as speaker audio",
"disableSpeakerReference": "Stop reusing speaker audio",
"speakerReferenceTooltip": "Reuse this clip as this audio track's @Audio reference in every task. Audio longer than 15 seconds is truncated to its first 15 seconds.",
"speakerReferenceTooltip": "(MiniMax only) Reuse this clip as this audio track's @Audio reference in every task. Audio longer than 15 seconds is truncated to its first 15 seconds.",
"enableSharedReference": "Use as shared reference",
"disableSharedReference": "Stop using as shared reference",
"sharedReferenceTooltip": "Use this media as this track's reference in every task. Shared audio uses up to its first 15 seconds.",

View File

@ -187,7 +187,7 @@
"videoAudioLockTooltip": "(仅多轨项目有效)锁定后,视频生成会遵循该视频轨道画面的时间线。视频轨道音频锁可与音频轨道锁同时启用;同时启用时,音频轨道将优先用于音频锁定和替换。",
"enableSpeakerReference": "复用为说话人音频",
"disableSpeakerReference": "停止复用说话人音频",
"speakerReferenceTooltip": "在每个任务中将此片段复用为该音轨对应的 @音频 引用;超过 15 秒时只取开头 15 秒。",
"speakerReferenceTooltip": "(仅 MiniMax)在每个任务中将此片段复用为该音轨对应的 @音频 引用;超过 15 秒时只取开头 15 秒。",
"enableSharedReference": "设为公共参考",
"disableSharedReference": "取消公共参考",
"sharedReferenceTooltip": "将此媒体作为该轨道在所有任务片段中的公共参考;公共音频最多使用开头 15 秒。",

View File

@ -27,7 +27,6 @@ import {
type MultiTrackVideoMetadata,
type SelectedMultiTrackSegment,
} from '@/lib/multitrack-utils'
import { isMoxieEditorFormat } from '@/lib/multitrack-utils'
import { useMultiTrackResolutionInput } from '@/hooks/use-multitrack-resolution-input'
import { useExpandedImagePreview } from '@/hooks/use-expanded-image-preview'
import { useT } from '@/lib/i18n'
@ -1111,7 +1110,7 @@ export function PreviewArea({
</div>
)}
<span className="shrink-0 px-1 text-[9px] leading-4 text-secondary">|</span>
{isMoxieEditorFormat(resolutionInput.format) && activeTaskPrompt.index > 0 && (
{resolutionInput.format === 'MiniMax' && activeTaskPrompt.index > 0 && (
<>
<Select
value={activeTaskPrompt.content.continuity_mode ?? MULTITRACK_DEFAULT_CONTINUITY_MODE}
@ -1148,7 +1147,7 @@ export function PreviewArea({
<span className="shrink-0 px-1 text-[9px] leading-4 text-secondary">|</span>
</>
)}
{isMoxieEditorFormat(resolutionInput.format) && ['ref','edit'].includes(activeTaskPrompt.taskMode) && (
{resolutionInput.format === 'MiniMax' && ['ref','edit'].includes(activeTaskPrompt.taskMode) && (
<>
<Select
value={activeTaskPrompt.content.ref_image_size ?? MULTITRACK_DEFAULT_REF_IMAGE_SIZE}
@ -1342,7 +1341,7 @@ export function PreviewArea({
mediaTracks={data.tracks.filter((track) => track.type === 'audio' || track.type === 'video')}
frameRate={data.frame_rate}
totalFrames={data.total_length}
imageIndexOffset={isMoxieEditorFormat(resolutionInput.format) ? 1 : 0}
imageIndexOffset={resolutionInput.format === 'MiniMax' ? 1 : 0}
format={resolutionInput.format}
onContentChange={onSelectedSegmentContentChange}
onTrackSegmentsContentChange={onTrackSegmentsContentChange}

View File

@ -42,7 +42,6 @@ import {
parseMultiTrackDurationTimecode,
segmentDuration,
} from '@/lib/multitrack-utils'
import { isMoxieEditorFormat, normalizeFormatValue } from '@/lib/multitrack-utils'
import { cn } from '@/lib/utils'
import {
createTaskImage,
@ -232,17 +231,13 @@ export function TaskSegmentEditor({
frameRate = MULTITRACK_DEFAULT_FRAME_RATE,
totalFrames,
imageIndexOffset = 0,
format: rawFormat,
format,
onContentChange,
onTrackSegmentsContentChange,
onTrackSegmentsChange,
onDurationChange,
onOpenImagePreview,
}: Readonly<TaskSegmentEditorProps>) {
const format = normalizeFormatValue(rawFormat)
// The pack ships exactly one video format, so editor features must stay
// available even when the format widget value is missing or unrecognized.
const isMoxieFormat = isMoxieEditorFormat(rawFormat)
const t = useT()
const draggedImageIdRef = useRef<string | null>(null)
const [promptTab, setPromptTab] = useState<PromptTab>('user')
@ -282,7 +277,7 @@ export function TaskSegmentEditor({
const promptValue = editMode === 'combined'
? combinedPromptInput
: getSelectedTaskUserPrompt(segment.content)
const usesMiniMaxPromptPlaceholder = isMoxieFormat
const usesMiniMaxPromptPlaceholder = format === 'MiniMax'
const promptPlaceholder = usesMiniMaxPromptPlaceholder
? t('multitrack.minimaxPromptPlaceholder')
: t('multitrack.promptPlaceholder')
@ -1232,7 +1227,7 @@ export function TaskSegmentEditor({
</div>
<div className="flex items-center gap-2">
{isMoxieFormat && (taskIndex > 0 || hasSelectedContinuityTargets) && (
{format === 'MiniMax' && (taskIndex > 0 || hasSelectedContinuityTargets) && (
<Select
value={continuityMode}
onValueChange={(value) => handleDropdownContentChange({
@ -1260,7 +1255,7 @@ export function TaskSegmentEditor({
</SelectContent>
</Select>
)}
{isMoxieFormat && ['ref','edit'].includes(mode) && (
{format === 'MiniMax' && ['ref','edit'].includes(mode) && (
<Select
value={refImageSize}
onValueChange={(value) => handleDropdownContentChange({ ref_image_size: value as MultiTrackRefImageSize })}

View File

@ -15,7 +15,6 @@ import {
snapTimeToFrame,
type SegmentDragPlaceholder,
} from '@/lib/multitrack-utils'
import { isMoxieEditorFormat } from '@/lib/multitrack-utils'
import type { MultiTrack, MultiTrackSegment, MultiTrackTaskImage, MultiTrackType } from '@/types/multitrack'
import type { MultiTrackSourceType, TrackData } from '@/types/multitrack'
import { MULTITRACK_LEFT_GUTTER, MULTITRACK_RIGHT_RESERVE } from './MultiTrackRuler'
@ -610,7 +609,7 @@ export function TrackArea({
onDragPreviewChange={updateDragPlaceholder}
getDragPreviewStart={snappedMoveStartTime}
onDragPreviewEnd={() => setDragPlaceholder(null)}
audioLockEnabled={isMoxieEditorFormat(format)}
audioLockEnabled={format === 'MiniMax'}
/>
)
}
@ -644,7 +643,7 @@ export function TrackArea({
onRecognizeSubtitles={onRecognizeSubtitles}
cutMode={cutMode}
onCutSegment={onCutSegment}
audioLockEnabled={isMoxieEditorFormat(format)}
audioLockEnabled={format === 'MiniMax'}
/>
)
}

View File

@ -44,15 +44,10 @@ const DEFAULT_COMPARE_VIDEO_VALUE = JSON.stringify({
const comfyApp = globalThis.comfyAPI!.app.app
// Bump on every rebuilt release bundle so users can verify the served editor
// build in the browser console (stale-cache debugging).
const FRONTEND_BUNDLE_VERSION = '2026-09-28.1'
comfyApp.registerExtension({
name: 'Comfy.EasyMedia.widgets',
async setup() {
console.info(`[Moxie Multimedia Suite] editor bundle ${FRONTEND_BUNDLE_VERSION}`)
installWorkflowSubmission(comfyApp)
addInlineStyles(
__COMFY_EASY_MEDIA_GLOBAL_CSS__,

View File

@ -28,23 +28,6 @@ export const MULTITRACK_MAX_VOLUME_DB = 6
export const MULTITRACK_MEDIA_TRACK_LIMIT = 3
export const MULTITRACK_FRAME_RATE_OPTIONS = [16, 20, 24, 25, 30, 50, 60] as const
// The format combo displays the pack's own branding to users; the editor and
// the backend chain key on the internal format value.
export const FORMAT_DISPLAY_LABEL = 'Moxie Multimedia'
export const FORMAT_INTERNAL_VALUE = 'MiniMax'
export function normalizeFormatValue(value: string | null | undefined): string {
const trimmed = (value ?? '').trim()
return trimmed === FORMAT_DISPLAY_LABEL ? FORMAT_INTERNAL_VALUE : trimmed
}
// MiniMax-gated editor features stay enabled even when the format widget value
// is missing or unrecognized: the pack ships exactly one video format.
export function isMoxieEditorFormat(value: string | null | undefined): boolean {
const normalized = normalizeFormatValue(value)
return normalized === FORMAT_INTERNAL_VALUE || normalized === ''
}
export function getMultiTrackTrackHeight(type: string, taskOverview = false): number {
if (type === 'task') return taskOverview ? 64 : 30
if (type === 'subtitle') return 30
@ -130,9 +113,7 @@ export function getMultiTrackTaskType(
if (mode === 'l2v') return 'l2v'
if (mode === 'ref') return hasVideoInRange ? 'rv2v' : 'r2v'
if (mode === 'edit') return imageCount > 0 ? 'vi2v' : 'v2v'
// The Moxie model set is reference-conditioned: a T2V selection must
// produce the exact same value as R2V (mirrors utils/h3_project.py).
if (imageCount <= 0) return 'r2v'
if (imageCount <= 0) return 't2v'
if (imageCount === 1) return 'i2v'
if (imageCount === 2) return 'fl2v'
return 'fmlf2v'
@ -1493,7 +1474,7 @@ export function collectMultiTrackPreviewResolutionInput(node: unknown): MultiTra
const megapixels = positiveNumber(readWidgetValue(widgetByName.get('resolution.megapixels')))
if (megapixels !== null) collected.megapixels = megapixels
const format = readWidgetValue(widgetByName.get('format'))
if (typeof format === 'string') collected.format = normalizeFormatValue(format)
if (typeof format === 'string') collected.format = format
return collected
}

View File

@ -292,9 +292,7 @@ describe('TaskSegmentEditor', () => {
})
it.each([
// 0 images: the T2V selection resolves to the exact same value as R2V
// (reference-conditioned Moxie model set), so the label reads R2V.
[0, 'R2V'],
[0, 'T2V'],
[1, 'I2V'],
[2, 'FL2V'],
[3, 'FMLF2V'],

View File

@ -17,7 +17,6 @@ import {
getActivePreviewVideoSegment,
getActivePreviewAudioSources,
getMultiTrackTaskModeLabel,
getMultiTrackTaskType,
getSelectedMultiTrackSegment,
frameToSeconds,
getSegmentDragPlaceholder,
@ -43,16 +42,6 @@ import {
} from '@/lib/multitrack-utils'
describe('multitrack utilities', () => {
it('resolves a T2V selection to the exact same task type as R2V', () => {
// The Moxie model set is reference-conditioned: text-only default-mode
// segments must drive the identical value the R2V setting produces.
expect(getMultiTrackTaskType('default', 0, false)).toBe('r2v')
expect(getMultiTrackTaskType('ref', 0, false)).toBe('r2v')
expect(getMultiTrackTaskType('ref', 0, true)).toBe('rv2v')
expect(getMultiTrackTaskType('default', 1, false)).toBe('i2v')
expect(getMultiTrackTaskType('l2v', 0, false)).toBe('l2v')
})
it('merges consecutive selected task segments using the first segment with prompt or active images', () => {
const data = createDefaultTrackData()
const taskTrack = data.tracks[0]

View File

@ -210,10 +210,11 @@ CATEGORY_LOGIC = "EasyUse/Logic"
CATEGORY_VIDEO = "EasyUse/Video"
PROMPT_FORMAT_OPTIONS = ["default", "promptRelay"]
# The format combo displays the pack's own branding to users; every consumer
# in the chain - tracks_info, conditioning caches, saved project manifests,
# frontend lookups - keys on the legacy internal value, so queued values are
# normalized back at both node entries (and check_lazy_status) below.
# Legacy tolerance only: workflows saved while the format combo displayed a
# branded label still queue that label; every consumer in the chain -
# tracks_info, conditioning caches, saved project manifests, frontend lookups -
# keys on the internal value below, so queued values are normalized back at
# both node entries (and check_lazy_status) at execution time.
FORMAT_DISPLAY_LABEL = "Moxie Multimedia"
FORMAT_INTERNAL_VALUE = "MiniMax"
@ -1258,7 +1259,7 @@ class TimelineEditor(io.ComfyNode):
options=resolution_combo_options,
tooltip="Select a resolution or choose 'Custom' to specify your own width and height.",
),
io.Combo.Input("format", options=[FORMAT_DISPLAY_LABEL], default=FORMAT_DISPLAY_LABEL, tooltip="Moxie Multimedia Suite only supports the bundled Moxie video model."),
io.Combo.Input("format", options=[FORMAT_INTERNAL_VALUE], default=FORMAT_INTERNAL_VALUE, tooltip="Moxie Multimedia Suite only supports the bundled Moxie video model."),
TYPE_TIMELINE.Input(
"timeline_data",
),
@ -1883,7 +1884,7 @@ class MultiTrackEditor(io.ComfyNode):
options=resolution_combo_options,
tooltip="Select a resolution or choose 'Custom'. Width and height of 32 enable audio-only output in MultiTrack Project.",
),
io.Combo.Input("format", options=[FORMAT_DISPLAY_LABEL], default=FORMAT_DISPLAY_LABEL, tooltip="Moxie Multimedia Suite only supports the bundled Moxie video model."),
io.Combo.Input("format", options=[FORMAT_INTERNAL_VALUE], default=FORMAT_INTERNAL_VALUE, tooltip="Moxie Multimedia Suite only supports the bundled Moxie video model."),
TYPE_TRACK_DATA.Input("track_data"),
io.AnyType.Input("prompt_override", optional=True, tooltip="If provided, overrides all segment prompts in the timeline.",),
io.Image.Input("image", optional=True, lazy=True, tooltip="Optional image media list for slot-based multitrack segments."),
@ -2686,10 +2687,7 @@ def _multitrack_task_type(task: dict, image_count: int, has_video: bool) -> str:
content = task.get("content", {})
explicit_task_type = content.get("task_type") if isinstance(content, dict) else None
if isinstance(explicit_task_type, str) and explicit_task_type.strip():
normalized = explicit_task_type.strip().lower()
# The Moxie model set is reference-conditioned: T2V must yield the
# exact same value as R2V (mirrors utils.h3_project.h3_task_type).
return "r2v" if normalized == "t2v" else normalized
return explicit_task_type.strip()
mode = content.get("task_mode", "default") if isinstance(content, dict) else "default"
if mode == "l2v":
return "l2v"
@ -2697,7 +2695,7 @@ def _multitrack_task_type(task: dict, image_count: int, has_video: bool) -> str:
return "rv2v" if has_video else "r2v"
if mode == "edit":
return "vi2v" if image_count > 0 else "v2v"
return "i2v" if image_count > 0 else "r2v"
return "i2v" if image_count > 0 else "t2v"
# code based on https://github.com/RH-RunningHub/ComfyUI-RH-Bernini/blob/main/nodes_bernini.py

View File

@ -370,21 +370,22 @@ check(
and "Lanczos fallback" in rtx_source,
)
# 16. format combo displays the pack branding; the chain keeps MiniMax
# 16. format combo is the single internal value again; legacy label kept only
# as execution-time tolerance for old queued workflows
basic_source = (PACK / "nodes" / "basic.py").read_text(encoding="utf-8")
check(
"format combo shows Moxie Multimedia",
basic_source.count('options=[FORMAT_DISPLAY_LABEL]') == 2
and 'FORMAT_DISPLAY_LABEL = "Moxie Multimedia"' in basic_source
"format combo shows MiniMax",
basic_source.count('options=[FORMAT_INTERNAL_VALUE]') == 2
and 'options=[FORMAT_DISPLAY_LABEL]' not in basic_source
and 'FORMAT_INTERNAL_VALUE = "MiniMax"' in basic_source,
)
check(
"format normalized at both node entries and lazy check",
"legacy queued values still normalized at both node entries and lazy check",
basic_source.count("\n format = _normalize_format(format)") == 2
and "\n raw_format = _normalize_format(format)" in basic_source,
)
# 17. shipped templates carry the display label on the editor widget
# 17. shipped templates carry the internal format value on the editor widget
import json as _json
for name in ("Moxie-consolidated.json", "Moxie.json", "Moxie-clean.json"):
@ -395,20 +396,21 @@ for name in ("Moxie-consolidated.json", "Moxie.json", "Moxie-clean.json"):
if node.get("type") == "easy multiTrackEditor"
)
check(
f"{name} format widget relabeled",
editor["widgets_values"][2] == "Moxie Multimedia"
and editor["widgets_values_named"]["format"] == "Moxie Multimedia",
f"{name} format widget is MiniMax",
editor["widgets_values"][2] == "MiniMax"
and editor["widgets_values_named"]["format"] == "MiniMax",
)
# 18. frontend normalizes the display label back to the internal value
# 18. frontend is pristine upstream: no display-label mapping, t2v native
frontend_utils = (
PACK / "frontend" / "src" / "lib" / "multitrack-utils.ts"
).read_text(encoding="utf-8")
check(
"frontend format normalization present",
"normalizeFormatValue" in frontend_utils
and "FORMAT_DISPLAY_LABEL = 'Moxie Multimedia'" in frontend_utils
and "collected.format = normalizeFormatValue(format)" in frontend_utils,
"frontend has no format mapping and resolves t2v natively",
"normalizeFormatValue" not in frontend_utils
and "FORMAT_DISPLAY_LABEL" not in frontend_utils
and 'collected.format = format' in frontend_utils
and "return 't2v'" in frontend_utils,
)
# --- MoxieCombine output cleanup (GetVideoComponents-style) ------------------

View File

@ -1,12 +1,12 @@
#!/usr/bin/env python3
"""Standalone verification: T2V == R2V normalization + one-model loader.
"""Standalone verification: native T2V resolution + one-model loader.
No ComfyUI required. Checks (matching the standing verification rules):
1. utils/h3_project.py - h3_task_type / h3_generation_mode normalize T2V
to the exact same value as R2V (functions extracted via AST).
2. nodes/basic.py - _multitrack_task_type mirrors the normalization.
3. utils/llm_api.py - reference-mode with zero media falls back to the
cloud-native text-only mode instead of raising.
1. utils/h3_project.py - h3_task_type / h3_generation_mode resolve T2V
natively (t2v stays t2v; multi_frames generation mode).
2. nodes/basic.py - _multitrack_task_type mirrors the native values.
3. utils/llm_api.py - reference-mode with zero media raises; t2v maps
to the cloud-native text-only mode.
4. moxie_loader.py - schema shows a single model picker; execute()
auto-picks LoRA/VAE/CLIP from the pack's models/ folders and still
applies the LoRA to model+clip at strength 1.0.
@ -88,7 +88,7 @@ def extract_constant(path, name):
# ---------------------------------------------------------------------------
# 1. utils/h3_project.py - T2V -> R2V at the resolution choke point
# 1. utils/h3_project.py - T2V resolves natively (upstream behavior)
# ---------------------------------------------------------------------------
def verify_h3_project():
@ -98,11 +98,8 @@ def verify_h3_project():
h3_ns = extract_functions(
h3_file,
["h3_task_type", "h3_generation_mode", "_normalize_task_type", "_frame_value"],
constants=("_T2V_EQUIVALENT_TASK_TYPE",),
["h3_task_type", "h3_generation_mode", "_frame_value"],
)
equiv = h3_ns["_T2V_EQUIVALENT_TASK_TYPE"]
check("t2v equivalent constant is r2v", equiv == "r2v", repr(equiv))
def muted_image(image):
return bool(isinstance(image, dict) and image.get("muted"))
@ -130,18 +127,18 @@ def verify_h3_project():
content["images"] = images
return {"start_frame": 0, "end_frame": 48, "task": {"content": content}}
check("default mode, no images -> r2v (was t2v)",
h3_task_type(entry_for(mode="default"), make_info()) == "r2v")
check("no task_mode, no images -> r2v (was t2v)",
h3_task_type(entry_for(), make_info()) == "r2v")
check("explicit t2v -> r2v",
h3_task_type(entry_for(task_type="t2v"), make_info()) == "r2v")
check("explicit T2V (uppercase) -> r2v",
h3_task_type(entry_for(task_type="T2V"), make_info()) == "r2v")
check("default mode, no images -> t2v",
h3_task_type(entry_for(mode="default"), make_info()) == "t2v")
check("no task_mode, no images -> t2v",
h3_task_type(entry_for(), make_info()) == "t2v")
check("explicit t2v -> t2v",
h3_task_type(entry_for(task_type="t2v"), make_info()) == "t2v")
check("explicit T2V (uppercase) -> t2v",
h3_task_type(entry_for(task_type="T2V"), make_info()) == "t2v")
check("explicit custom type passes through",
h3_task_type(entry_for(task_type="wan-2.2-fun"), make_info()) == "wan-2.2-fun")
check("muted images ignored -> r2v (was t2v)",
h3_task_type(entry_for(images=[{"muted": True}]), make_info()) == "r2v")
check("muted images ignored -> t2v",
h3_task_type(entry_for(images=[{"muted": True}]), make_info()) == "t2v")
check("one active image -> i2v unchanged",
h3_task_type(entry_for(images=[{"id": "a"}]), make_info()) == "i2v")
check("ref mode, no video -> r2v",
@ -153,8 +150,8 @@ def verify_h3_project():
check("edit mode, no images -> v2v",
h3_task_type(entry_for(mode="edit"), make_info()) == "v2v")
check("generation_mode(t2v) -> reference (belt and braces)",
h3_generation_mode("t2v") == "reference")
check("generation_mode(t2v) -> multi_frames",
h3_generation_mode("t2v") == "multi_frames")
check("generation_mode(r2v) -> reference",
h3_generation_mode("r2v") == "reference")
check("generation_mode(rv2v) -> reference",
@ -175,11 +172,11 @@ def verify_basic_node():
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "nodes", "basic.py"
)
resolver = extract_functions(basic_file, ["_multitrack_task_type"])["_multitrack_task_type"]
check("explicit t2v -> r2v",
resolver({"content": {"task_type": "t2v"}}, 0, False) == "r2v")
check("default mode, no images -> r2v (was t2v)",
resolver({"content": {"task_mode": "default"}}, 0, False) == "r2v")
check("no content -> r2v (was t2v)", resolver({}, 0, False) == "r2v")
check("explicit t2v -> t2v",
resolver({"content": {"task_type": "t2v"}}, 0, False) == "t2v")
check("default mode, no images -> t2v",
resolver({"content": {"task_mode": "default"}}, 0, False) == "t2v")
check("no content -> t2v", resolver({}, 0, False) == "t2v")
check("custom type kept",
resolver({"content": {"task_type": "wan-2.2-fun"}}, 0, False) == "wan-2.2-fun")
check("ref mode no video -> r2v",
@ -191,7 +188,7 @@ def verify_basic_node():
# ---------------------------------------------------------------------------
# 3. utils/llm_api.py - reference-mode with zero media -> text-only cloud mode
# 3. utils/llm_api.py - reference-mode needs media; t2v is the text-only path
# ---------------------------------------------------------------------------
def verify_llm_api():
@ -200,10 +197,18 @@ def verify_llm_api():
os.path.dirname(os.path.dirname(os.path.abspath(__file__))), "utils", "llm_api.py"
)
media_resolver = extract_functions(llm_file, ["_h3_media_for_task_type"])["_h3_media_for_task_type"]
check("r2v with zero media -> t2va text-only (no raise)",
media_resolver("r2v", [], [], []) == ("t2va", [], [], []))
check("rv2v with zero media -> t2va text-only",
media_resolver("rv2v", [], [], []) == ("t2va", [], [], []))
def raises_requires_media(task_type):
try:
media_resolver(task_type, [], [], [])
except ValueError as exc:
return "requires reference media" in str(exc)
return False
check("r2v with zero media raises (upstream behavior)",
raises_requires_media("r2v"))
check("rv2v with zero media raises",
raises_requires_media("rv2v"))
check("r2v with media -> r2va",
media_resolver("r2v", ["img1", "img2"], ["vid"], ["aud"]) == ("r2va", ["img1", "img2"], ["vid"], ["aud"]))
check("direct t2v still -> t2va",
@ -325,6 +330,14 @@ def _install_loader_stubs(state):
sys.modules["comfy.ldm.modules"] = comfy_ldm_modules
sys.modules["comfy.ldm.modules.attention"] = comfy_attention
# Minimal torch stand-in: moxie_loader only touches dtype constants and
# torch.device("cpu") at execution time.
sys.modules["torch"] = types.SimpleNamespace(
float8_e4m3fn="float8_e4m3fn",
float8_e5m2="float8_e5m2",
device=lambda *args, **kwargs: ("device",) + tuple(args),
)
def _load_loader_module():
pack_dir = os.path.dirname(os.path.dirname(os.path.abspath(__file__)))

View File

@ -93,24 +93,7 @@ def test_h3_task_type_ignores_muted_reference_images():
entry = h3_task_entries(info)[0]
entry["task"]["content"]["images"] = [{"muted": True}]
# The Moxie model set is reference-conditioned: T2V resolves to the
# exact same value as R2V.
assert h3_task_type(entry, info) == "r2v"
def test_h3_task_type_normalizes_explicit_t2v_to_r2v():
info = _tracks_info()
entry = h3_task_entries(info)[0]
entry["task"]["content"]["task_type"] = "t2v"
assert h3_task_type(entry, info) == "r2v"
def test_h3_generation_mode_maps_t2v_to_reference():
# Belt and braces: even a raw t2v value must behave exactly like R2V.
assert h3_generation_mode("t2v") == "reference"
assert h3_generation_mode("r2v") == "reference"
assert h3_generation_mode("i2v") == "multi_frames"
assert h3_task_type(entry, info) == "t2v"
def test_parse_tracks_info_rejects_invalid_dimensions():

View File

@ -340,9 +340,6 @@ def test_video_data_uri_enforces_duration_even_when_file_is_under_size_limit(mon
("l2v", "i2va", 1, 0, 0),
("v2v", "r2va", 2, 1, 1),
("r2v", "r2va", 2, 1, 1),
# Reference-mode with zero media falls back to the cloud's native
# text-only mode (T2V selections resolve to r2v upstream).
("r2v", "t2va", 0, 0, 0),
("vi2v", "r2va", 2, 1, 1),
("rv2v", "r2va", 2, 1, 1),
],

View File

@ -2305,8 +2305,7 @@ def test_multitrack_h3_project_expands_single_task_sampling_pipeline(monkeypatch
assert nodes_by_type["KSamplerSelect"]["inputs"]["sampler_name"] == "er_sde"
assert "ManualSigmas" in nodes_by_type
conditioning = nodes_by_type["easy minimaxH3ToVideo"]["inputs"]
# T2V selections resolve to the exact same value as R2V (reference).
assert conditioning["mode"] == "reference"
assert conditioning["mode"] == "multi_frames"
assert conditioning["ref_image_size"] == "match"
assert (conditioning["width"], conditioning["height"]) == (1344, 768)
assert "SamplerCustomAdvanced" in nodes_by_type

View File

@ -1369,9 +1369,7 @@ def test_multitrack_editor_prompt_override_preserves_explicit_task_type():
assert task_content["task_type"] == "t2v"
assert task_content["task_mode"] == "default"
# Raw content keeps the explicit override tag, but resolved task types
# normalize T2V to the exact same value as R2V.
assert task_result.values[2] == "r2v"
assert task_result.values[2] == "t2v"
def test_multitrack_editor_prompt_override_outputs_custom_task_type_string():

View File

@ -400,19 +400,6 @@ def h3_second_pass_dimensions(
)
# The shipped Moxie model set is reference-conditioned (r2v): a T2V selection
# must drive the exact same value as R2V so the model is never conditioned as
# a plain text-to-video task.
_T2V_EQUIVALENT_TASK_TYPE = "r2v"
def _normalize_task_type(task_type: str) -> str:
normalized = task_type.strip().lower()
if normalized == "t2v":
return _T2V_EQUIVALENT_TASK_TYPE
return normalized
def h3_task_type(entry: dict[str, Any], info: dict[str, Any]) -> str:
task = entry.get("task", {})
content = task.get("content", {}) if isinstance(task, dict) else {}
@ -420,7 +407,7 @@ def h3_task_type(entry: dict[str, Any], info: dict[str, Any]) -> str:
content = {}
explicit_type = content.get("task_type")
if isinstance(explicit_type, str) and explicit_type.strip():
return _normalize_task_type(explicit_type)
return explicit_type.strip().lower()
start_frame = _frame_value(entry.get("start_frame"))
end_frame = _frame_value(entry.get("end_frame"))
@ -452,7 +439,7 @@ def h3_task_type(entry: dict[str, Any], info: dict[str, Any]) -> str:
return "rv2v" if has_video else "r2v"
if mode == "edit":
return "vi2v" if image_count > 0 else "v2v"
return "i2v" if image_count > 0 else _T2V_EQUIVALENT_TASK_TYPE
return "i2v" if image_count > 0 else "t2v"
def _h3_locked_track(
@ -514,11 +501,7 @@ def h3_generation_mode(task_type: str) -> str:
return "reference"
if normalized == "l2v":
return "last_frame"
if normalized == "t2v":
# Belt and braces: T2V must behave exactly like R2V even if a raw
# t2v value bypasses h3_task_type.
return "reference"
if normalized == "i2v":
if normalized in {"t2v", "i2v"}:
return "multi_frames"
raise ValueError(f"Unsupported H3 task type: {task_type}")

View File

@ -925,11 +925,7 @@ class PromptEnhancerClient:
return "i2va", selected_images, [], []
if normalized_type in {"v2v", "r2v", "vi2v", "rv2v"}:
if not (images or videos or audios):
# Reference-mode with zero reference media: the local Moxie
# model handles text-only renders in reference conditioning,
# but the cloud API has a native text-only mode - use it
# instead of failing (T2V selections resolve to r2v).
return "t2va", [], [], []
raise ValueError(f"MiniMax {normalized_type} requires reference media.")
if len(images) > 9:
raise ValueError("MiniMax r2va supports at most 9 reference images.")
if len(videos) > 3:

48
web/js/editor-loader.js Normal file
View File

@ -0,0 +1,48 @@
// Editor bundle loader.
//
// WHY THIS FILE EXISTS
// ComfyUI core (nodes.py, load_custom_node) lets a pack's WEB_DIRECTORY
// overwrite its EXTENSION_WEB_DIRS entry after the pack's __init__.py has
// run. This pack ships WEB_DIRECTORY = "./web" (the helper files next to
// this loader), so core's static mount and the browser's /extensions listing
// only ever see THIS directory - never dist/release. The React editor entry
// (dist/release/index.js) would therefore never be imported on a fresh
// browser, and the editor only appeared for people whose browser still held
// an old cached copy.
//
// This loader bridges that gap: the frontend imports every listed extension
// file (this one included), and this file then imports the real editor entry
// from the pack's own static mount "/<pack>/index.js", which __init__.py
// serves with "Cache-Control: no-cache, must-revalidate". The entry file is
// therefore always revalidated, and its relative chunk imports
// ("./chunks/...") resolve against the same mount, which serves the
// content-hashed chunk files that ship next to it. No cache can pin a stale
// editor bundle anymore.
//
// The pack folder name is derived from this file's own URL
// (.../extensions/<pack>/js/editor-loader.js), so the loader works no matter
// what the pack directory is called.
const segments = new URL(import.meta.url).pathname
.split('/')
.filter(Boolean)
.map(decodeURIComponent);
const extensionsIndex = segments.lastIndexOf('extensions');
const packName = extensionsIndex >= 0 ? segments[extensionsIndex + 1] : null;
if (!packName) {
console.warn(
'[Moxie Multimedia Suite] editor loader could not resolve the pack folder from',
import.meta.url,
);
} else {
// Base prefix covers deployments behind a sub-path reverse proxy
// ("/comfyui/extensions/<pack>/..." -> "/comfyui/"); the pack's own
// static mount sits at "<base><pack>/".
const base = '/' + segments.slice(0, extensionsIndex).join('/') + '/';
// Top-level await: extension scripts are awaited before ComfyUI registers
// node definitions, so the editor's registerExtension()/custom-widget
// hooks stay in the normal loading order.
await import(`${base}${packName}/index.js`);
}