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.
Editor: one wording for continued-part limits, and say the lengthened length
Bowen Xue4682ec3149aa
diff --git a/freevideo_engine/agent/errors.py b/freevideo_engine/agent/errors.pyindex 3230304..59974fa 100644--- a/freevideo_engine/agent/errors.py+++ b/freevideo_engine/agent/errors.py@@ -67,7 +67,7 @@ ERRORS = {'chain_missing': (409, True, 'The saved chain receipt is unavailable.', 'Restore the chain receipt and retry resume, or submit a new job.'),'join_failed': (409, True, 'The generated blocks could not be joined; completed blocks are retained.', 'POST /freevideo/agent/v1/jobs/{id}/resume to retry joining the completed blocks.'),'chain_too_long': (422, False, 'One continuous shot can have up to 8 parts. Make it shorter.', 'Submit a new job with a smaller seconds, or cut to a new shot with a new job without continue_from; continue_from counts the parts of the video it continues.'),- 'chain_short_parts': (422, False, 'With a part shorter than 10 seconds, this video can have up to 4 parts. Make each part at least 10 seconds long, or use fewer parts.', 'Submit a new job whose continuing parts are at least 10 seconds, with fewer parts, or with first_frame_reference true; continue_from counts the parts of the video it continues.'),+ 'chain_short_parts': (422, False, 'With a part shorter than 10 seconds, one continuous shot can have up to 4 parts. Make every part at least 10 seconds long, or use fewer parts.', 'Submit a new job whose continuing parts are at least 10 seconds, with fewer parts, or with first_frame_reference true; continue_from counts the parts of the video it continues.'),'chain_rejected': (409, False, 'The continuous backend rejected this generation.', 'Read GET /freevideo/agent/v1/capabilities and submit a supported generation request.'),'invalid_wait': (422, False, 'wait must be a finite nonnegative number of seconds.', 'Use wait=0 or wait=25; larger valid values are clamped to 25 seconds.'),'invalid_resume': (422, False, 'resume accepts an empty object or an optional ref only.', 'Send {} or {"ref":"resume-1"}; submit a new job to change generation parameters.'),diff --git a/freevideo_engine/chain_plan.py b/freevideo_engine/chain_plan.pyindex 13289ec..dfbc028 100644--- a/freevideo_engine/chain_plan.py+++ b/freevideo_engine/chain_plan.py@@ -162,8 +162,8 @@ def plan(seconds, single=False, max_frames=None, single_limit_seconds=None, blocshort = any(length < FULL_PART_SECONDS for length in lengths[0 if continued else 1:])allowed = parts_limit(short, first_frame, max_parts)if parts > allowed and allowed < max_parts:- raise PlanError('too_many_short_parts', 'With a part shorter than %d seconds, this video can have up to '- '%d parts. Make each part at least %d seconds long, or use fewer parts.'+ raise PlanError('too_many_short_parts', 'With a part shorter than %d seconds, one continuous shot can have up to '+ '%d parts. Make every part at least %d seconds long, or use fewer parts.'% (FULL_PART_SECONDS, allowed, FULL_PART_SECONDS))if parts > allowed:raise PlanError('too_many_parts', 'One continuous shot can have up to %d parts. Make it shorter.' % max_parts)diff --git a/freevideo_engine/chain_runner.py b/freevideo_engine/chain_runner.pyindex 485078b..ad3ce62 100644--- a/freevideo_engine/chain_runner.py+++ b/freevideo_engine/chain_runner.py@@ -33,10 +33,10 @@ class ChainShortPartsTooMany(ChainTooLong):def __init__(self, parts, limit):full = chain_plan.FULL_PART_SECONDS- ValueError.__init__(self, 'With a part shorter than %d seconds, this video can have up to %d parts. '- 'Make each part at least %d seconds long, or use fewer parts.' % (full, limit, full))+ ValueError.__init__(self, 'With a part shorter than %d seconds, one continuous shot can have up to %d parts. '+ 'Make every part at least %d seconds long, or use fewer parts.' % (full, limit, full))self.parts, self.limit = parts, limit- self.message_zh = '有短于 %d 秒的段时,这条视频最多 %d 段。请把每段加长到至少 %d 秒,或减少段数。' % (full, limit, full)+ self.message_zh = '有短于 %d 秒的段时,一个连续镜头最多 %d 段。请把每段加长到至少 %d 秒,或减少段数。' % (full, limit, full)class ChainPartTooShort(ValueError):diff --git a/web/editor.js b/web/editor.jsindex 9b345a1..bac41e1 100644--- a/web/editor.js+++ b/web/editor.js@@ -48,8 +48,8 @@ export const PARTS_LIMIT_CODES = ['chain_too_long', 'chain_part_too_short', 'chaexport function partsLimitText(code, t = en => en, limit = null) {const {followSeconds: least, fullSeconds: full, maxParts, shortMaxParts} = model.RULES;if (code === 'chain_part_too_short') return t(`Each continued part must be at least ${least} seconds. Make it longer.`, `接着生成的每一段至少 ${least} 秒,请加长这一段。`);- if (code === 'chain_short_parts') { const most = limit ?? shortMaxParts; return t(`With a part shorter than ${full} seconds, this video can have up to ${most} parts. Make each part at least ${full} seconds long, or use fewer parts.`,- `有短于 ${full} 秒的段时,这条视频最多 ${most} 段。请把每段加长到至少 ${full} 秒,或减少段数。`); }+ if (code === 'chain_short_parts') { const most = limit ?? shortMaxParts; return t(`With a part shorter than ${full} seconds, one continuous shot can have up to ${most} parts. Make every part at least ${full} seconds long, or use fewer parts.`,+ `有短于 ${full} 秒的段时,一个连续镜头最多 ${most} 段。请把每段加长到至少 ${full} 秒,或减少段数。`); }return t(`One continuous shot can have up to ${limit ?? maxParts} parts. Make it shorter.`, `一个连续镜头最多 ${limit ?? maxParts} 段,请缩短。`);}// Shared by error() and actions.reasonText: one sentence naming the failed step.@@ -70,9 +70,9 @@ export function editorErrorText(value, t = en => en) {if (code === 'gpu_memory' || /out of memory|cuda.*memory|显存不足|显存不够/i.test(raw))return t(`${stage}: not enough GPU memory.`, `${stage}时显存不足。`);const known = {- chain_part_too_short: t(`Each continued part needs at least ${model.RULES.followSeconds} seconds.`, `接续的每段至少 ${model.RULES.followSeconds} 秒。`),- chain_short_parts: t(`With a part shorter than ${model.RULES.fullSeconds} seconds, one video can have up to ${model.RULES.shortMaxParts} parts.`,- `有短于 ${model.RULES.fullSeconds} 秒的段时,一条视频最多 ${model.RULES.shortMaxParts} 段。`),+ chain_part_too_short: t(`Each continued part must be at least ${model.RULES.followSeconds} seconds.`, `接着生成的每一段至少 ${model.RULES.followSeconds} 秒。`),+ chain_short_parts: t(`With a part shorter than ${model.RULES.fullSeconds} seconds, one continuous shot can have up to ${model.RULES.shortMaxParts} parts.`,+ `有短于 ${model.RULES.fullSeconds} 秒的段时,一个连续镜头最多 ${model.RULES.shortMaxParts} 段。`),chain_too_long: t(`One continuous shot can have up to ${model.RULES.maxParts} parts.`, `一个连续镜头最多 ${model.RULES.maxParts} 段。`),too_long: t('This part is longer than the maximum length. Shorten it and try again.', '这一段超过了最长时长,请缩短后再试。'),missing_node: t('Generation is not ready. Restart FreeVideo.', '生成功能没有就绪,请重新启动 FreeVideo。'),diff --git a/web/editor_tracks.js b/web/editor_tracks.jsindex 0006e5d..703bb89 100644--- a/web/editor_tracks.js+++ b/web/editor_tracks.js@@ -10,6 +10,7 @@ import {createSelectionGestures, isMultiple, isTyping} from './editor_select.js'import {createTrackMenu} from './editor_menu.js';import {transportSnapPoints, setSnapping as setTransportSnapping} from './editor_transport_model.js';import {attachAudioTracks} from './editor_audio.js';+import {seconds as secondsText} from './editor_audio_notes.js';import {renderSpeedBadge} from './editor_speed.js';import {speedEdited} from './editor_speed_model.js';@@ -960,9 +961,10 @@ export function createTracks(host, {state, sources = {}, t = en => en, actions =else if (result.kind === 'extend') {const frames = result.frame - finished.clip.start - finished.clip.frames + result.frames;if (extendClip(finished.id, frames) && result.raised) {- const least = model.RULES.followSeconds;- actions.notify?.(result.least ? t(`Each continued part needs at least ${least} seconds.`, `接着生成的每一段至少 ${least} 秒。`)- : t(`Extended to ${result.frames / model.FPS} s.`, `已补到 ${result.frames / model.FPS} 秒。`));+ // Say the new length (tenths, rounded down like other durations) so the change is visible.+ const least = model.RULES.followSeconds, length = secondsText(result.frames, model.FPS);+ actions.notify?.(result.least ? t(`Lengthened to ${length} s. Each continued part must be at least ${least} seconds.`, `已加长到 ${length} 秒。接着生成的每一段至少 ${least} 秒。`)+ : t(`Lengthened to ${length} s.`, `已加长到 ${length} 秒。`));}} else attempt(t('Trim', '裁短'), record => model.trim(record, finished.id, finished.edge, result.frame));renderSelection();