@koda-sl/baker-cli 0.295.0-dev.f941e60fb → 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
|
@@ -54,6 +54,7 @@ import {
|
|
|
54
54
|
sha256Hex,
|
|
55
55
|
spineInputFlags,
|
|
56
56
|
spineInputOps,
|
|
57
|
+
splitScriptFor,
|
|
57
58
|
spokenWordsIn,
|
|
58
59
|
supportsLastFrame,
|
|
59
60
|
supportsParam,
|
|
@@ -62,7 +63,7 @@ import {
|
|
|
62
63
|
ulid,
|
|
63
64
|
validateCanvasDeep,
|
|
64
65
|
ytDlpBlockSignal
|
|
65
|
-
} from "./chunk-
|
|
66
|
+
} from "./chunk-YMHERSTK.js";
|
|
66
67
|
import {
|
|
67
68
|
csvOrJson,
|
|
68
69
|
daysAgoIso,
|
|
@@ -57610,13 +57611,18 @@ var spokenWords = spokenWordsIn;
|
|
|
57610
57611
|
function wordsThatFit(seconds) {
|
|
57611
57612
|
return Math.floor(seconds * WORDS_PER_SECOND2);
|
|
57612
57613
|
}
|
|
57613
|
-
function spokenPaceHint(prompt, seconds) {
|
|
57614
|
-
if (!seconds) return null;
|
|
57614
|
+
function spokenPaceHint(prompt, seconds, model) {
|
|
57615
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;
|
|
57616
57622
|
const fits = wordsThatFit(seconds);
|
|
57617
|
-
if (words2
|
|
57623
|
+
if (words2 <= fits) return null;
|
|
57618
57624
|
const rate = (words2 / seconds).toFixed(1);
|
|
57619
|
-
return `The line is ${words2} words and this clip is ${seconds}s \u2014 that is ${rate} words a second against a natural
|
|
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.`;
|
|
57620
57626
|
}
|
|
57621
57627
|
|
|
57622
57628
|
// src/commands/studio/animate.ts
|
|
@@ -57849,7 +57855,7 @@ function costHintsFor(body) {
|
|
|
57849
57855
|
];
|
|
57850
57856
|
const pinned = pinnedModelHint({ avatar: body.avatar, model: body.model, generateAudio: body.generateAudio });
|
|
57851
57857
|
if (pinned) hints2.push(pinned);
|
|
57852
|
-
const pace = spokenPaceHint(body.prompt, body.duration);
|
|
57858
|
+
const pace = spokenPaceHint(body.prompt, body.duration, model);
|
|
57853
57859
|
if (pace) hints2.push(pace);
|
|
57854
57860
|
if (count > 1) {
|
|
57855
57861
|
hints2.push(
|