diff --git a/src/main.js b/src/main.js index e0885ff..ee8cf2a 100644 --- a/src/main.js +++ b/src/main.js @@ -59,6 +59,7 @@ async function handleGenerate() { 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 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'; const aspectRatio = el.selRatio?.value || '1:1'; @@ -109,7 +110,7 @@ async function handleGenerate() { } setProgress(el, 100, 'assembling gif...'); - const blob = await assembleGif(allFrames, fps); + const blob = await assembleGif(allFrames, fps, maxSize); currentGifUrl = URL.createObjectURL(blob); showResult(el, currentGifUrl); setProgress(el, 100, 'done! 🎉');