Single-pass projects condition and sample at exactly half the editor-selected resolution (plain integer halving, no dimension policies). Moxie Project Video Combine restores the exact editor resolution on the combined frames right before its images output, driven by the fresh project manifest so a stale frontend widget can never misgate it. - utils/rtx_vsr.py: RTX VSR core (Apache 2.0, from Comfy-Org/Nvidia_RTX_Nodes_ComfyUI) + Lanczos fallback; the gate is simply 'frames differ from the manifest resolution' - nodes/project.py: halve first-pass dims for single mode only; dual-pass, SelfLift, passthrough and audio-only keep the editor size - moxie_combine.py: restore before the images output - scripts/test_rtx_upscale_integration.py: 17 standalone checks
67 lines
2.5 KiB
Python
67 lines
2.5 KiB
Python
from __future__ import annotations
|
|
|
|
from comfy_api.latest import io
|
|
from comfy_execution.graph_utils import ExecutionBlocker
|
|
|
|
from .nodes.project import EasyMultiTrackProjectVideoCombine, TYPE_PROJECT_DATA
|
|
from .utils.h3_project import safe_h3_project_name
|
|
from .utils.rtx_vsr import upscale_images_to_project_resolution
|
|
|
|
|
|
class MoxieCombine(EasyMultiTrackProjectVideoCombine):
|
|
"""MultiTrack Project Video Combine + Get Video Components.
|
|
|
|
Consolidates `easy multitrackProjectVideoCombine` and core
|
|
`GetVideoComponents`: one node emits the FILENAME_PREFIX plus the
|
|
images / audio / fps needed by `easy saveVideo`.
|
|
"""
|
|
|
|
@classmethod
|
|
def define_schema(cls) -> io.Schema:
|
|
return io.Schema(
|
|
node_id="MoxieCombine",
|
|
display_name="Moxie Project Video Combine",
|
|
category="EasyUse/MultiTrackEditor",
|
|
description=(
|
|
"Preview and combine the active videos from a MultiTrack project, "
|
|
"then expose the combined frames, audio and frame rate directly."
|
|
),
|
|
inputs=[
|
|
io.String.Input("project_name", force_input=True,
|
|
tooltip="PROJECT_NAME output of the Moxie MultiTrack Project node."),
|
|
TYPE_PROJECT_DATA.Input("project_data"),
|
|
],
|
|
hidden=[io.Hidden.unique_id],
|
|
outputs=[
|
|
io.Video.Output("VIDEO"),
|
|
io.String.Output("FILENAME_PREFIX"),
|
|
io.Image.Output("images"),
|
|
io.Audio.Output("audio"),
|
|
io.Float.Output("fps"),
|
|
],
|
|
not_idempotent=True,
|
|
)
|
|
|
|
@classmethod
|
|
def execute(cls, project_name: str, project_data) -> io.NodeOutput:
|
|
out = super().execute(project_name=project_name, project_data=project_data)
|
|
video, prefix = out[0], out[1]
|
|
|
|
if isinstance(video, ExecutionBlocker):
|
|
return io.NodeOutput(video, video, video, video, video)
|
|
|
|
components = video.get_components()
|
|
# Hidden half-res sampling contract: restore the editor-selected
|
|
# resolution right before the frames leave this node. Frames already
|
|
# at the project resolution pass through untouched.
|
|
images = upscale_images_to_project_resolution(
|
|
components.images, safe_h3_project_name(project_name)
|
|
)
|
|
return io.NodeOutput(
|
|
video,
|
|
prefix,
|
|
images,
|
|
components.audio,
|
|
float(components.frame_rate),
|
|
)
|