Skip to content

idea: fit_to_model / restore_to_source - exact size and frame-count round-trip for v2v templates #602

Description

@dkackman

Idea, not approved work. Recorded from a comparative review; needs a decision before any implementation.

Gap

Our video-to-video templates refuse frame counts off the model grid, and handle aspect ratio inconsistently: upscale-clip centre-crops while refine-clip stretches. Users must pre-conform their footage.

Idea

A fit_to_model / restore_to_source task pair:

  • Fit:
    • Resize to the model bucket by stretching, cropping to fill, or letterboxing, and record what was done.
    • Pad the frame count to the grid.
  • Restore:
    • Crop out the letterbox and resize back to the exact source width and height.
    • Reconcile the frame count: tolerate a small difference, and keep the original tail frames the model dropped.
    • Optionally blend with the original (orig*(1-s) + out*s).

Optional extension: guided enhancement anchors

  • Pick every Nth frame (16 recommended), always including the first and last.
  • Enhance each anchor with an image model (Z-Image img2img).
  • Feed the anchors to LTX v2v as keyframe conditions; their strengths are cond 0.5 and guiding 0.2.
  • LTX2ConditionPipeline already takes conditions with latent indices. Their i % 8 == 1 index dodge is a ComfyUI quirk, not needed here.

Their files: VRGDG_VideoEnhanceNodes.py, VRGDG_StandaloneVideoEnhancerNodes.py.

Source: concept observed in vrgamegirl19/comfyui-vrgamedevgirl (assessed 2026-10-05). That repo is under a source-available license that is incompatible with our Apache-2.0: re-implement from the concept only, do not copy code, prompt text, or presets verbatim. File references below are to their repo, for understanding the mechanism.

No activity

Activity on this issue will appear here.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    backend:sharedenhancementNew feature or requestfeatureWork bigger than a fix: designed with Don, built in stages (harnest R11)owner:testerTester's turn to actpriority:2Backlog rank: solid ROI, moderate scopestatus:plan-approvedDon approved the feature plan (Don only)status:verifiedTester confirmed the fix via a real MCP call

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions