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.
Continue from a video at another size of the same shape; short and low frame rate messages
Bowen Xue5736cbbbbde7
diff --git a/freevideo_engine/agent/errors.py b/freevideo_engine/agent/errors.pyindex 1653aa5..21c3aed 100644--- a/freevideo_engine/agent/errors.py+++ b/freevideo_engine/agent/errors.py@@ -298,10 +298,11 @@ FAILURE_REASONS_ZH = {'internal_error': '没有完成',}FAILURE_MESSAGES_ZH = {- 'The previous video is too short to continue; it needs to be at least 2 s long.': '接续的上一段视频太短,至少需要 2 秒',+ 'The previous video is too short to continue; it needs to be at least 1.7 s long.': '接续的上一段视频太短,至少需要 1.7 秒','The previous video has no usable continuation data. Generate it again with this version of FreeVideo.': '上一段视频缺少可用的接续数据','The previous video cannot be read.': '接续的上一段视频无法读取',- 'Use the same width and height as the previous video.': '接续的画面大小与上一段视频不一致',+ "The previous video's frame rate is too low to continue; it needs at least 10 frames per second.": '接续的上一段视频帧率太低,每秒至少需要 10 帧',+ 'Use the same aspect ratio as the previous video.': '接续的画面比例与上一段视频不同','The reference video is too short; it needs to be at least about 1 s long.': '参考视频太短,至少需要约 1 秒',}diff --git a/freevideo_engine/continuation.py b/freevideo_engine/continuation.pyindex f432520..69730c5 100644--- a/freevideo_engine/continuation.py+++ b/freevideo_engine/continuation.py@@ -31,7 +31,7 @@ FIRST_FRAME_REFERENCE_SHORT = 384VERSION = 1MISSING = 'The previous video has no usable continuation data. Generate it again with this version of FreeVideo.'-SIZE_MISMATCH = 'Use the same width and height as the previous video.'+SIZE_MISMATCH = 'Use the same aspect ratio as the previous video.'# Every refusal starts with UNSUPPORTED, then says what to change.UNSUPPORTED = 'Continue from video cannot be used with these settings.'UNSUPPORTED_DEVICE = UNSUPPORTED + ' Continuing a video needs an NVIDIA GPU. To make a new video, clear "Continue from video".'@@ -398,8 +398,10 @@ def prepare(video_path, canvas, manifest=None, sampling_plan=None, *, directory=def _prepare_snapshot(request, value, canvas, manifest=None, sampling_plan=None):validate_frames(canvas['frames'])metadata = value['metadata']+ # A record of another size is set aside like a missing one: the previous video's own ending is+ # encoded instead, which scales the same shape and refuses another one.if any(metadata['geometry'][key] != canvas[key] for key in ('width', 'height')):- raise ValueError(SIZE_MISMATCH)+ raise ValueError(MISSING)if manifest is not None and metadata['identity'] != identity(manifest):raise ValueError(MISSING)if sampling_plan is not None and metadata['first_canvas'] != {diff --git a/freevideo_engine/continuation_tail.py b/freevideo_engine/continuation_tail.pyindex 6c508db..c59d852 100644--- a/freevideo_engine/continuation_tail.py+++ b/freevideo_engine/continuation_tail.py@@ -24,8 +24,9 @@ AUDIO_RATE = 32000TICK_SAMPLES = 800AUDIO_WINDOW_TICKS = 600 # 15 s, the longest sound H3 generatesFPS = 24-TOO_SHORT = 'The previous video is too short to continue; it needs to be at least 2 s long.'+TOO_SHORT = 'The previous video is too short to continue; it needs to be at least 1.7 s long.' # NOMINAL_FRAMES is 1.625 s at 24 fps; the message rounds up so a 1.7 s video always fitsUNREADABLE = 'The previous video cannot be read.'+LOW_RATE = "The previous video's frame rate is too low to continue; it needs at least 10 frames per second."def _fit(image, width, height):@@ -54,6 +55,8 @@ def _picture(frame):def _rate(stream):rate = float(stream.average_rate or stream.guessed_rate or 0)+ if 0 < rate < 10:+ raise ValueError(LOW_RATE)if not 10 <= rate <= 121:raise ValueError(UNREADABLE)return ratediff --git a/freevideo_engine/failure_details.py b/freevideo_engine/failure_details.pyindex 9b921ec..adf51af 100644--- a/freevideo_engine/failure_details.py+++ b/freevideo_engine/failure_details.py@@ -444,13 +444,16 @@ def launcher_failure(value, *, zh=False, other_disk=False, disk_name='', can_rep('Generate the previous video again, then continue it.', '请重新生成上一段视频,再接续。')),(r'The previous video is too short to continue', 'continuation-short',('The previous video is too short', '上一段视频太短'),- ('Choose a video that is at least 2 seconds long.', '请选择至少 2 秒的视频。')),+ ('Choose a video that is at least 1.7 seconds long.', '请选择至少 1.7 秒的视频。')),(r'The previous video cannot be read', 'continuation-unreadable',('The previous video cannot be read', '无法读取上一段视频'),('Choose an MP4 video that plays normally.', '请选择能正常播放的 MP4 视频。')),- (r'Use the same width and height as the previous video', 'continuation-size',- ('The video sizes differ', '两段视频的画面大小不一致'),- ('Set the width and height to the previous video’s size.', '请把宽度和高度设为与上一段视频相同。')),+ (r"The previous video's frame rate is too low to continue", 'continuation-rate',+ ("The previous video's frame rate is too low", '上一段视频帧率太低'),+ ('Choose a video with at least 10 frames per second.', '请选择每秒至少 10 帧的视频。')),+ (r'Use the same aspect ratio as the previous video', 'continuation-size',+ ('The two videos have different aspect ratios', '两段视频的画面比例不同'),+ ('Choose a video size with the same aspect ratio as the previous video.', '请选择与上一段视频比例相同的画面大小。')),(r'Frame count must be 5 \+ 17n and at least 39', 'continuation-frames',('Choose a supported frame count', '请选择支持的帧数'),('Use 39, 56, 73, 90, or another value reached by adding 17. This includes the 22 repeated frames when continuing a video.',diff --git a/web/error_panel.js b/web/error_panel.jsindex 2853ffd..b803492 100644--- a/web/error_panel.js+++ b/web/error_panel.js@@ -15,15 +15,18 @@ const PLAIN_ERRORS = [{key: 'continuation-missing', message: 'The previous video has no usable continuation data. Generate it again with this version of FreeVideo.',title: ['This video cannot be continued', '这个视频暂时不能接续'],summary: ['Generate the previous video again, then continue it.', '请重新生成上一段视频,再接续。']},- {key: 'continuation-short', message: 'The previous video is too short to continue; it needs to be at least 2 s long.',+ {key: 'continuation-short', message: 'The previous video is too short to continue; it needs to be at least 1.7 s long.',title: ['The previous video is too short', '上一段视频太短'],- summary: ['Choose a video that is at least 2 seconds long.', '请选择至少 2 秒的视频。']},+ summary: ['Choose a video that is at least 1.7 seconds long.', '请选择至少 1.7 秒的视频。']},{key: 'continuation-unreadable', message: 'The previous video cannot be read.',title: ['The previous video cannot be read', '无法读取上一段视频'],summary: ['Choose an MP4 video that plays normally.', '请选择能正常播放的 MP4 视频。']},- {key: 'continuation-size', message: 'Use the same width and height as the previous video.',- title: ['The video sizes differ', '两段视频的画面大小不一致'],- summary: ['Set the width and height to the previous video’s size.', '请把宽度和高度设为与上一段视频相同。']},+ {key: 'continuation-rate', message: "The previous video's frame rate is too low to continue; it needs at least 10 frames per second.",+ title: ["The previous video's frame rate is too low", '上一段视频帧率太低'],+ summary: ['Choose a video with at least 10 frames per second.', '请选择每秒至少 10 帧的视频。']},+ {key: 'continuation-size', message: 'Use the same aspect ratio as the previous video.',+ title: ['The two videos have different aspect ratios', '两段视频的画面比例不同'],+ summary: ['Choose a video size with the same aspect ratio as the previous video.', '请选择与上一段视频比例相同的画面大小。']},{key: 'continuation-route', message: 'Continue from video cannot be used with these settings. Continuing a video needs an NVIDIA GPU. To make a new video, clear "Continue from video".',title: ['This computer can\'t continue a video', '这台电脑无法接续视频'],summary: ['Continuing a video needs an NVIDIA GPU. To make a new video, clear "Continue from video".', '接续视频需要 NVIDIA 显卡。要生成新视频,请清空“接着生成”。']},