@koda-sl/baker-cli 0.294.0-dev.97421c92b → 0.296.0-dev.f25aa60dd

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/cli.js CHANGED
@@ -16,6 +16,7 @@ import {
16
16
  RunAbortedError,
17
17
  SEEDANCE_DURATIONS,
18
18
  SEEDANCE_PROFILE,
19
+ SPOKEN_WORDS_PER_SECOND,
19
20
  VIDEO_GENERATE_MODELS,
20
21
  ValidationError,
21
22
  YtDlpError,
@@ -53,6 +54,8 @@ import {
53
54
  sha256Hex,
54
55
  spineInputFlags,
55
56
  spineInputOps,
57
+ splitScriptFor,
58
+ spokenWordsIn,
56
59
  supportsLastFrame,
57
60
  supportsParam,
58
61
  supportsReferenceToVideo,
@@ -60,7 +63,7 @@ import {
60
63
  ulid,
61
64
  validateCanvasDeep,
62
65
  ytDlpBlockSignal
63
- } from "./chunk-LTXNRRXW.js";
66
+ } from "./chunk-YMHERSTK.js";
64
67
  import {
65
68
  csvOrJson,
66
69
  daysAgoIso,
@@ -57602,6 +57605,26 @@ function uploadFailure(path47) {
57602
57605
  };
57603
57606
  }
57604
57607
 
57608
+ // src/commands/studio/spokenPace.ts
57609
+ var WORDS_PER_SECOND2 = SPOKEN_WORDS_PER_SECOND;
57610
+ var spokenWords = spokenWordsIn;
57611
+ function wordsThatFit(seconds) {
57612
+ return Math.floor(seconds * WORDS_PER_SECOND2);
57613
+ }
57614
+ function spokenPaceHint(prompt, seconds, model) {
57615
+ const words2 = spokenWords(prompt);
57616
+ if (words2 === 0) return null;
57617
+ const split = model ? splitScriptFor(words2, model) : null;
57618
+ if (split) {
57619
+ return `The line is ${words2} words \u2014 about ${Math.ceil(words2 / WORDS_PER_SECOND2)}s of speech \u2014 and ${model} renders at most ${split.maxSeconds}s (~${Math.floor(split.maxSeconds * WORDS_PER_SECOND2)} words). It will not refuse and it will not cut: it will RUSH, swallowing syllables. Split the script into ${split.clips} takes of roughly ${split.wordsPerClip} words each, rendered separately and cut together \u2014 break it where the thought breaks, not mid-sentence. Or move to a model that renders longer (bytedance/seedance-2.5 goes to 30s).`;
57620
+ }
57621
+ if (!seconds) return null;
57622
+ const fits = wordsThatFit(seconds);
57623
+ if (words2 <= fits) return null;
57624
+ const rate = (words2 / seconds).toFixed(1);
57625
+ return `The line is ${words2} words and this clip is ${seconds}s \u2014 that is ${rate} words a second against a natural ${WORDS_PER_SECOND2}. The model will not run over, it will RUSH: syllables swallowed, endings clipped, and the take unusable however good the picture. Cut the line to about ${fits} words, or give it the length it needs (${Math.ceil(words2 / WORDS_PER_SECOND2)}s). Do not re-render the same line at the same length and hope.`;
57626
+ }
57627
+
57605
57628
  // src/commands/studio/animate.ts
57606
57629
  var MODEL_LIST = VIDEO_MODEL_IDS;
57607
57630
  var DEFAULT_MAX_WAIT_MS = 6e5;
@@ -57653,10 +57676,10 @@ registerSchema({
57653
57676
  },
57654
57677
  duration: {
57655
57678
  type: "number",
57656
- // Left unset this SNAPS onto the model's set rather than failing: the lane
57657
- // default is 5s and Veo renders only 4/6/8, so an unstated length becomes 4
57658
- // there. An explicit length the model cannot render is refused by name.
57659
- description: `Clip length in seconds \u2014 per-model. Unset it and the lane default (5s) snaps onto what the model renders. Past 15s only bytedance/seedance-2.5 will do it, out to 30. Across the roster: ${CLIP_DURATIONS.join(", ")}`,
57679
+ // Left unset this SNAPS onto the model's set rather than failing: Veo renders
57680
+ // only 4/6/8, so an unstated length lands on the nearest of those. An explicit
57681
+ // length the model cannot render is refused by name.
57682
+ description: `Clip length in seconds \u2014 per-model. LEAVE IT OFF when someone speaks: the line sizes the clip itself, at ~2.5 words a second (40 words needs 16s), because a model handed more words than fit does not run over, it rushes and swallows syllables. Unset with nobody speaking is 5s. Past 15s only bytedance/seedance-2.5 will do it, out to 30. Across the roster: ${CLIP_DURATIONS.join(", ")}`,
57660
57683
  required: false
57661
57684
  },
57662
57685
  quality: {
@@ -57832,6 +57855,8 @@ function costHintsFor(body) {
57832
57855
  ];
57833
57856
  const pinned = pinnedModelHint({ avatar: body.avatar, model: body.model, generateAudio: body.generateAudio });
57834
57857
  if (pinned) hints2.push(pinned);
57858
+ const pace = spokenPaceHint(body.prompt, body.duration, model);
57859
+ if (pace) hints2.push(pace);
57835
57860
  if (count > 1) {
57836
57861
  hints2.push(
57837
57862
  "Ask for more than one take only when the MOTION is the risk \u2014 for a look you are unsure about, iterate on the still first."
@@ -57875,7 +57900,7 @@ var animateCommand = defineCommand200({
57875
57900
  "aspect-ratio": { type: "string", description: "Aspect ratio (default 9:16)", required: false },
57876
57901
  duration: {
57877
57902
  type: "string",
57878
- description: `Seconds, per-model \u2014 unset snaps the 5s default onto the model's set. Roster: ${CLIP_DURATIONS.join(" | ")}`,
57903
+ description: `Seconds, per-model \u2014 leave it off when someone speaks and the line sizes it (~2.5 words/s); 5s when nobody does. Roster: ${CLIP_DURATIONS.join(" | ")}`,
57879
57904
  required: false
57880
57905
  },
57881
57906
  quality: {