The compose step previously built the timeline at the manifest resolution while staging segments are written at the (hidden) half-res sampling size, so ffmpeg's overlay pasted the smaller segments into the top-left quarter of a black full-res canvas and the combine's restore gate saw frames already at the manifest size and never fired. - compose_h3_project_video now probes the timeline segments and composes at the size they all share (_uniform_probed_size; manifest dims remain the fallback for mixed/unknown sizes) - restore_project_video_resolution (utils/rtx_vsr.py) fast-probes the composed file, and when it differs from the manifest decodes once, upscales (RTX VSR, Lanczos fallback, exact size) and rebuilds the video so VIDEO, images, audio and fps all carry the editor-selected resolution; any failure keeps the original video - the restore lives in the base combine so MoxieCombine (images slot) and the legacy GetVideoComponents wiring are both covered; the duplicated images gate in MoxieCombine is gone
63 lines
2.3 KiB
Python
63 lines
2.3 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
|
|
|
|
|
|
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)
|
|
|
|
# The base combine has already restored the editor-selected
|
|
# resolution (utils/rtx_vsr.py) before the video was returned, so
|
|
# every output below - including the images slot consumed by
|
|
# `easy saveVideo` - carries the full project resolution.
|
|
components = video.get_components()
|
|
return io.NodeOutput(
|
|
video,
|
|
prefix,
|
|
components.images,
|
|
components.audio,
|
|
float(components.frame_rate),
|
|
)
|