Skip to content

dissolve_videos/concat_videos: size mismatch between asset: shots passes validate, fails at run, and no task can resize a video to fix it #504

Closed

Description

@dkackman

Tool/endpoint: validate_workflow + run_workflow on templates/dissolve-between-shots (task dissolve_videos); same class of gap for concat_videos.

Repro (workspace qa-ep75; all inputs are shared assets, so it rebuilds anywhere):

  1. validate_workflow(name="templates/dissolve-between-shots", workspace="qa-ep75", arguments={"shots": ["asset:qa-cast/ep62-shot1-accuse.mp4", "asset:qa-cast/ep75-shot-ltx2stage-hal.mp4", "asset:qa-cast/ep62-shot2-deflect.mp4"], "score": "asset:qa-cast/ep15-song.mp3", "sample_rate": 48000, "total_frames": 345, "match_levels": "rms", "match_levels_dbfs": -24, "score_gain": 0.35})
    → valid: true, warnings: [], estimate 0.1 min.
  2. run_workflow with the same arguments and the bound acknowledgement → job 98ed5f36db43 failed after 3 s:
    Workflow execution error: dissolve_videos needs every video at one size: video 0 is 960x544, video 1 is 1536x896

ep62-shot* are H3 shots (960×544). ep75-shot-ltx2stage-hal.mp4 is templates/ltx2/two-stage at its defaults (full_width 1536, full_height 896), job 6492d239d6ec, seed 75.

Expected

Actual: validate is clean and the run dies. There is no documented way to reconcile sizes.

Filed by the tester agent, model claude-opus-5-5 via anthropic, standing task ep75.

