Split a 31 or 61 second video into valid Sume jobs: Python by model

A 31 or 61 second video cannot be 30 s plus 1 s on Wan 3.0 or Seedance 2.5, since the last job is under the minimum. Split evenly with this Python script.

5 min readSume
All posts

Split the length evenly across the fewest jobs the model's maximum allows. A 31-second video is 16 plus 15 seconds on Wan 3.0 or Seedance 2.5, not 30 plus 1, because the 1-second job is under the minimum (2 seconds on Wan, 4 on Seedance 2.5). The script below does this for any total and refuses lengths that cannot be split.

Why the last job breaks

Platform limits push you to odd lengths. YouTube says a Short can run up to three minutes, and Google lists a 60-second feed window for Shorts ads, so a 61-second file is a real case. Every Sume video model has a minimum as well as a maximum. Wan 3.0 takes 2 to 30 seconds, Seedance 2.5 takes 4 to 30, Seedance 2.0 takes 4 to 15, and Omni Flash 1.1 takes 3 to 10. A greedy split (30, 30, 1) ends on a job that the model refuses.

The script

It takes the smallest job count, ceil(total / max), then spreads the remainder one second at a time so the parts differ by at most one second.

import math

LIMITS = {"wan-3.0": (2, 30), "seedance-2.5": (4, 30),
          "seedance-2": (4, 15), "gemini-omni-flash-1.1": (3, 10)}


def split(total, model):
    lo, hi = LIMITS[model]
    n = math.ceil(total / hi)
    base, extra = divmod(total, n)
    parts = [base + 1] * extra + [base] * (n - extra)
    if min(parts) < lo:
        raise ValueError(f"{total} s cannot be split for {model}")
    return parts


for model in LIMITS:
    for total in (31, 61, 91):
        print(model, total, split(total, model))
try:
    split(1, "wan-3.0")
except ValueError as e:
    print("refused:", e)

Output for the four models

Parts the script returns, from the Sume video catalog limits (read 2026-10-07)
Model31 s61 s
Wan 3.016, 1521, 20, 20
Seedance 2.516, 1521, 20, 20
Seedance 2.011, 10, 1013, 12, 12, 12, 12
Omni Flash 1.18, 8, 8, 79, 9, 9, 9, 9, 8, 8

What the splits cost

At 720p, Wan 3.0 lists $0.10 per second and Sume bills the list times 1.25, rounded up to the cent per job. The 16 and 15 second jobs cost $2.00 and $1.88, so 31 seconds is $3.88. The 61-second split of 21, 20 and 20 seconds costs $2.63, $2.50 and $2.50, which is $7.63.

On Seedance 2.5 at 720p in 9:16, the 16 and 15 second jobs cost $9.25 and $8.67, and the 31 seconds total $17.92. Timeline then joins the parts for $0.10 per started output minute, so a 31-second file adds $0.10 and a 61-second file adds $0.20.

A longer case: 91 seconds

The same function handles 91 seconds. Wan 3.0 and Seedance 2.5 need four jobs of 23, 23, 23 and 22 seconds. Seedance 2.0 needs seven jobs of 13 seconds, and Omni needs ten jobs: one of 10 seconds and nine of 9. The 91-second total is still inside the three-minute Shorts limit that YouTube states, but it is past the 60 seconds Google says display in the Shorts ad feed.

The job count matters more than the price when you hand the parts to a person for review. Four clips are four sets of cut points to approve, and ten are ten.

Limits of an even split

  • Cut points land at equal intervals, not at scene changes. If the script has beats, split at the beats and check each part against the model's range.
  • Continuity across parts needs an end frame or a reference. Wan 3.0 and Seedance accept image and end-frame inputs in the catalog.
  • Re-read GET /v1/videos/models before a run. The limits in the script are the values read on 2026-10-07.

Sources

Related posts

More in Developers

All Developers posts

Written by Sume