Skip to content

Make videos on the computer you already own. FreeVideo runs MiniMax H3 in as little as 8 GB of VRAM and 16 GB of RAM, and adapts its acceleration path to your hardware.

Normalise saved frames before comparing in reuse settings

Bowen Xue5ea9fdc4423c
diff --git a/web/result_reuse.js b/web/result_reuse.js
index 7963b21..d255802 100644
--- a/web/result_reuse.js
+++ b/web/result_reuse.js
@@ -16,8 +16,10 @@ export async function savedSettings(api, record) {
if (!reply.ok) return null;
const {prompt} = await reply.json();
if (typeof prompt !== 'string' || !prompt) return null;
- const frames = Number(g.frames) > 0 ? Number(g.frames) : framesOf(g.seconds);
- return {text: prompt, width: Number(g.width), height: Number(g.height), frames: Number.isFinite(frames) ? frames : null};
+ // The panel keeps seconds to three decimals, so the frames it will ask for are those of that rounded duration.
+ const raw = Number(g.frames) > 0 ? Number(g.frames) / 24 : Number(g.seconds);
+ const seconds = raw > 0 ? Math.floor(raw * 1000) / 1000 : null;
+ return {text: prompt, width: Number(g.width), height: Number(g.height), seconds, frames: seconds === null ? null : framesOf(seconds)};
} catch { return null; }
}