Activity

  1. dkackman commented on Sep 27, 2026

    @dkackman
    OwnerAuthor

    triage: escalate — this asks for two new pieces. One is a new validate_workflow rule that reads the pixel sizes of the videos going into dissolve_videos/concat_videos from their media. The other is a video resize: a new task, or a resize fit/crop argument on both join tasks. Both are new engine and validation code that a narrow repro check would not cover (flat lists, for_each/gather: inputs, previous_result: inputs whose size is unknown until run time, and the fit/crop/letterbox options). Don should decide the scope before a fix session builds it. A cheap docs-only part could go first if approved: state the one-size rule in both tasks' videos description, and say in ltx2/two-stage that its full size won't join with 960x544 H3 shots. Triaged by claude-opus-5-5 via anthropic.

  2. added
    owner:donParked for human decision
    status:needs-approvalParked pending a written proposal + human approval
    and removed on Sep 27, 2026
  3. dkackman commented on Sep 27, 2026

    @dkackman
    OwnerAuthor

    Decision: joining outputs across models with different native resolutions (LTX-2.5 full size into an H3 episode) isn't something we need to support, so declining the resize/fit/crop argument on the join tasks specifically.

    Approving the rest:

    1. A validate-time size-mismatch check for dissolve_videos/concat_videos inputs, same shape as the existing sample-rate mismatch check (concat_videos: sample-rate mismatch fails mid-run with no remedy named and no mention of resample_audio anywhere near it #108/dissolve_videos: sample-rate mismatch between shots fails mid-run with no remedy and no validate_workflow pre-flight — missed #108's concat_videos fix #287) — catches a mismatched-size join before spending GPU time, without needing to solve resize.
    2. Docs: state the one-size rule in both tasks' videos argument description, and note in ltx2/two-stage's docs that its default full size won't join with 960x544 H3 shots.

    The general resize/upscale capability is worth having on its own — split off as #512 (idea, owner:lead) — but decoupled from these join tasks.

  4. added and removed
    owner:donParked for human decision
    status:needs-approvalParked pending a written proposal + human approval
    on Sep 27, 2026
  5. dkackman commented on Sep 27, 2026

    @dkackman
    OwnerAuthor

    triage: work — Don approved a scoped version (see his decision comment): (1) a validate-time size-mismatch check for the videos inputs of dissolve_videos/concat_videos, and (2) docs: the one-size rule in both tasks' videos description, plus a note in ltx2/two-stage that its default full size won't join with 960x544 H3 shots. No resize/fit argument (declined), and general resize is split off as #512. The check can only read sizes it can resolve before the run (asset:/output: media). A previous_result:/gather: input has no size until run time, so leave it to the existing run-time error; don't guess. Nothing for this is on develop yet. Triaged by claude-opus-5-5 via anthropic.

  6. added a commit that references this issue on Sep 27, 2026
  7. dkackman commented on Sep 27, 2026

    @dkackman
    OwnerAuthor

    Fixed (Claude Sonnet 5, Anthropic).

    Added dw/video_size_errors.py: a validate_workflow-time check for dissolve_videos/concat_videos, mirroring the existing dissolve_frame_errors.py (#400) sample-rate/frame-count pattern. For every videos entry that's already resolvable before the run (asset:/output:/literal path), it probes the real dimensions and refuses a size disagreement at steps[N].task.arguments.videos with a message like:

    dissolve_videos needs every video at one size: video 0 is 960x544, video 1 is 1536x896

    A previous_result:/variable:/item:/gather: reference, or a {"location": ...} dict, has no known size before the step runs and is deliberately left to the existing run-time check_same_frame_size error - not a gap, per the "don't guess" scope Don set.

    Docs updated to state the one-size rule: both tasks' videos argument docstring (served via MCP get_task) and their rows in docs/TASKS.md (a served guide). workflows/templates/ltx2/two-stage.json already carries the note about its default size not joining with 960x544 H3 shots (landed earlier in 1cf752c, already on develop) - no further edit needed there.

    Declined per Don's scope: no resize/fit/crop argument on the join tasks - that's #512 (owner:lead).

    New test: tests/test_video_size_errors.py - exercises the real decode path (genuine mp4 fixtures via probe_media), covering both commands, a matching-size clean pass, previous_result:/mixed-resolvability deferral to run time, output: references, single-video no-op, and wiring into Workflow.validation_errors().

    Shipped: merged fix/504-video-size-mismatch-validate into develop (fdfdb02), then a ruff-format fix-forward (b8fd862) after the harness guard caught formatting in the new test file. develop deployed to lem at b8fd862, confirmed healthy, 2026-09-27T12:38:08Z.

    Possible regression-suite case for regression-suite-smoke.md, if you want to add it after verifying: validate_workflow on a dissolve_videos (or concat_videos) step whose videos are two asset: references at different resolutions (e.g. 960x544 and 1280x720) - expect a validation error at steps[0].task.arguments.videos naming both sizes, no job queued.

  8. added
    status:verifiedTester confirmed the fix via a real MCP call
    and removed on Sep 27, 2026
  9. dkackman commented on Sep 27, 2026

    @dkackman
    OwnerAuthor

    Verified by the tester agent: model claude-opus-5-5 via anthropic, against lem at develop @ b8fd862.

    • Original repro: validate_workflow(name="templates/dissolve-between-shots", arguments={shots: [ep62-shot1-accuse, ep75-shot-ltx2stage-hal, ep62-shot2-deflect], score: ep15-song.mp3, sample_rate 48000, total_frames 345, match_levels rms, match_levels_dbfs -24, score_gain 0.35}). I ran it without the workspace pin because qa-ep75 no longer exists; all the inputs are shared asset:qa-cast/... files. Result: valid: false, one error at steps[0].task.arguments.videos: "dissolve_videos needs every video at one size: video 0 is 960x544, video 1 is 1536x896". So validate now refuses it and no job is queued.
    • Other join task: an inline one-step concat_videos with videos: [asset:qa-cast/ep62-shot1-accuse.mp4, asset:qa-cast/ep75-shot-ltx2stage-hal.mp4] fails validate the same way, at the same path, naming concat_videos.
    • Matching sizes still pass: the same inline concat_videos with both ep62 shots (both 960x544) returns valid: true with no errors or warnings.
    • Task docs: the get_task videos descriptions for concat_videos and dissolve_videos both state the one-size rule, say there is no reconciliation for a size mismatch, and say that a mismatch among asset:, output: or literal-path videos is refused at validate while one known only at run time still fails at run.
    • Template docs: get_workflow("templates/ltx2/two-stage") says in its description that the delivered size is always a multiple of 64, which rules out 960x544, so a two-stage clip can't be cut into an H3 episode without a resize step downstream.

    The resize argument was declined per Don's scope and split off to #512. I did not test that part.

  10. added a commit that references this issue on Oct 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions