Fix: defaults + ratio previews wiring

This commit is contained in:
2026-03-21 01:14:48 -07:00
parent d7a54fa5f6
commit 353a9fff97

View File

@@ -58,8 +58,8 @@ async function handleGenerate() {
return;
}
const model = el.selModel?.value || 'google/gemini-3.1-flash-image-preview';
const frameCount = Math.max(2, Math.min(24, Number.parseInt(el.inpFrames?.value || '4', 10) || 4));
const model = el.selModel?.value || 'bytedance-seed/seedream-4.5';
const frameCount = Math.max(2, Math.min(24, Number.parseInt(el.inpFrames?.value || '2', 10) || 2));
const fps = Math.max(1, Math.min(30, Number.parseInt(el.inpFps?.value || '4', 10) || 4));
const maxSize = Math.max(32, Math.min(1024, Number.parseInt(el.inpMaxSize?.value || '256', 10) || 256));
const imageSize = '1K';
@@ -90,7 +90,7 @@ async function handleGenerate() {
allFrames.push(first.base64);
history.push(firstMsg, first.assistantMsg);
addFramePreview(el, first.base64, 0);
addFramePreview(el, first.base64, 0, aspectRatio);
setProgress(el, Math.round((1 / frameCount) * generationMaxPct), `frame 1 of ${frameCount} done`);
for (let i = 2; i <= frameCount; i++) {
@@ -110,7 +110,7 @@ async function handleGenerate() {
allFrames.push(next.base64);
history.push(nextUserMsg, next.assistantMsg);
addFramePreview(el, next.base64, i - 1);
addFramePreview(el, next.base64, i - 1, aspectRatio);
setProgress(el, Math.round((i / frameCount) * generationMaxPct), `frame ${i} of ${frameCount} done`);
}