diff --git a/CHANGELOG.md b/CHANGELOG.md index 212fbdd..b900bac 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,7 @@ ### ⚡ Improvements - **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 both the `VIDEO` output and the `images`/`audio`/`fps` outputs carry 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. +- **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. - **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 `""` 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. diff --git a/Moxie-clean.json b/Moxie-clean.json index e59bac1..c74da29 100644 --- a/Moxie-clean.json +++ b/Moxie-clean.json @@ -808,13 +808,13 @@ "widgets_values": [ "960 x 544 (16:9)", "pad", - "MiniMax", + "Moxie Multimedia", "{\"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": "MiniMax", + "format": "Moxie Multimedia", "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}" } }, diff --git a/Moxie-consolidated.json b/Moxie-consolidated.json index ebef878..28d1538 100644 --- a/Moxie-consolidated.json +++ b/Moxie-consolidated.json @@ -258,13 +258,13 @@ "widgets_values": [ "960 x 544 (16:9)", "pad", - "MiniMax", + "Moxie Multimedia", "{\"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": "MiniMax", + "format": "Moxie Multimedia", "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}" } }, diff --git a/Moxie.json b/Moxie.json index 7be019a..71c4de2 100644 --- a/Moxie.json +++ b/Moxie.json @@ -999,13 +999,13 @@ "widgets_values": [ "960 x 544 (16:9)", "pad", - "MiniMax", + "Moxie Multimedia", "{\"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": "MiniMax", + "format": "Moxie Multimedia", "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}" } }, diff --git a/frontend/src/lib/multitrack-utils.ts b/frontend/src/lib/multitrack-utils.ts index a0d51a0..39d78f5 100644 --- a/frontend/src/lib/multitrack-utils.ts +++ b/frontend/src/lib/multitrack-utils.ts @@ -28,6 +28,15 @@ 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): string { + return value === FORMAT_DISPLAY_LABEL ? FORMAT_INTERNAL_VALUE : value +} + export function getMultiTrackTrackHeight(type: string, taskOverview = false): number { if (type === 'task') return taskOverview ? 64 : 30 if (type === 'subtitle') return 30 @@ -1474,7 +1483,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 = format + if (typeof format === 'string') collected.format = normalizeFormatValue(format) return collected } diff --git a/nodes/basic.py b/nodes/basic.py index b34db9a..66a56b3 100644 --- a/nodes/basic.py +++ b/nodes/basic.py @@ -209,6 +209,23 @@ CATEGORY_AUDIO = "EasyUse/Audio" 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. +FORMAT_DISPLAY_LABEL = "Moxie Multimedia" +FORMAT_INTERNAL_VALUE = "MiniMax" + + +def _normalize_format(format: object) -> str: + """Map the combo's display label (or a legacy queued value) to the + internal format value the whole chain speaks.""" + if isinstance(format, list): + format = format[0] if format else FORMAT_INTERNAL_VALUE + if format in (None, "", FORMAT_DISPLAY_LABEL, FORMAT_INTERNAL_VALUE): + return FORMAT_INTERNAL_VALUE + return str(format) LLAMA_CPP_INSTRUCT_NODE_ID = "llama_cpp_instruct_adv" LLAMA_CPP_IMAGE_LIST_BRIDGE_NODE_ID = "easy multiTrackPromptEnhancerImageListBridge" MULTITRACK_PROMPT_PROJECT_APPLY_NODE_ID = ( @@ -1241,7 +1258,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=["MiniMax"], default="MiniMax", tooltip="Moxie Multimedia Suite only supports the bundled Moxie video model."), + io.Combo.Input("format", options=[FORMAT_DISPLAY_LABEL], default=FORMAT_DISPLAY_LABEL, tooltip="Moxie Multimedia Suite only supports the bundled Moxie video model."), TYPE_TIMELINE.Input( "timeline_data", ), @@ -1267,8 +1284,7 @@ class TimelineEditor(io.ComfyNode): # is_input_list=True: every param arrives as a list; unwrap scalars here if isinstance(resolution, list): resolution = resolution[0] - if isinstance(format, list): - format = format[0] + format = _normalize_format(format) if isinstance(timeline_data, list): timeline_data = timeline_data[0] @@ -1867,7 +1883,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=["MiniMax"], default="MiniMax", tooltip="Moxie Multimedia Suite only supports the bundled Moxie video model."), + io.Combo.Input("format", options=[FORMAT_DISPLAY_LABEL], default=FORMAT_DISPLAY_LABEL, 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."), @@ -1894,7 +1910,7 @@ class MultiTrackEditor(io.ComfyNode): video: object = None, ) -> list[str]: del resolution - raw_format = format[0] if isinstance(format, list) and format else format + raw_format = _normalize_format(format) raw_track_data = track_data[0] if isinstance(track_data, list) and track_data else track_data raw_override = ( prompt_override[0] @@ -1932,8 +1948,7 @@ class MultiTrackEditor(io.ComfyNode): ) -> io.NodeOutput: if isinstance(resolution, list): resolution = resolution[0] - if isinstance(format, list): - format = format[0] + format = _normalize_format(format) if isinstance(track_data, list): track_data = track_data[0] diff --git a/scripts/test_rtx_upscale_integration.py b/scripts/test_rtx_upscale_integration.py index da8b6af..a67ccfd 100644 --- a/scripts/test_rtx_upscale_integration.py +++ b/scripts/test_rtx_upscale_integration.py @@ -361,9 +361,60 @@ check( ), ) -# 15. everything touched compiles +# --- format combo relabel + quiet console ----------------------------------- +# 15. the per-run upscale console line is gone (fallback diagnostics stay) +rtx_source = (PACK / "utils" / "rtx_vsr.py").read_text(encoding="utf-8") +check( + "per-run upscale console line removed", + "Output upscale:" not in rtx_source + and "Lanczos fallback" in rtx_source, +) + +# 16. format combo displays the pack branding; the chain keeps MiniMax +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 + and 'FORMAT_INTERNAL_VALUE = "MiniMax"' in basic_source, +) +check( + "format 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 +import json as _json + +for name in ("Moxie-consolidated.json", "Moxie.json", "Moxie-clean.json"): + template = _json.loads((PACK / name).read_text(encoding="utf-8")) + editor = next( + node + for node in template["nodes"] + 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", + ) + +# 18. frontend normalizes the display label back to the internal value +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, +) + +# 19. everything touched compiles for rel in ( "nodes/project.py", + "nodes/basic.py", "moxie_combine.py", "utils/rtx_vsr.py", "utils/h3_project.py", diff --git a/utils/rtx_vsr.py b/utils/rtx_vsr.py index 13b83f5..3619f36 100644 --- a/utils/rtx_vsr.py +++ b/utils/rtx_vsr.py @@ -192,10 +192,6 @@ def upscale_images_to_project_resolution( output_height, ): return images - _log( - f"Output upscale: {int(images.shape[2])}x{int(images.shape[1])} -> " - f"{output_width}x{output_height}" - ) return rtx_vsr_upscale(images, output_width, output_height)