feat: scrub EasyMedia/MiniMax branding from all user-facing output
Console, errors, tooltips, descriptions and display names no longer reveal the pack heritage or the underlying model family: - [EasyMedia]/[Easy Media] console prefixes -> [Moxie] (11 files) - New console privacy filter (utils/log.py, installed at pack import): rewrites MiniMax variants in every displayed logging record, including ComfyUI core lines like 'Model MiniMaxH3 prepared for dynamic VRAM loading', %-args and matching tracebacks. api.minimaxi.com is protected so cloud-API errors stay accurate. - Node display names rebranded (node_ids untouched, workflows safe): 'MiniMax H3 To Video' -> 'Moxie To Video', etc. - ~40 error/tooltip/description strings reworded to Moxie terms. - CLIP error no longer names CLIPType.MINIMAX; test match updated. Unchanged on purpose (breaking if touched): node_ids/class names, combo value 'MiniMax' (workflow payloads), internal dict keys (minimax_keyframes/minimax_refs), llm_api cloud provider strings, class-name logic checks, source-only docstrings.
This commit is contained in:
parent
d3ce6866a4
commit
27041a8a9f
@ -9,6 +9,7 @@ from aiohttp import web
|
||||
from .nodes import *
|
||||
from .routes import *
|
||||
from .utils.bernini_s2v_model_patch import apply_bernini_s2v_model_patches
|
||||
from .utils.log import install_console_privacy_filter
|
||||
|
||||
from .moxie_loader import MoxieMultimediaLoader
|
||||
from .moxie_project import MoxieProject
|
||||
@ -16,6 +17,8 @@ from .moxie_combine import MoxieCombine
|
||||
from .moxie_preview import ModelPreviewOverrideKJ as MoxiePreviewOverride
|
||||
|
||||
apply_bernini_s2v_model_patches()
|
||||
# Keep internal model/vendor names out of the console (incl. ComfyUI core logs).
|
||||
install_console_privacy_filter()
|
||||
|
||||
# Define the path
|
||||
root_path = os.path.dirname(__file__)
|
||||
|
||||
@ -79,9 +79,9 @@ def temporal_prefix_weights(
|
||||
count = int(prefix_steps)
|
||||
taper = min(int(taper_steps), count)
|
||||
if count < 1:
|
||||
raise ValueError("Easy-Media Drift-Control AV prefix steps must be positive")
|
||||
raise ValueError("Moxie Drift-Control AV prefix steps must be positive")
|
||||
if taper < 1:
|
||||
raise ValueError("Easy-Media Drift-Control AV taper steps must be positive")
|
||||
raise ValueError("Moxie Drift-Control AV taper steps must be positive")
|
||||
weights = [1.0] * (count - taper)
|
||||
weights.extend(
|
||||
float(taper - offset - 1) / float(taper)
|
||||
@ -100,24 +100,24 @@ def apply_dynamic_prefix_mask(
|
||||
"""Apply the live schedule-matched mask to the copied video prefix."""
|
||||
if not torch.is_tensor(packed_mask) or packed_mask.ndim != 3:
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV expects packed denoise mask [B,1,N]"
|
||||
"Moxie Drift-Control AV expects packed denoise mask [B,1,N]"
|
||||
)
|
||||
|
||||
shape = tuple(int(value) for value in video_shape)
|
||||
if len(shape) != 5 or shape[0] != int(packed_mask.shape[0]):
|
||||
raise ValueError(
|
||||
f"Easy-Media Drift-Control AV expects video latent [B,C,T,H,W], got {shape}"
|
||||
f"Moxie Drift-Control AV expects video latent [B,C,T,H,W], got {shape}"
|
||||
)
|
||||
prefix_steps = int(prefix_steps)
|
||||
if prefix_steps < 1 or prefix_steps >= shape[2]:
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV prefix must fit before generated video"
|
||||
"Moxie Drift-Control AV prefix must fit before generated video"
|
||||
)
|
||||
|
||||
video_elements = math.prod(shape[1:])
|
||||
if int(packed_mask.shape[-1]) < video_elements:
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV packed mask is shorter than its video stream"
|
||||
"Moxie Drift-Control AV packed mask is shorter than its video stream"
|
||||
)
|
||||
|
||||
output = packed_mask.clone()
|
||||
@ -183,14 +183,14 @@ def prepare_context_swap_latent(
|
||||
"""
|
||||
if continue_audio and freeze_audio:
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV cannot continue and freeze audio simultaneously"
|
||||
"Moxie Drift-Control AV cannot continue and freeze audio simultaneously"
|
||||
)
|
||||
|
||||
existing_video_mask, existing_audio_mask = _noise_mask_streams(target_latent)
|
||||
target_parts = _streams_from_latent(target_latent)
|
||||
if len(target_parts) < 2:
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV target latent has no audio stream"
|
||||
"Moxie Drift-Control AV target latent has no audio stream"
|
||||
)
|
||||
target_video, target_audio = target_parts[:2]
|
||||
if target_video.ndim == 4:
|
||||
@ -203,7 +203,7 @@ def prepare_context_swap_latent(
|
||||
or int(target_audio.shape[2]) != 2
|
||||
):
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV expects H3 video/audio latent streams"
|
||||
"Moxie Drift-Control AV expects matching video/audio latent streams"
|
||||
)
|
||||
|
||||
blocks, _, covered = _video_tail_from_latent(
|
||||
@ -213,10 +213,10 @@ def prepare_context_swap_latent(
|
||||
copied_video = torch.cat(blocks, dim=2)
|
||||
video_steps = int(copied_video.shape[2])
|
||||
if covered != int(context_frames):
|
||||
raise RuntimeError("Easy-Media Drift-Control AV video context span changed")
|
||||
raise RuntimeError("Moxie Drift-Control AV video context span changed")
|
||||
if video_steps < 1 or video_steps >= int(target_video.shape[2]):
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV copied video prefix must be shorter than target"
|
||||
"Moxie Drift-Control AV copied video prefix must be shorter than target"
|
||||
)
|
||||
if (
|
||||
copied_video.shape[0] != target_video.shape[0]
|
||||
@ -224,7 +224,7 @@ def prepare_context_swap_latent(
|
||||
or copied_video.shape[3:] != target_video.shape[3:]
|
||||
):
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV context and target video latent shapes "
|
||||
"Moxie Drift-Control AV context and target video latent shapes "
|
||||
f"differ: original context {copied_video.shape[4] * 16}x{copied_video.shape[3] * 16} pixels, "
|
||||
f"current target {target_video.shape[4] * 16}x{target_video.shape[3] * 16} pixels "
|
||||
"(width x height); "
|
||||
@ -256,11 +256,11 @@ def prepare_context_swap_latent(
|
||||
)
|
||||
if audio_steps < 1 or audio_steps >= int(target_audio.shape[-1]):
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV copied audio prefix must be shorter than target"
|
||||
"Moxie Drift-Control AV copied audio prefix must be shorter than target"
|
||||
)
|
||||
if copied_audio.shape[:3] != target_audio.shape[:3]:
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV context and target audio latent shapes differ"
|
||||
"Moxie Drift-Control AV context and target audio latent shapes differ"
|
||||
)
|
||||
output_audio[..., :audio_steps] = copied_audio.to(
|
||||
device=output_audio.device,
|
||||
@ -348,10 +348,10 @@ def install_drift_control_av_model(
|
||||
"""Clone the H3 model and install sampler/model dynamic-mask hooks."""
|
||||
if drift_control_step_count(sigmas) < 1:
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV requires at least one sigma sampling step"
|
||||
"Moxie Drift-Control AV requires at least one sigma sampling step"
|
||||
)
|
||||
if model is None or not callable(getattr(model, "clone", None)):
|
||||
raise ValueError("Easy-Media Drift-Control AV requires a ComfyUI MODEL input")
|
||||
raise ValueError("Moxie Drift-Control AV requires a ComfyUI MODEL input")
|
||||
|
||||
inner = getattr(model, "model", None)
|
||||
model_type = str(getattr(getattr(inner, "model_type", None), "name", ""))
|
||||
@ -360,7 +360,7 @@ def install_drift_control_av_model(
|
||||
model_config = getattr(inner, "model_config", None)
|
||||
if model_config.__class__.__name__ != "MiniMaxH3":
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV requires a MiniMax H3 AV model"
|
||||
"Moxie Drift-Control AV requires a Moxie AV model"
|
||||
)
|
||||
|
||||
samples = latent.get("samples") if isinstance(latent, dict) else None
|
||||
@ -374,13 +374,13 @@ def install_drift_control_av_model(
|
||||
streams = []
|
||||
if not streams or not torch.is_tensor(streams[0]) or streams[0].ndim != 5:
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV requires a MiniMax H3 AV latent"
|
||||
"Moxie Drift-Control AV requires a Moxie AV latent"
|
||||
)
|
||||
|
||||
prefix_steps = int(prefix_steps)
|
||||
if prefix_steps < 1 or prefix_steps >= int(streams[0].shape[2]):
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV prefix must fit before newly generated video"
|
||||
"Moxie Drift-Control AV prefix must fit before newly generated video"
|
||||
)
|
||||
|
||||
patched = model.clone()
|
||||
@ -389,15 +389,15 @@ def install_drift_control_av_model(
|
||||
raise ValueError("The connected MODEL has no model_options dictionary")
|
||||
if callable(options.get("denoise_mask_function")):
|
||||
raise ValueError(
|
||||
"Easy-Media Drift-Control AV cannot combine with another dynamic denoise-mask patch"
|
||||
"Moxie Drift-Control AV cannot combine with another dynamic denoise-mask patch"
|
||||
)
|
||||
if not callable(getattr(patched, "set_model_denoise_mask_function", None)):
|
||||
raise RuntimeError(
|
||||
"Easy-Media Drift-Control AV requires current ComfyUI dynamic denoise-mask support"
|
||||
"Moxie Drift-Control AV requires current ComfyUI dynamic denoise-mask support"
|
||||
)
|
||||
if not callable(getattr(patched, "add_wrapper_with_key", None)):
|
||||
raise RuntimeError(
|
||||
"Easy-Media Drift-Control AV requires ComfyUI apply-model wrappers"
|
||||
"Moxie Drift-Control AV requires ComfyUI apply-model wrappers"
|
||||
)
|
||||
|
||||
from comfy.patcher_extension import WrappersMP
|
||||
|
||||
@ -93,7 +93,7 @@ def _load_model(checkpoint_path: Path) -> tuple[torch.nn.Module, Any, torch.devi
|
||||
try:
|
||||
model.to(device).eval()
|
||||
except (torch.cuda.OutOfMemoryError, RuntimeError) as error:
|
||||
print(f"[Easy Media] OmniShotCut could not load on {device}; falling back to CPU: {error}")
|
||||
print(f"[Moxie] OmniShotCut could not load on {device}; falling back to CPU: {error}")
|
||||
model.to("cpu").eval()
|
||||
device = torch.device("cpu")
|
||||
return model, args, torch.device(device)
|
||||
@ -199,14 +199,14 @@ def _release_model(model: torch.nn.Module | None) -> None:
|
||||
try:
|
||||
model.to("cpu")
|
||||
except (RuntimeError, AttributeError) as error:
|
||||
print(f"[Easy Media] Failed to move OmniShotCut model to CPU: {error}")
|
||||
print(f"[Moxie] Failed to move OmniShotCut model to CPU: {error}")
|
||||
gc.collect()
|
||||
try:
|
||||
import comfy.model_management as model_management
|
||||
|
||||
model_management.soft_empty_cache()
|
||||
except (ImportError, RuntimeError, AttributeError) as error:
|
||||
print(f"[Easy Media] OmniShotCut cache cleanup fallback: {error}")
|
||||
print(f"[Moxie] OmniShotCut cache cleanup fallback: {error}")
|
||||
if torch.cuda.is_available():
|
||||
torch.cuda.empty_cache()
|
||||
|
||||
|
||||
@ -384,7 +384,7 @@ def _available_workspace(model):
|
||||
|
||||
def tiled_model(model, latent_shapes, tile_count: int = 0):
|
||||
if not isinstance(model.model, comfy.model_base.MiniMaxH3):
|
||||
raise ValueError("SelfLift: high-resolution tiling requires a MiniMax H3 model")
|
||||
raise ValueError("SelfLift: high-resolution tiling requires a Moxie model")
|
||||
if len(latent_shapes) != 2 or len(latent_shapes[0]) != 5 or len(latent_shapes[1]) != 4:
|
||||
raise ValueError("SelfLift: high-resolution tiling requires H3 video and audio latent streams")
|
||||
requested_tiles = int(tile_count or 0)
|
||||
|
||||
@ -140,7 +140,7 @@ def _validate_schedule(sigmas: torch.Tensor, transition_step: int) -> None:
|
||||
def _validate_latent_input(latent_image: dict[str, Any]) -> None:
|
||||
streams, _ = _streams(latent_image["samples"])
|
||||
if len(streams) != 2 or streams[0].ndim != 5 or streams[1].ndim != 4:
|
||||
raise ValueError("SelfLift: expected MiniMax H3 video and audio latent streams")
|
||||
raise ValueError("SelfLift: expected Moxie video and audio latent streams")
|
||||
for stream in streams:
|
||||
if any(size == 0 for size in stream.shape) or stream.shape[0] != streams[0].shape[0]:
|
||||
raise ValueError("SelfLift: latent streams must be nonempty with equal batches")
|
||||
|
||||
@ -67,7 +67,7 @@ def _h3_clip_type():
|
||||
if clip_type_enum is None:
|
||||
raise RuntimeError(
|
||||
"Moxie Multimedia Loader: this ComfyUI build does not expose "
|
||||
"CLIPType.MINIMAX (required for MiniMax H3 Qwen3-VL text encoders). "
|
||||
"the CLIP recipe required for the bundled text encoders. "
|
||||
"Please update ComfyUI."
|
||||
)
|
||||
return clip_type_enum
|
||||
@ -91,8 +91,8 @@ class MoxieMultimediaLoader(io.ComfyNode):
|
||||
node_id="MoxieMultimediaLoader",
|
||||
display_name="Moxie Multimedia Loader",
|
||||
category="loaders/moxie",
|
||||
description="Loads the MiniMax H3 diffusion model, applies the attention backend and a LoRA, and loads "
|
||||
"a video VAE, an audio VAE and the H3 Qwen3-VL CLIP - all from the models folder bundled "
|
||||
description="Loads the Moxie diffusion model, applies the attention backend and a LoRA, and loads "
|
||||
"a video VAE, an audio VAE and the Moxie CLIP - all from the models folder bundled "
|
||||
"with this custom node. Outputs model, clip, video_vae and audio_vae.",
|
||||
inputs=[
|
||||
io.Combo.Input(
|
||||
@ -138,8 +138,8 @@ class MoxieMultimediaLoader(io.ComfyNode):
|
||||
io.Combo.Input(
|
||||
"clip",
|
||||
options=_list_files("clip"),
|
||||
tooltip="MiniMax H3 text encoder file (inside models/clip). Loaded with the locked "
|
||||
"minimax CLIP recipe (Qwen3-VL).",
|
||||
tooltip="Text encoder file (inside models/clip). Loaded with the bundled "
|
||||
"Moxie text-encoder recipe.",
|
||||
),
|
||||
io.Combo.Input(
|
||||
"clip_device",
|
||||
|
||||
@ -1056,7 +1056,7 @@ class ModelPreviewOverrideKJ(io.ComfyNode):
|
||||
default=_tiny_vae_default(tiny_vae_options),
|
||||
tooltip="Tiny VAE decoder for true-RGB previews. Listed from the node pack's "
|
||||
"models/vae_approx folder first, then ComfyUI's models/vae_approx "
|
||||
"(ships with MM-preview.safetensors for MiniMax H3).",
|
||||
"(ships with MM-preview.safetensors).",
|
||||
),
|
||||
],
|
||||
outputs=[
|
||||
|
||||
@ -43,7 +43,7 @@ class MoxieProject(EasyMultiTrackProject):
|
||||
display_name="Moxie MultiTrack Project",
|
||||
category="EasyUse/MultiTrackEditor",
|
||||
description=(
|
||||
"Build and execute a multi-track MiniMax H3 project. "
|
||||
"Build and execute a multi-track Moxie project. "
|
||||
"Takes model, clip, video_vae and audio_vae directly from the Moxie Multimedia Loader. "
|
||||
"Sampling is baked to a single pass with euler + beta sigmas; set only steps and seed."
|
||||
),
|
||||
@ -55,7 +55,7 @@ class MoxieProject(EasyMultiTrackProject):
|
||||
io.Model.Input("model", tooltip="Diffusion model from Moxie Multimedia Loader (attention backend and LoRA already applied)."),
|
||||
io.Clip.Input("clip", tooltip="CLIP text encoder from Moxie Multimedia Loader."),
|
||||
io.Vae.Input("video_vae", tooltip="Video VAE from Moxie Multimedia Loader."),
|
||||
io.Vae.Input("audio_vae", tooltip="Audio VAE from Moxie Multimedia Loader (required to decode MiniMax H3 audio)."),
|
||||
io.Vae.Input("audio_vae", tooltip="Audio VAE from Moxie Multimedia Loader (required to decode Moxie audio)."),
|
||||
io.String.Input("project_name", default="",
|
||||
tooltip="Name of the project; used for output folders."),
|
||||
io.Int.Input(
|
||||
|
||||
@ -235,9 +235,9 @@ H3_AUDIO_LATENT_FPS = 40.0
|
||||
def _h3_nested_parts(
|
||||
value: object, value_name: str
|
||||
) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
"""Return the video/audio tensors from a MiniMax H3 nested value."""
|
||||
"""Return the video/audio tensors from a Moxie nested value."""
|
||||
if not getattr(value, "is_nested", False):
|
||||
raise ValueError(f"Expected {value_name} to be a MiniMax H3 nested tensor.")
|
||||
raise ValueError(f"Expected {value_name} to be a Moxie nested tensor.")
|
||||
|
||||
try:
|
||||
parts = (
|
||||
@ -255,7 +255,7 @@ def _h3_nested_parts(
|
||||
|
||||
|
||||
def _split_h3_av_latent(latent: dict) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
"""Validate and split a MiniMax H3 joint audio/video latent."""
|
||||
"""Validate and split a Moxie joint audio/video latent."""
|
||||
if not isinstance(latent, dict) or "samples" not in latent:
|
||||
raise ValueError("Expected a LATENT dictionary with a 'samples' entry.")
|
||||
|
||||
@ -270,7 +270,7 @@ def _split_h3_av_latent(latent: dict) -> tuple[torch.Tensor, torch.Tensor]:
|
||||
f"Invalid H3 audio latent shape {tuple(audio.shape)}; expected [B, 32, 2, T]."
|
||||
)
|
||||
if video.shape[0] != 1 or audio.shape[0] != 1:
|
||||
raise ValueError("MiniMax H3 audio locking currently requires batch size 1.")
|
||||
raise ValueError("Moxie audio locking currently requires batch size 1.")
|
||||
return video, audio
|
||||
|
||||
|
||||
@ -315,7 +315,7 @@ def _fit_h3_encoded_audio(encoded: torch.Tensor, target_length: int) -> torch.Te
|
||||
if encoded_length > target_length:
|
||||
return encoded[..., :target_length].contiguous()
|
||||
if encoded_length <= 0:
|
||||
raise ValueError("The MiniMax H3 audio VAE returned an empty latent.")
|
||||
raise ValueError("The Moxie audio VAE returned an empty latent.")
|
||||
tail = encoded[..., -1:].repeat_interleave(target_length - encoded_length, dim=-1)
|
||||
return torch.cat((encoded, tail), dim=-1).contiguous()
|
||||
|
||||
@ -1241,7 +1241,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 MiniMax H3."),
|
||||
io.Combo.Input("format", options=["MiniMax"], default="MiniMax", tooltip="Moxie Multimedia Suite only supports the bundled Moxie video model."),
|
||||
TYPE_TIMELINE.Input(
|
||||
"timeline_data",
|
||||
),
|
||||
@ -1867,7 +1867,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 MiniMax H3."),
|
||||
io.Combo.Input("format", options=["MiniMax"], default="MiniMax", 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."),
|
||||
@ -3498,7 +3498,7 @@ class MultiTrackPromptEnhancer(io.ComfyNode):
|
||||
display_name="MultiTrack Prompt Enhancer",
|
||||
category=CATEGORY_MULTITRACK,
|
||||
description=(
|
||||
"Use MiniMax H3-Context-IR, a configured third-party multimodal LLM, "
|
||||
"Use Moxie-Context-IR, a configured third-party multimodal LLM, "
|
||||
"or a local llama.cpp model to enhance a multitrack video prompt."
|
||||
),
|
||||
is_input_list=True,
|
||||
@ -3534,7 +3534,7 @@ class MultiTrackPromptEnhancer(io.ComfyNode):
|
||||
min=1,
|
||||
max=0x7FFFFFFF,
|
||||
force_input=True,
|
||||
tooltip="MiniMax-aligned frame length; converted back to 4–15 integer seconds.",
|
||||
tooltip="Moxie-aligned frame length; converted back to 4–15 integer seconds.",
|
||||
),
|
||||
io.Image.Input(
|
||||
"images",
|
||||
@ -4262,17 +4262,17 @@ class EasyMinimaxH3AudioLock(io.ComfyNode):
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="easy minimaxH3AudioLock",
|
||||
display_name="Easy MiniMax H3 Audio Lock",
|
||||
display_name="Moxie Audio Lock",
|
||||
category=CATEGORY_AUDIO,
|
||||
description=(
|
||||
"Lock or remix supplied audio into a MiniMax H3 joint AV latent. "
|
||||
"Lock or remix supplied audio into a Moxie joint AV latent. "
|
||||
"The H3 per-stream noise mask controls how much audio is preserved."
|
||||
),
|
||||
inputs=[
|
||||
io.Latent.Input(
|
||||
"latent", tooltip="MiniMax H3 joint audio/video latent."
|
||||
"latent", tooltip="Moxie joint audio/video latent."
|
||||
),
|
||||
io.Vae.Input("audio_vae", tooltip="MiniMax H3 audio VAE."),
|
||||
io.Vae.Input("audio_vae", tooltip="Moxie audio VAE."),
|
||||
io.Audio.Input(
|
||||
"audio",
|
||||
optional=True,
|
||||
@ -4360,7 +4360,7 @@ class EasyMinimaxH3AudioLock(io.ComfyNode):
|
||||
import torchaudio
|
||||
except ImportError as error:
|
||||
raise RuntimeError(
|
||||
"torchaudio is required to resample MiniMax H3 lock audio."
|
||||
"torchaudio is required to resample Moxie lock audio."
|
||||
) from error
|
||||
waveform = torchaudio.functional.resample(
|
||||
waveform, sample_rate, vae_sample_rate
|
||||
@ -4382,9 +4382,9 @@ class EasyMinimaxH3AudioLock(io.ComfyNode):
|
||||
try:
|
||||
encoded = selected_audio_vae.encode(waveform.movedim(1, -1))
|
||||
except (AttributeError, RuntimeError, TypeError, ValueError) as error:
|
||||
raise RuntimeError(f"Failed to encode MiniMax H3 lock audio: {error}") from error
|
||||
raise RuntimeError(f"Failed to encode Moxie lock audio: {error}") from error
|
||||
if not isinstance(encoded, torch.Tensor) or encoded.ndim != 4:
|
||||
raise ValueError("MiniMax H3 audio VAE must return a 4D tensor.")
|
||||
raise ValueError("Moxie audio VAE must return a 4D tensor.")
|
||||
encoded = _fit_h3_encoded_audio(encoded, target_length)
|
||||
if encoded.shape[0] != 1 or encoded.shape[1] != 32 or encoded.shape[2] != 2:
|
||||
raise ValueError(
|
||||
@ -4416,7 +4416,7 @@ class EasyMinimaxH3AudioLock(io.ComfyNode):
|
||||
import comfy.nested_tensor
|
||||
except ImportError as error:
|
||||
raise RuntimeError(
|
||||
"MiniMax H3 audio locking requires ComfyUI nested tensor support."
|
||||
"Moxie audio locking requires ComfyUI nested tensor support."
|
||||
) from error
|
||||
|
||||
output = dict(selected_latent)
|
||||
|
||||
@ -71,16 +71,16 @@ MULTITRACK_PROJECT_REFRESH_EVENT = "easy_multitrack_project_refresh"
|
||||
|
||||
|
||||
class EasyMinimaxPromptOverride(io.ComfyNode):
|
||||
"""Assemble MiniMax H3 per-segment prompt override JSON."""
|
||||
"""Assemble Moxie per-segment prompt override JSON."""
|
||||
|
||||
@classmethod
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="easy minimaxPromptOverride",
|
||||
display_name="MiniMax Prompt Override",
|
||||
display_name="Moxie Prompt Override",
|
||||
category=CATEGORY_MINIMAX,
|
||||
description=(
|
||||
"Assemble per-segment MiniMax H3 prompts, durations, generation "
|
||||
"Assemble per-segment Moxie prompts, durations, generation "
|
||||
"types, continuity modes, and track locks into a prompt_override "
|
||||
"JSON string."
|
||||
),
|
||||
@ -109,7 +109,7 @@ class EasyMinimaxPromptOverride(io.ComfyNode):
|
||||
max=100,
|
||||
),
|
||||
tooltip=(
|
||||
"One prompt per MiniMax H3 clip. Use @图片N/@音频N/@视频N "
|
||||
"One prompt per Moxie clip. Use @图片N/@音频N/@视频N "
|
||||
"or <Picture N>/<Audio N>/<Video N> to reference media slots."
|
||||
),
|
||||
),
|
||||
@ -232,7 +232,7 @@ def _notify_multitrack_project_refresh(
|
||||
)
|
||||
except (AttributeError, ImportError, RuntimeError) as error:
|
||||
print( # noqa: T201 - sampling must continue when UI notifications are unavailable
|
||||
f"[Easy Media][Project] Unable to notify the frontend: {error}"
|
||||
f"[Moxie][Project] Unable to notify the frontend: {error}"
|
||||
)
|
||||
|
||||
|
||||
@ -280,7 +280,7 @@ def _empty_av_latent(
|
||||
import comfy.nested_tensor
|
||||
except ImportError as error:
|
||||
raise RuntimeError(
|
||||
"MiniMax H3 requires a ComfyUI version with nested AV latent support"
|
||||
"Moxie requires a ComfyUI version with nested AV latent support"
|
||||
) from error
|
||||
|
||||
frame_count, latent_length, audio_length = _temporal_shape(length)
|
||||
@ -298,7 +298,7 @@ def _resize(image: torch.Tensor, width: int, height: int, crop: str) -> torch.Te
|
||||
import comfy.utils
|
||||
except ImportError as error:
|
||||
raise RuntimeError(
|
||||
"MiniMax H3 requires ComfyUI image resize utilities"
|
||||
"Moxie requires ComfyUI image resize utilities"
|
||||
) from error
|
||||
|
||||
samples = image[..., :3].movedim(-1, 1)
|
||||
@ -388,7 +388,7 @@ def _set_conditioning_values(
|
||||
import node_helpers
|
||||
except ImportError as error:
|
||||
raise RuntimeError(
|
||||
"MiniMax H3 requires ComfyUI conditioning helpers"
|
||||
"Moxie requires ComfyUI conditioning helpers"
|
||||
) from error
|
||||
return node_helpers.conditioning_set_values(conditioning, values)
|
||||
|
||||
@ -425,7 +425,7 @@ def _encode_ref_audio(
|
||||
import torchaudio
|
||||
except ImportError as error:
|
||||
raise RuntimeError(
|
||||
"torchaudio is required to resample MiniMax H3 reference audio"
|
||||
"torchaudio is required to resample Moxie reference audio"
|
||||
) from error
|
||||
waveform = torchaudio.functional.resample(
|
||||
waveform,
|
||||
@ -443,10 +443,10 @@ class MiniMaxH3ImageToVideoFallback(io.ComfyNode):
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="MiniMaxH3ImageToVideo",
|
||||
display_name="MiniMax H3 Image to Video",
|
||||
display_name="Moxie Image to Video",
|
||||
category="model/conditioning/minimax",
|
||||
description=(
|
||||
"Create MiniMax H3 text-to-video or first/last-frame "
|
||||
"Create Moxie text-to-video or first/last-frame "
|
||||
"conditioning with a joint audio-video latent."
|
||||
),
|
||||
inputs=[
|
||||
@ -523,10 +523,10 @@ class MiniMaxH3ReferenceToVideoFallback(io.ComfyNode):
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="MiniMaxH3ReferenceToVideo",
|
||||
display_name="MiniMax H3 Reference to Video",
|
||||
display_name="Moxie Reference to Video",
|
||||
category="model/conditioning/minimax",
|
||||
description=(
|
||||
"Create MiniMax H3 reference conditioning from images, videos, "
|
||||
"Create Moxie reference conditioning from images, videos, "
|
||||
"and audio using <Picture i>, <Video i>, and <Audio i> tags."
|
||||
),
|
||||
inputs=[
|
||||
@ -666,7 +666,7 @@ class MiniMaxH3ReferenceToVideoFallback(io.ComfyNode):
|
||||
canvas_height, canvas_width = frames.shape[1], frames.shape[2]
|
||||
if aligned_count < 5:
|
||||
raise ValueError(
|
||||
"MiniMax H3 reference videos need at least 5 frames (~0.2s at 24 fps)"
|
||||
"Moxie reference videos need at least 5 frames (~0.2s at 24 fps)"
|
||||
)
|
||||
video_latent = vae.encode(frames)
|
||||
audio_latent = None
|
||||
@ -734,7 +734,7 @@ class EasyMiniMaxH3ReferenceToVideoBridge(io.ComfyNode):
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id=REFERENCE_BRIDGE_NODE_ID,
|
||||
display_name="Easy MiniMax H3 Reference Bridge",
|
||||
display_name="Moxie Reference Bridge",
|
||||
category=CATEGORY_MINIMAX,
|
||||
is_dev_only=True,
|
||||
inputs=[
|
||||
@ -827,7 +827,7 @@ class EasyMiniMaxH3ReferenceToVideoBridge(io.ComfyNode):
|
||||
None,
|
||||
)
|
||||
if destination is None:
|
||||
raise TypeError(f"Unexpected MiniMax H3 reference input: {name}")
|
||||
raise TypeError(f"Unexpected Moxie reference input: {name}")
|
||||
grouped_inputs[destination][name] = value
|
||||
|
||||
target_frame_count = _align_frame_count(max(5, int(length)))
|
||||
@ -878,7 +878,7 @@ class EasyMiniMaxH3MotionContextHard(io.ComfyNode):
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="easy MiniMaxH3MotionContextHard",
|
||||
display_name="Easy MiniMax H3 Motion Context Hard",
|
||||
display_name="Moxie Motion Context Hard",
|
||||
category=CATEGORY_MINIMAX,
|
||||
description=(
|
||||
"Keep Motion Context 0.4 native video/audio keyframes while "
|
||||
@ -976,7 +976,7 @@ class EasyMiniMaxH3ContextSwap(io.ComfyNode):
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="easy MiniMaxH3ContextSwap",
|
||||
display_name="Easy MiniMax H3 Context Swap Pure Drift-Control AV",
|
||||
display_name="Moxie Context Swap Pure Drift-Control AV",
|
||||
category=CATEGORY_MINIMAX,
|
||||
description=(
|
||||
"Internal context_swap continuation: copy the previous sampled "
|
||||
@ -1066,7 +1066,7 @@ class EasyMiniMaxH3HiResContinuity(io.ComfyNode):
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="easy MiniMaxH3HiResContinuity",
|
||||
display_name="Easy MiniMax H3 HiRes Continuity",
|
||||
display_name="Moxie HiRes Continuity",
|
||||
category=CATEGORY_MINIMAX,
|
||||
description=(
|
||||
"Hard-pin the previous five-frame video boundary in the current "
|
||||
@ -1255,7 +1255,7 @@ class EasyH3ConditioningCache(io.ComfyNode):
|
||||
display_name="H3 Conditioning Cache",
|
||||
category="EasyUse/H3/dev",
|
||||
description=(
|
||||
"Internal MiniMax H3 temp cache retaining five recent segments."
|
||||
"Internal Moxie temp cache retaining five recent segments."
|
||||
),
|
||||
is_dev_only=True,
|
||||
inputs=[
|
||||
@ -1577,7 +1577,7 @@ def _h3_upscale_target_size(
|
||||
"""Resolve a pixel-space resize request to H3 latent height and width."""
|
||||
if video.ndim not in (4, 5) or video.shape[1] != 24:
|
||||
raise ValueError(
|
||||
"MiniMax H3 latent upscale expects a 24-channel 4D/5D video latent"
|
||||
"Moxie latent upscale expects a 24-channel 4D/5D video latent"
|
||||
)
|
||||
source_height, source_width = video.shape[-2:]
|
||||
source_pixel_height = source_height * 16
|
||||
@ -1586,7 +1586,7 @@ def _h3_upscale_target_size(
|
||||
if selected_mode == "scale by multiplier":
|
||||
scale = float(mode.get("scale", 2.0))
|
||||
if not math.isfinite(scale) or not 1.0 <= scale <= 4.0:
|
||||
raise ValueError("MiniMax H3 upscale scale must be between 1 and 4")
|
||||
raise ValueError("Moxie upscale scale must be between 1 and 4")
|
||||
target_pixel_width = source_pixel_width * scale
|
||||
target_pixel_height = source_pixel_height * scale
|
||||
elif selected_mode == "target dimensions":
|
||||
@ -1595,20 +1595,20 @@ def _h3_upscale_target_size(
|
||||
elif selected_mode == "megapixels":
|
||||
megapixels = float(mode.get("megapixels", 1.0))
|
||||
if not math.isfinite(megapixels) or megapixels <= 0:
|
||||
raise ValueError("MiniMax H3 upscale megapixels must be positive")
|
||||
raise ValueError("Moxie upscale megapixels must be positive")
|
||||
target_pixels = megapixels * 1_048_576
|
||||
aspect_ratio = source_pixel_width / source_pixel_height
|
||||
target_pixel_height = math.sqrt(target_pixels / aspect_ratio)
|
||||
target_pixel_width = target_pixel_height * aspect_ratio
|
||||
else:
|
||||
raise ValueError(f"Unsupported MiniMax H3 upscale mode: {selected_mode}")
|
||||
raise ValueError(f"Unsupported Moxie upscale mode: {selected_mode}")
|
||||
if (
|
||||
not math.isfinite(target_pixel_width)
|
||||
or not math.isfinite(target_pixel_height)
|
||||
or target_pixel_width <= 0
|
||||
or target_pixel_height <= 0
|
||||
):
|
||||
raise ValueError("MiniMax H3 upscale target dimensions must be positive and finite")
|
||||
raise ValueError("Moxie upscale target dimensions must be positive and finite")
|
||||
|
||||
alignment = max(16, int(align))
|
||||
target_pixel_width = round(target_pixel_width / alignment) * alignment
|
||||
@ -1618,9 +1618,9 @@ def _h3_upscale_target_size(
|
||||
scale_height = target_height / source_height
|
||||
scale_width = target_width / source_width
|
||||
if scale_height < 1.0 or scale_width < 1.0:
|
||||
raise ValueError("MiniMax H3 latent upscale only supports upscaling")
|
||||
raise ValueError("Moxie latent upscale only supports upscaling")
|
||||
if scale_height > 4.0 or scale_width > 4.0:
|
||||
raise ValueError("MiniMax H3 latent upscale supports at most 4x per axis")
|
||||
raise ValueError("Moxie latent upscale supports at most 4x per axis")
|
||||
return target_height, target_width
|
||||
|
||||
|
||||
@ -1628,10 +1628,10 @@ def _h3_latent_streams(samples: Any) -> tuple[list[torch.Tensor], bool]:
|
||||
if getattr(samples, "is_nested", False):
|
||||
streams = list(samples.unbind())
|
||||
if len(streams) != 2:
|
||||
raise ValueError("MiniMax H3 nested latent must contain video and audio")
|
||||
raise ValueError("Moxie nested latent must contain video and audio")
|
||||
return streams, True
|
||||
if not isinstance(samples, torch.Tensor):
|
||||
raise TypeError("MiniMax H3 latent samples must be a tensor or nested AV latent")
|
||||
raise TypeError("Moxie latent samples must be a tensor or nested AV latent")
|
||||
return [samples], False
|
||||
|
||||
|
||||
@ -1644,17 +1644,17 @@ def _pack_h3_latent_streams(streams: list[torch.Tensor], nested: bool) -> Any:
|
||||
|
||||
|
||||
class EasyMiniMaxH3LatentUpscaler(io.ComfyNode):
|
||||
"""Upscale MiniMax H3 video latents with the bundled learned 3D model."""
|
||||
"""Upscale Moxie video latents with the bundled learned 3D model."""
|
||||
|
||||
@classmethod
|
||||
def define_schema(cls) -> io.Schema:
|
||||
models = folder_paths.get_filename_list("latent_upscale_models")
|
||||
return io.Schema(
|
||||
node_id="easy minimaxH3LatentUpscaler",
|
||||
display_name="MiniMax H3 Latent Upscaler",
|
||||
display_name="Moxie Latent Upscaler",
|
||||
category=CATEGORY_MINIMAX,
|
||||
description=(
|
||||
"Upscale a MiniMax H3 video latent with Easy Media's bundled "
|
||||
"Upscale a Moxie video latent with Easy Media's bundled "
|
||||
"3D latent-upscaler runtime. Nested AV inputs retain their audio stream."
|
||||
),
|
||||
inputs=[
|
||||
@ -1709,7 +1709,7 @@ class EasyMiniMaxH3LatentUpscaler(io.ComfyNode):
|
||||
min=16,
|
||||
max=512,
|
||||
step=16,
|
||||
tooltip="Pixel-space alignment; 32 is recommended for MiniMax H3.",
|
||||
tooltip="Pixel-space alignment; 32 is recommended for Moxie.",
|
||||
),
|
||||
io.Boolean.Input(
|
||||
"enable_temporal_chunking",
|
||||
@ -1740,11 +1740,11 @@ class EasyMiniMaxH3LatentUpscaler(io.ComfyNode):
|
||||
) -> io.NodeOutput:
|
||||
if model_name == "None":
|
||||
raise ValueError(
|
||||
"Place a MiniMax H3 upscaler checkpoint under "
|
||||
"Place a Moxie upscaler checkpoint under "
|
||||
"ComfyUI/models/latent_upscale_models"
|
||||
)
|
||||
if not isinstance(latent, dict) or "samples" not in latent:
|
||||
raise TypeError("MiniMax H3 latent upscale requires a LATENT dictionary")
|
||||
raise TypeError("Moxie latent upscale requires a LATENT dictionary")
|
||||
streams, nested = _h3_latent_streams(latent["samples"])
|
||||
video = streams[0]
|
||||
target_height, target_width = _h3_upscale_target_size(video, mode, align)
|
||||
@ -1764,7 +1764,7 @@ class EasyMiniMaxH3LatentUpscaler(io.ComfyNode):
|
||||
force_unload=bool(force_unload),
|
||||
)
|
||||
except (FileNotFoundError, RuntimeError, TypeError, ValueError) as error:
|
||||
raise RuntimeError(f"MiniMax H3 latent upscale failed: {error}") from error
|
||||
raise RuntimeError(f"Moxie latent upscale failed: {error}") from error
|
||||
if was_4d:
|
||||
upscaled_video = upscaled_video.squeeze(2)
|
||||
|
||||
@ -1794,13 +1794,13 @@ class EasyMiniMaxH3LatentUpscaler(io.ComfyNode):
|
||||
|
||||
|
||||
class EasyMiniMaxH3SelfLiftSampler(io.ComfyNode):
|
||||
"""Run an NFE-preserving low-to-high-resolution MiniMax H3 sample."""
|
||||
"""Run an NFE-preserving low-to-high-resolution Moxie sample."""
|
||||
|
||||
@classmethod
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="easy minimaxH3SelfLiftSampler",
|
||||
display_name="MiniMax H3 SelfLift Sampler",
|
||||
display_name="Moxie SelfLift Sampler",
|
||||
category=CATEGORY_MINIMAX,
|
||||
description=(
|
||||
"Sample the early denoiser evaluations at low resolution, lift "
|
||||
@ -1876,7 +1876,7 @@ class EasyMiniMaxH3SelfLiftSampler(io.ComfyNode):
|
||||
+ folder_paths.get_filename_list("latent_upscale_models"),
|
||||
default="None",
|
||||
tooltip=(
|
||||
"Optional MiniMax H3 latent upscaler. None uses nearest "
|
||||
"Optional Moxie latent upscaler. None uses nearest "
|
||||
"latent lifting without a pixel/VAE round trip."
|
||||
),
|
||||
),
|
||||
@ -1885,7 +1885,7 @@ class EasyMiniMaxH3SelfLiftSampler(io.ComfyNode):
|
||||
default=False,
|
||||
optional=True,
|
||||
tooltip=(
|
||||
"Split MiniMax H3 model evaluation into spatial tiles "
|
||||
"Split Moxie model evaluation into spatial tiles "
|
||||
"during the high-resolution SelfLift stage."
|
||||
),
|
||||
),
|
||||
@ -1982,7 +1982,7 @@ class EasyMiniMaxH3SelfLiftSampler(io.ComfyNode):
|
||||
lowres_factor = float(lowres_scale)
|
||||
if not math.isfinite(lowres_factor) or not 0.25 <= lowres_factor <= 1.0:
|
||||
raise ValueError(
|
||||
"MiniMax H3 SelfLift lowres_scale must be between 0.25 and 1"
|
||||
"Moxie SelfLift lowres_scale must be between 0.25 and 1"
|
||||
)
|
||||
correction_rho = float(rho)
|
||||
correction_min = float(w_min)
|
||||
@ -1995,7 +1995,7 @@ class EasyMiniMaxH3SelfLiftSampler(io.ComfyNode):
|
||||
and 0.0 <= correction_min <= correction_max <= 1.0
|
||||
):
|
||||
raise ValueError(
|
||||
"MiniMax H3 SelfLift correction parameters must satisfy "
|
||||
"Moxie SelfLift correction parameters must satisfy "
|
||||
"0 <= rho <= 1 and 0 <= w_min <= w_max <= 1"
|
||||
)
|
||||
|
||||
@ -2018,7 +2018,7 @@ class EasyMiniMaxH3SelfLiftSampler(io.ComfyNode):
|
||||
)
|
||||
|
||||
log_node_info(
|
||||
"MiniMax H3 SelfLift Sampler",
|
||||
"Moxie SelfLift Sampler",
|
||||
"Sampling with forced Euler, "
|
||||
f"transition_ratio={float(transition_ratio):.3f}, "
|
||||
f"lowres_scale={lowres_factor:.3f}, "
|
||||
@ -2050,7 +2050,7 @@ class EasyMiniMaxH3SelfLiftSampler(io.ComfyNode):
|
||||
preview_callback=preview_callback,
|
||||
)
|
||||
except (RuntimeError, TypeError, ValueError) as error:
|
||||
raise RuntimeError(f"MiniMax H3 SelfLift sampling failed: {error}") from error
|
||||
raise RuntimeError(f"Moxie SelfLift sampling failed: {error}") from error
|
||||
return io.NodeOutput(sampled, low_context)
|
||||
|
||||
|
||||
@ -2643,10 +2643,10 @@ class EasyMiniMaxH3ToVideo(io.ComfyNode):
|
||||
def define_schema(cls) -> io.Schema:
|
||||
return io.Schema(
|
||||
node_id="easy minimaxH3ToVideo",
|
||||
display_name="MiniMax H3 To Video",
|
||||
display_name="Moxie To Video",
|
||||
category=CATEGORY_MINIMAX,
|
||||
description=(
|
||||
"Create MiniMax H3 reference, first/last-frame, or last-frame-only "
|
||||
"Create Moxie reference, first/last-frame, or last-frame-only "
|
||||
"video conditioning. "
|
||||
"IMAGE batches and media lists are expanded automatically."
|
||||
),
|
||||
|
||||
@ -868,7 +868,7 @@ class EasyMultiTrackProject(io.ComfyNode):
|
||||
display_name="MultiTrack Project",
|
||||
category="EasyUse/MultiTrackEditor",
|
||||
description=(
|
||||
"Build and execute a multi-track MiniMax H3 project with optional "
|
||||
"Build and execute a multi-track Moxie project with optional "
|
||||
"first-pass and second-pass sampling."
|
||||
),
|
||||
is_input_list=True,
|
||||
@ -1290,7 +1290,7 @@ class EasyMultiTrackProject(io.ComfyNode):
|
||||
)
|
||||
if not uses_linked_prepare and audio_vae is None:
|
||||
raise ValueError(
|
||||
"model_loader must include audio_vae to decode MiniMax H3 audio."
|
||||
"model_loader must include audio_vae to decode Moxie audio."
|
||||
)
|
||||
report_step(25)
|
||||
|
||||
@ -2335,7 +2335,7 @@ class EasyMultiTrackProjectVideoCombine(io.ComfyNode):
|
||||
)
|
||||
except (AttributeError, ImportError, RuntimeError) as error:
|
||||
print( # noqa: T201 - rendering must not fail when UI notifications are unavailable
|
||||
f"[Easy Media][Project] Unable to notify the frontend: {error}"
|
||||
f"[Moxie][Project] Unable to notify the frontend: {error}"
|
||||
)
|
||||
if not auto_combine:
|
||||
blocker = ExecutionBlocker(None)
|
||||
|
||||
@ -546,7 +546,7 @@ async def handle_video_source_fps(request: web.Request) -> web.Response:
|
||||
try:
|
||||
temp_path.unlink(missing_ok=True)
|
||||
except OSError as error:
|
||||
print(f"[Easy Media] Failed to remove frame rate probe temporary video: {error}")
|
||||
print(f"[Moxie] Failed to remove frame rate probe temporary video: {error}")
|
||||
|
||||
|
||||
@PromptServer.instance.routes.post("/easy-media/video/preview-frame")
|
||||
@ -584,7 +584,7 @@ async def handle_video_preview_frame(request: web.Request) -> web.Response:
|
||||
try:
|
||||
temp_path.unlink(missing_ok=True)
|
||||
except OSError as error:
|
||||
print(f"[Easy Media] Failed to remove preview temporary video: {error}")
|
||||
print(f"[Moxie] Failed to remove preview temporary video: {error}")
|
||||
|
||||
|
||||
@PromptServer.instance.routes.post("/easy-media/video/smart-split")
|
||||
@ -630,7 +630,7 @@ async def handle_video_smart_split(request: web.Request) -> web.Response:
|
||||
try:
|
||||
temp_path.unlink(missing_ok=True)
|
||||
except OSError as error:
|
||||
print(f"[Easy Media] Failed to remove OmniShotCut temporary video: {error}")
|
||||
print(f"[Moxie] Failed to remove OmniShotCut temporary video: {error}")
|
||||
|
||||
|
||||
@PromptServer.instance.routes.post("/easy-media/subtitles/recognize")
|
||||
@ -715,7 +715,7 @@ async def handle_subtitle_recognition(request: web.Request) -> web.Response:
|
||||
try:
|
||||
path.unlink(missing_ok=True)
|
||||
except OSError as error:
|
||||
print(f"[Easy Media] Failed to remove subtitle recognition temporary file: {error}")
|
||||
print(f"[Moxie] Failed to remove subtitle recognition temporary file: {error}")
|
||||
|
||||
|
||||
@PromptServer.instance.routes.post("/easy-media/subtitles/speech")
|
||||
|
||||
@ -470,7 +470,9 @@ def test_loader_requires_minimax_cliptype(moxie, monkeypatch, tmp_path):
|
||||
|
||||
monkeypatch.setattr(moxie.loader.comfy.sd, "CLIPType", CLIPTypeNoMinimax)
|
||||
|
||||
with pytest.raises(RuntimeError, match="CLIPType.MINIMAX"):
|
||||
# The error message deliberately avoids naming the underlying enum/recipe
|
||||
# so end users cannot identify the model family from console output.
|
||||
with pytest.raises(RuntimeError, match="Please update ComfyUI"):
|
||||
moxie.loader.MoxieMultimediaLoader.execute(
|
||||
diffusion_model="h3.safetensors",
|
||||
weight_dtype="default",
|
||||
|
||||
@ -94,7 +94,7 @@ def load_audio_waveform(source_type, file_path, local_path, url, target_sr: int)
|
||||
import torchaudio # type: ignore[import]
|
||||
except ImportError:
|
||||
logger.warning(
|
||||
"[EasyMedia] torchaudio is not installed — audio tracks will be silent. "
|
||||
"[Moxie] torchaudio is not installed — audio tracks will be silent. "
|
||||
"Install it with: pip install torchaudio"
|
||||
)
|
||||
return None
|
||||
@ -152,7 +152,7 @@ def _torchaudio_load(torchaudio, audio_path: str):
|
||||
except Exception as exc: # noqa: BLE001
|
||||
last_exc = exc
|
||||
|
||||
logger.warning("[EasyMedia] Failed to load audio '%s': %s", audio_path, last_exc)
|
||||
logger.warning("[Moxie] Failed to load audio '%s': %s", audio_path, last_exc)
|
||||
return None
|
||||
|
||||
|
||||
|
||||
87
utils/log.py
87
utils/log.py
@ -1,4 +1,4 @@
|
||||
"""Console logging helpers shared by Easy Media nodes."""
|
||||
"""Console logging helpers shared by Moxie Multimedia nodes."""
|
||||
|
||||
from __future__ import annotations
|
||||
|
||||
@ -6,6 +6,7 @@ from collections.abc import Callable, Iterator
|
||||
from contextlib import contextmanager
|
||||
from functools import wraps
|
||||
import inspect
|
||||
import logging
|
||||
from typing import Any
|
||||
from time import perf_counter
|
||||
|
||||
@ -22,7 +23,7 @@ def log_node_info(node_name: str, message: str | None = None) -> None:
|
||||
"""Display an informational node message in the ComfyUI console."""
|
||||
title = node_name.replace(" (EasyMedia)", "")
|
||||
suffix = f":{_RESET} {message}" if message is not None else _RESET
|
||||
print(f"{_BOLD_CYAN}[EasyMedia] {title}{suffix}", flush=True) # noqa: T201
|
||||
print(f"{_BOLD_CYAN}[Moxie] {title}{suffix}", flush=True) # noqa: T201
|
||||
|
||||
|
||||
@contextmanager
|
||||
@ -115,3 +116,85 @@ def instrument_node_timing(node_class: type) -> None:
|
||||
else:
|
||||
replacement = timed
|
||||
setattr(node_class, method_name, replacement)
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# Console privacy scrub
|
||||
#
|
||||
# The pack presents itself as "Moxie Multimedia Suite" and must not leak the
|
||||
# underlying model/vendor names through console output. The main offender is
|
||||
# ComfyUI core itself (e.g. model_patcher logs "Model MiniMaxH3 prepared for
|
||||
# dynamic VRAM loading ..." using the detected architecture class name).
|
||||
#
|
||||
# The filter below rewrites those tokens in DISPLAYED text only (record.msg,
|
||||
# and pre-rendered tracebacks when they contain a token); no execution logic,
|
||||
# node registration or workflow behaviour is affected.
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
# The cloud-API host must stay readable for provider debugging.
|
||||
_SCRUB_PROTECT = ("minimaxi.com", "\x00MOXIEPROTECT\x00")
|
||||
|
||||
_SCRUB_PAIRS = (
|
||||
("MiniMaxH3", "Moxie"),
|
||||
("MiniMax H3", "Moxie"),
|
||||
("MINIMAX_H3", "MOXIE"),
|
||||
("minimax_h3", "moxie"),
|
||||
("MiniMax", "Moxie"),
|
||||
("MINIMAX", "MOXIE"),
|
||||
("minimax", "moxie"),
|
||||
)
|
||||
_SCRUB_TOKENS = tuple(old for old, _ in _SCRUB_PAIRS)
|
||||
|
||||
|
||||
def _scrub_text(text: str) -> str:
|
||||
protected, sentinel = _SCRUB_PROTECT
|
||||
text = text.replace(protected, sentinel)
|
||||
for old, new in _SCRUB_PAIRS:
|
||||
text = text.replace(old, new)
|
||||
return text.replace(sentinel, protected)
|
||||
|
||||
|
||||
class _ConsolePrivacyFilter(logging.Filter):
|
||||
"""Rewrite internal model/vendor tokens before records reach the console."""
|
||||
|
||||
def filter(self, record: logging.LogRecord) -> bool: # noqa: A003
|
||||
try:
|
||||
message = record.getMessage()
|
||||
except Exception:
|
||||
message = None
|
||||
if isinstance(message, str):
|
||||
scrubbed = _scrub_text(message)
|
||||
if scrubbed != message:
|
||||
record.msg = scrubbed
|
||||
record.args = None
|
||||
if record.exc_info is not None and record.exc_text is None:
|
||||
import traceback
|
||||
|
||||
try:
|
||||
rendered = "".join(traceback.format_exception(*record.exc_info))
|
||||
except Exception:
|
||||
rendered = None
|
||||
if rendered is not None and any(token in rendered for token in _SCRUB_TOKENS):
|
||||
record.exc_text = _scrub_text(rendered)
|
||||
record.exc_info = None
|
||||
return True
|
||||
|
||||
|
||||
_privacy_filter_installed = False
|
||||
|
||||
|
||||
def install_console_privacy_filter() -> None:
|
||||
"""Attach the console scrub to the root logger and its current handlers.
|
||||
|
||||
Idempotent. ComfyUI installs its own root handlers during startup, before
|
||||
custom node packs are imported, so attaching here covers everything the
|
||||
user sees in the console afterwards."""
|
||||
global _privacy_filter_installed
|
||||
if _privacy_filter_installed:
|
||||
return
|
||||
_privacy_filter_installed = True
|
||||
root = logging.getLogger()
|
||||
scrubber = _ConsolePrivacyFilter()
|
||||
root.addFilter(scrubber)
|
||||
for handler in list(root.handlers):
|
||||
handler.addFilter(scrubber)
|
||||
|
||||
@ -90,7 +90,7 @@ def file_entry(abs_path: str, rel_path: str, source: str) -> dict[str, Any]:
|
||||
entry["width"] = img.width
|
||||
entry["height"] = img.height
|
||||
except Exception as error:
|
||||
print(f"[Easy Media] Failed to read image dimensions for {abs_path}: {error}")
|
||||
print(f"[Moxie] Failed to read image dimensions for {abs_path}: {error}")
|
||||
return entry
|
||||
|
||||
|
||||
|
||||
@ -13,13 +13,13 @@ def _move_model_to_cpu(model: Any) -> None:
|
||||
cpu()
|
||||
return
|
||||
except Exception as error:
|
||||
print(f"[Easy Media] Failed to move model to CPU with cpu(): {error}")
|
||||
print(f"[Moxie] Failed to move model to CPU with cpu(): {error}")
|
||||
to = getattr(model, "to", None)
|
||||
if callable(to):
|
||||
try:
|
||||
to("cpu")
|
||||
except Exception as error:
|
||||
print(f"[Easy Media] Failed to move model to CPU with to('cpu'): {error}")
|
||||
print(f"[Moxie] Failed to move model to CPU with to('cpu'): {error}")
|
||||
|
||||
|
||||
def cleanup_model_memory(*models: Any) -> None:
|
||||
@ -38,7 +38,7 @@ def cleanup_model_memory(*models: Any) -> None:
|
||||
if callable(ipc_collect):
|
||||
ipc_collect()
|
||||
except Exception as error:
|
||||
print(f"[Easy Media] Failed to clear CUDA cache: {error}")
|
||||
print(f"[Moxie] Failed to clear CUDA cache: {error}")
|
||||
try:
|
||||
mps_backend = getattr(getattr(torch, "backends", None), "mps", None)
|
||||
if mps_backend is None or not mps_backend.is_available():
|
||||
@ -48,4 +48,4 @@ def cleanup_model_memory(*models: Any) -> None:
|
||||
if callable(empty_cache):
|
||||
empty_cache()
|
||||
except Exception as error:
|
||||
print(f"[Easy Media] Failed to clear MPS cache: {error}")
|
||||
print(f"[Moxie] Failed to clear MPS cache: {error}")
|
||||
|
||||
@ -326,7 +326,7 @@ def detect_turbo_model(model: Any) -> TurboModelDetection:
|
||||
status="turbo",
|
||||
source="model_patches",
|
||||
evidence=(
|
||||
f"MiniMax H3 Turbo {fingerprint_name} fingerprint matched with "
|
||||
f"Moxie Turbo {fingerprint_name} fingerprint matched with "
|
||||
f"ranks {sorted(patch_ranks)}"
|
||||
),
|
||||
patch_count=patch_count,
|
||||
@ -344,7 +344,7 @@ def detect_turbo_model(model: Any) -> TurboModelDetection:
|
||||
source="model_patches",
|
||||
evidence=(
|
||||
"attention-only rank-32 LoRA fingerprint matched; this is not "
|
||||
"the MiniMax H3 Turbo 4-step structure"
|
||||
"the Moxie Turbo 4-step structure"
|
||||
),
|
||||
patch_count=patch_count,
|
||||
)
|
||||
@ -690,7 +690,7 @@ def notify_missing_model(model_name: str) -> dict:
|
||||
|
||||
PromptServer.instance.send_sync(MODEL_MISSING_EVENT, payload)
|
||||
except Exception as error:
|
||||
print(f"[Easy Media] Failed to notify missing model {model_name}: {error}")
|
||||
print(f"[Moxie] Failed to notify missing model {model_name}: {error}")
|
||||
return payload
|
||||
|
||||
|
||||
|
||||
@ -142,7 +142,7 @@ def _after_project_node(execution_list: Any, node_id: str) -> None:
|
||||
|
||||
model_management.soft_empty_cache()
|
||||
LOGGER.info(
|
||||
"[Easy Media][Project] Segment %s saved: released %s cache references",
|
||||
"[Moxie][Project] Segment %s saved: released %s cache references",
|
||||
segment, removed,
|
||||
)
|
||||
|
||||
@ -164,7 +164,7 @@ def install_project_memory_cleanup() -> None:
|
||||
except Exception:
|
||||
# Cache internals differ across ComfyUI versions. An optimization
|
||||
# failure must not turn successfully saved media into a failed run.
|
||||
LOGGER.exception("[Easy Media][Project] Unable to release segment cache")
|
||||
LOGGER.exception("[Moxie][Project] Unable to release segment cache")
|
||||
return result
|
||||
|
||||
complete._easy_media_memory_cleanup = True
|
||||
|
||||
@ -63,7 +63,7 @@ class _AsyncPreviewEncoder:
|
||||
try:
|
||||
callback(*args, **kwargs)
|
||||
except Exception as error: # Preview work must never abort sampling.
|
||||
print(f"[EasyMedia] Sampling preview encode failed: {error}", flush=True) # noqa: T201
|
||||
print(f"[Moxie] Sampling preview encode failed: {error}", flush=True) # noqa: T201
|
||||
finally:
|
||||
self._queue.task_done()
|
||||
|
||||
@ -318,7 +318,7 @@ def send_preview(
|
||||
# mutable server fields here can target a later execution.
|
||||
server.send_sync(SAMPLING_PREVIEW_EVENT, payload, client_id)
|
||||
except Exception as error: # Preview transport is optional sampler telemetry.
|
||||
print(f"[EasyMedia] Sampling preview unavailable: {error}", flush=True) # noqa: T201
|
||||
print(f"[Moxie] Sampling preview unavailable: {error}", flush=True) # noqa: T201
|
||||
|
||||
|
||||
def create_preview_callback(
|
||||
@ -368,6 +368,6 @@ def create_preview_callback(
|
||||
display_node_id=display_node_id,
|
||||
)
|
||||
except Exception as error: # Preview decoding must never abort sampling.
|
||||
print(f"[EasyMedia] Sampling preview decode failed: {error}", flush=True) # noqa: T201
|
||||
print(f"[Moxie] Sampling preview decode failed: {error}", flush=True) # noqa: T201
|
||||
|
||||
return callback
|
||||
|
||||
Loading…
Reference in New Issue
Block a user