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.
Say why a failed part failed: unwritable output folder, incomplete model
Bowen Xue3374061c41f1
diff --git a/freevideo_engine/editor_export.py b/freevideo_engine/editor_export.pyindex cac5045..01e9519 100644--- a/freevideo_engine/editor_export.py+++ b/freevideo_engine/editor_export.py@@ -44,7 +44,7 @@ _RECORD_BYTES = 8 * 1024 * 1024class ExportError(Exception):"""A public reason code; never retain a decoder's path-bearing message."""def __init__(self, reason='failed'):- self.reason = reason if reason in ('source_missing', 'unreadable', 'disk_full', 'failed') else 'failed'+ self.reason = reason if reason in ('source_missing', 'unreadable', 'disk_full', 'not_writable', 'failed') else 'failed'super().__init__(self.reason)@@ -77,6 +77,8 @@ def _reason(error):return error.reasonif isinstance(error, OSError) and error.errno == errno.ENOSPC:return 'disk_full'+ if isinstance(error, PermissionError) or isinstance(error, OSError) and error.errno in (errno.EACCES, errno.EROFS):+ return 'not_writable'return 'failed'diff --git a/web/editor.js b/web/editor.jsindex a4807c8..464a7f7 100644--- a/web/editor.js+++ b/web/editor.js@@ -31,6 +31,8 @@ import {SHOWCASE_SCENE} from './entry_showcase.js';import {createEditorFailures} from './editor_failure.js';import {fitEditorHeader} from './editor_header_fit.js';import {optionalText} from './optional_inputs.js';+import {outputNotWritable} from './error_panel.js';+import {repairAction} from './repair_hint.js';import {expandCast} from './cast_mention.js';const editorStyles = Promise.all(['result_actions.css', 'editor.css', 'editor_expand.css', 'editor_tracks.css', 'editor_frame.css', 'editor_adjust.css', 'editor_adjust_picture.css', 'editor_preview_picture.css', 'editor_select.css', 'editor_menu.css', 'editor_text.css', 'editor_notes.css', 'editor_transport.css'].map(name => {const style = document.createElement('link'); style.rel = 'stylesheet'; style.href = new URL(name, import.meta.url).href;@@ -42,10 +44,12 @@ const language = () => new URLSearchParams(location.search).get('freevideo_lang'// Shared by error() and actions.reasonText: one sentence naming the failed step.export function editorErrorText(value, t = en => en) {if (isNetworkTypeError(value) || isNetworkTypeError(value?.detail)) return connectionLostText(t);- const oneLine = value => typeof value === 'string' ? value.trim().split(/[\r\n]+/).find(line => line.trim())?.trim() || '' : '';+ // The worker's own "FreeVideo generation failed (exit 1)" header names nothing the user can act on.+ const oneLine = value => typeof value === 'string' ? value.trim().split(/[\r\n]+/).find(line => line.trim() && !/^\s*FreeVideo generation failed(?: \(exit -?\d+\))?\s*$/.test(line))?.trim() || '' : '';const detail = value?.detail || (value?.error && typeof value.error === 'object' ? value.error : value);const raw = [detail?.response?.error?.message, detail?.response?.error, detail?.response?.message,detail?.exception_message, detail?.message, value?.error?.message, value?.error, value].map(oneLine).find(Boolean) || '';+ const whole = (() => { try { return JSON.stringify(value?.detail ?? value?.error ?? value ?? '').slice(0, 65536); } catch { return ''; } })();const code = value?.code || detail?.code || value?.reason || detail?.reason || raw;const node = oneLine(detail?.node_type), step = `${value?.phase || ''} ${value?.stage || ''} ${node}`;const part = Number.isInteger(value?.index) ? value.index + 1 : null;@@ -64,6 +68,10 @@ export function editorErrorText(value, t = en => en) {no_material: t('The media this part uses is missing. Import it again from the library.', '找不到这一段用到的素材,请在素材库重新导入。'),};if (known[code]) return known[code];+ if (outputNotWritable(whole))+ return t('The output folder cannot be written to, so the video was not saved. Check that the folder can be written to, then retry.', '输出目录不可写,视频没能保存。请检查这个文件夹的写入权限后重试。');+ if (/manifest\.json/i.test(whole) && /No such file|not found|Errno 2\b|FileNotFoundError/i.test(whole))+ return t('The model is not fully installed. ', '模型没有装全。') + t(...repairAction());if (['model_missing', 'missing_model', 'model_not_found'].includes(code) || /(?:model|checkpoint|模型).*(?:not found|missing|不存在|缺失)/i.test(raw))return t(`Loading the model failed: ${raw || code}`, `加载模型时出错:${raw || code}`);if (['timeout', 'timed_out', 'generation_timeout'].includes(code) || /timed?\s*out|timeout|超时/i.test(raw))@@ -1068,7 +1076,8 @@ export function openEditor({api, app, from = null, panel = {}, components: givenif (!running) {if (value.state === 'failed') {if (['source_missing', 'missing_glyphs', 'MissingGlyphs'].includes(value.reason || value.code)) error(value);- else notify(value.reason === 'disk_full' ? t('Export failed: the disk is full. Free some space, then export again.', '导出时出错:磁盘空间不够,空出空间后再导出。')+ else notify(value.reason === 'not_writable' ? t('Export failed: the output folder cannot be written to. Check that the folder can be written to, then retry.', '导出时出错:输出目录不可写。请检查这个文件夹的写入权限后重试。')+ : value.reason === 'disk_full' ? t('Export failed: the disk is full. Free some space, then export again.', '导出时出错:磁盘空间不够,空出空间后再导出。'): value.reason === 'unreadable' ? t('Export failed: a source file cannot be read. Import it again from the library.', '导出时出错:有素材读不出来,请在素材库重新导入。'): t('Export failed. Try again.', '导出时出错,请再试一次。'));}diff --git a/web/editor_genbar.js b/web/editor_genbar.jsindex b8aac86..2642e18 100644--- a/web/editor_genbar.js+++ b/web/editor_genbar.js@@ -94,8 +94,7 @@ export function createEditorGenbar(host, {state, t, actions, text = ''}) {}failure.hidden = !selectedFailure;failureReason.textContent = selectedFailure?.text || '';- // Only a press that never became a part has no part to carry the report button.- report.hidden = selectedFailure?.id !== 'submission';+ report.hidden = !selectedFailure;const running = ['queued', 'running', 'cancelling'].includes(status?.state);const selected = !!selection && (!!previewSelection || (actions.supportedSelection?.() ?? true));// While a part generates, choosing another place offers Generate again; it is queued behind.diff --git a/web/editor_tracks.css b/web/editor_tracks.cssindex 7cb6be9..335b7f1 100644--- a/web/editor_tracks.css+++ b/web/editor_tracks.css@@ -72,7 +72,7 @@.fv-ed-track-zoom .fv-ed-fit{padding:0 7px;white-space:nowrap;font-size:12px;margin-left:4px}.fv-ed-drag-label{position:absolute;z-index:9;padding:4px 7px;background:var(--fv-card);color:var(--fv-ink);border:1px solid var(--fv-border);border-radius:6px;font-size:12px;white-space:pre;line-height:1.5;pointer-events:none}.fv-ed-clip-popover{position:absolute;z-index:10;width:280px;max-width:calc(100% - 16px);padding:10px;border:1px solid var(--fv-border);border-radius:8px;background:var(--fv-card)}-.fv-ed-clip-popover p{margin:0 0 8px;font-size:13px}+.fv-ed-clip-popover p{margin:0 0 8px;font-size:13px;overflow-wrap:anywhere}.fv-ed-clip-popover button{min-height:32px;padding:4px 10px;border:1px solid var(--fv-border);border-radius:8px;background:var(--fv-raised);cursor:pointer}.fv-ed-clip-popover button+button{margin-left:6px}.fv-ed-clip-popover{max-height:calc(100% - 16px);overflow:auto}diff --git a/web/error_panel.js b/web/error_panel.jsindex 0aeb80e..2853ffd 100644--- a/web/error_panel.js+++ b/web/error_panel.js@@ -1,4 +1,5 @@// Shared by the Studio and graph view. Text only; never render exception HTML.+import {repairAction} from './repair_hint.js';import {detectBrowserExtension, browserExtensionAdvice, extensionSteps, isNetworkTypeError, connectionLostText} from './browser_extension.js';import {SAMPLING_EFFORTS, STEP_CACHES, UPSCALE_FACTORS, tableLevel} from './sampling_effort.js';import {failureIssue, failureStage} from './failure_issue.js';@@ -105,6 +106,13 @@ const EXPORT_TO_DOWNLOAD = [['仍然失败时,请导出报告。', DOWNLOAD_ADVICE[1]],];+// A permission error counts as the output folder's only when the path it names is not a model or cache file.+export function outputNotWritable(text) {+ const value = String(text).slice(0, 65536);+ return /PermissionError|Permission denied|Read-only file system|\[Errno (?:13|30)\]/i.test(value)+ && !/models?[\\/]|cache|\.(?:safetensors|gguf|bin|pt)\b|manifest\.json/i.test(value);+}+export function errorText(detail) {if (typeof detail === 'string') return detail;if (reports.has(detail)) return detail.details;@@ -362,6 +370,14 @@ export function failureAdvice(value, t, known = knownError(value)) {return row('ram', ['Memory is low or its limit was reached', '内存不足或已达到上限'],['Generation stopped because memory was low or its configured limit was reached.', '内存不足或已达到设置的上限,生成已停止。'],['Close memory-heavy applications and retry. If you set a memory limit, remove or raise it. Copy the details below if it still fails.', '关闭占用内存较多的程序后重试;设置过内存上限的,请取消或调高。仍然失败时,可复制下方详情。']);+ if (outputNotWritable(text))+ return row('output-folder', ['The output folder cannot be written to', '输出目录不可写'],+ ['The video could not be saved.', '视频没能保存。'],+ ['Check that the output folder can be written to, then retry.', '请检查输出文件夹的写入权限后重试。']);+ if (/manifest\.json/i.test(text) && /No such file|FileNotFoundError|\[Errno 2\]/i.test(text))+ return row('model-files', ['The model is not fully installed', '模型没有装全'],+ ['Some of the model files FreeVideo needs are missing.', 'FreeVideo 需要的部分模型文件缺失。'],+ repairAction());if (/No space left on device|WinError 112|disk (?:is )?full/i.test(text))return row('disk', ['Disk space is insufficient', '磁盘空间不足'],['FreeVideo could not write a required file.', 'FreeVideo 无法写入所需文件。'],diff --git a/web/health.js b/web/health.jsindex 8b349f0..edc172b 100644--- a/web/health.js+++ b/web/health.js@@ -16,7 +16,7 @@ const launchVisit = query.get('freevideo') === 'launch';export const MODULES = ['agent_activity.js', 'agent_connect.js', 'agent_session.js', 'autopilot.js', 'autopilot_chat.js', 'autopilot_conversations.js', 'browser_extension.js', 'caret_rect.js', 'chain_support.js', 'capability_view.js', 'cast_generate.js', 'cast_mention.js', 'cast_overlay.js', 'cast_source.js', 'compatibility.js', 'entry_showcase.js', 'error_panel.js', 'first_run_guide.js', 'fonts.js', 'freevideo.js', 'generation_progress.js','editor.js', 'editor_actions.js', 'editor_adjust.js', 'editor_adjust_picture.js', 'editor_picture_fields.js', 'editor_picture_session.js', 'editor_preview_picture.js', 'editor_entry.js', 'editor_expand.js', 'editor_export_dialog.js', 'editor_first_frame.js', 'editor_media_references.js', 'editor_references.js', 'editor_genbar.js', 'editor_geometry.js', 'editor_library.js', 'editor_menu.js', 'editor_model.js', 'editor_frame.js', 'editor_player.js', 'editor_room.js', 'editor_select.js', 'editor_state.js', 'editor_store.js', 'editor_tracks.js', 'editor_generation.js', 'editor_transport.js', 'editor_transport_model.js', 'editor_audio.js', 'editor_audio_model.js', 'editor_audio_notes.js', 'editor_audio_replace.js', 'editor_audio_rules.js', 'editor_speed.js', 'editor_speed_model.js', 'editor_failure.js', 'editor_header_fit.js','editor_loader.js', 'editor_text_coverage.js', 'editor_text.js', 'editor_toolbar_more.js', 'editor_text_model.js', 'editor_text_layout.js', 'editor_notes.js', 'editor_icons.js', 'dialog_keys.js', 'done_notify.js', 'failure_issue.js', 'feedback.js', 'frame_sizes.js', 'health.js', 'image_commands.js', 'image_editor.js', 'image_editor_engine.js', 'image_generation.js', 'launch_visit.js', 'launcher.js', 'length_plan.js', 'lora_triggers.js', 'lora_check.js', 'library.js', 'motion.js', 'native_errors.js', 'output_download.js', 'port_notice.js', 'preview_scene.js',- 'progress_connection.js', 'prompt_draft.js', 'prompt_enhance.js', 'prompt_references.js', 'prompt_terms.js', 'request_assets.js', 'report_issue.js', 'studio_recent.js',+ 'progress_connection.js', 'prompt_draft.js', 'prompt_enhance.js', 'prompt_references.js', 'prompt_terms.js', 'request_assets.js', 'repair_hint.js', 'report_issue.js', 'studio_recent.js','result_actions.js', 'sampling_effort.js', 'setup.js', 'share.js', 'share_layout.js', 'studio.js', 'studio_chain.js', 'studio_extend.js', 'studio_length.js', 'first_frame_row.js', 'optional_inputs.js', 'studio_queue.js', 'studio_size.js','toolbar_position.js', 'updates.js', 'view_navigation.js', 'wordmark.js', 'workspace_restore.js', 'cast_library.js', 'media_upload.js', 'whitebox_encode.js', 'whitebox_mp4.js', 'whitebox_recording.js', 'whitebox_render.js', 'whitebox_scenes.js', 'whitebox_worker.js'];const sleep = ms => new Promise(resolve => setTimeout(resolve, ms));diff --git a/web/repair_hint.js b/web/repair_hint.jsnew file mode 100644index 0000000..4952178--- /dev/null+++ b/web/repair_hint.js@@ -0,0 +1,9 @@+// Where to repair a damaged install depends on whether the launcher started this page.+// U+2060 keeps "环境" and "安装/修复" from breaking across lines in narrow dialogs.+let launcher = false;++export const setLauncherPresent = present => { launcher = Boolean(present); };++export const repairAction = () => launcher+ ? ['Select "Repair" in the launcher under Settings > Environment, then retry.', '可在启动器“设置 → 环境”里点“修复”后重试。']+ : ['Select "Install / repair" in the page settings, then retry.', '可在页面设置中点“安装/修复”后重试。'];diff --git a/web/updates.js b/web/updates.jsindex 93eae18..84d55cf 100644--- a/web/updates.js+++ b/web/updates.js@@ -1,4 +1,5 @@import { api } from '../../scripts/api.js';+import { setLauncherPresent } from './repair_hint.js';// Every platform downloads from one release: the latest vX.Y.Z.const releasePage = 'https://github.com/FlashML-org/FreeVideo/releases/latest';@@ -51,6 +52,7 @@ export async function checkUpdates() {return;}value = next; offline = false;+ setLauncherPresent(next.launcher);const phase = next.launcher?.phase || '';// Switching to a faster model also restarts ComfyUI once.if (working.has(phase) || next.launcher?.model) updating = true;