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.

Rewrite settings wording: shorter causes, next steps name the button

Bowen Xue293ba7a416b0
diff --git a/freevideo_engine/download_settings.py b/freevideo_engine/download_settings.py
index 4afc98f..2340294 100644
--- a/freevideo_engine/download_settings.py
+++ b/freevideo_engine/download_settings.py
@@ -10,6 +10,8 @@ from .long_paths import io_path, plain
from .proxy import MODES
CHOICES = ('auto', 'official', 'hf-mirror', 'modelscope')
+# Shown as is by the Tk window and mapped to Chinese by the setup page.
+SPEED_TEST_FAILED = 'The speed test did not finish. Click "Test source speeds".'
FAMILIES = ('edge-models', 'vdn-models', 'models', 'image-models')
@@ -19,7 +21,7 @@ def speed_text(row, zh=False):
rate = row.get('bytes_per_second')
if (row.get('speed_measured') is False or not isinstance(rate, (int, float))
or not math.isfinite(rate) or rate <= 0):
- return '已连通,样本不足' if zh else 'Connected; insufficient sample'
+ return '已连通,速度还没测出' if zh else 'Connected; speed not measured yet'
speed = rate / 2**20
return '<0.01 MiB/s' if speed < .005 else (('%.2f' if speed < 1 else '%.1f') % speed + ' MiB/s')
@@ -134,7 +136,7 @@ class Probe:
with self.lock:
# Provider exceptions can contain request headers/URLs.
self.state=dict(status='failed',root=str(root),
- error='Source speed test failed (' + type(error).__name__ + '). Retry the speed test.')
+ error=SPEED_TEST_FAILED)
self.thread=threading.Thread(target=work,daemon=True)
self.thread.start()
return dict(self.state)
diff --git a/freevideo_engine/download_settings_ui.py b/freevideo_engine/download_settings_ui.py
index bcdb94a..2424b6b 100644
--- a/freevideo_engine/download_settings_ui.py
+++ b/freevideo_engine/download_settings_ui.py
@@ -1,7 +1,7 @@
"""Native download controls, usable before ComfyUI or the engine is installed."""
from pathlib import Path
-from .download_settings import CHOICES, MODES, Probe, read, speed_text
+from .download_settings import CHOICES, MODES, SPEED_TEST_FAILED, Probe, read, speed_text
class DownloadSettings:
@@ -55,8 +55,8 @@ class DownloadSettings:
self.speeds.heading(key, text=self.t(en, cn)); self.speeds.column(key, width=width, minwidth=80)
self.speeds.pack(fill='both', expand=True)
ttk.Label(body, text=self.t(
- 'Switch applies to the current download. Compatible fragments resume; otherwise this file restarts, keeping old fragments on disk. Testing speeds does not switch sources.',
- '切换立即作用于当前下载。兼容断点会续传;不兼容时当前文件重新下载,旧片段保留。仅测速不会切换。'),
+ 'Switching takes effect at once. Downloads resume where possible; otherwise the file restarts. Testing speeds does not switch.',
+ '切换后马上生效,能续传的接着下载,不能的重新下载这个文件。只测速不会切换。'),
wraplength=560, style='Muted.TLabel').pack(fill='x', pady=(12, 4))
ttk.Label(body, text=str(self.root), wraplength=560, style='Muted.TLabel').pack(fill='x')
ttk.Button(body, text=self.t('Done', '完成'), command=window.destroy).pack(anchor='e', pady=(8, 0))
@@ -120,7 +120,8 @@ class DownloadSettings:
self.status.set(self.t('Testing sources… ', '正在测速… ') +
('%s/%s · %s' % (progress.get('done', 0), progress.get('total', '?'), progress.get('source', ''))))
elif state.get('error'):
- self.status.set(state['error'])
+ self.status.set(self.t(SPEED_TEST_FAILED, '测速没有完成,请点“重新测速”。')
+ if state['error'] == SPEED_TEST_FAILED else state['error'])
elif state.get('network_unavailable'):
self.status.set(self.t('No sources reachable. Check your network or connection mode.', '下载源均无法连接,请检查网络或切换连接模式。'))
measured = value.get('probe')
@@ -135,11 +136,11 @@ class DownloadSettings:
families[family] = self.t('GPU packages', 'GPU 依赖')
for row in rows:
speed = speed_text(row, self.zh)
- route = self.t('direct', '直连') if row.get('route') == 'direct' else self.t('current connection', '当前连接')
+ route = self.t('Direct', '直连') if row.get('route') == 'direct' else self.t('Current connection', '当前连接')
self.speeds.insert('', 'end', values=(families.get(family, family), row['id'] + ' · ' + route, speed))
if measured and not busy and not state.get('network_unavailable'):
- self.status.set(self.t('HTTP transfer measured without connection wait. Parallel/Xet downloads may differ. Choose a source above to switch.',
- '测速已扣除连接等待;多线程/Xet 下载速度可能不同。在上方选择下载源即可切换。'))
+ self.status.set(self.t('Speeds are a guide. Choose a source above to switch.',
+ '测速只作参考。在上方选择下载源来切换。'))
def poll(self):
try:
diff --git a/freevideo_engine/model_repair.py b/freevideo_engine/model_repair.py
index a78b7ec..8e3ef9f 100644
--- a/freevideo_engine/model_repair.py
+++ b/freevideo_engine/model_repair.py
@@ -54,19 +54,17 @@ CHANGED = 'The installation plan changed. Detect configuration again and review
# A file the review listed changed before setup reached it (the confirmed plan
# can also differ in other ways: bootstrap.confirmed raises plain CHANGED).
FILE_CHANGED = 'A file in the installation folder changed after the review. ' + CHANGED
-CHANGED_TITLE = ('The installation plan changed', '安装计划有变化')
+CHANGED_TITLE = ('Installation stopped', '安装已停止')
CHANGED_WHY = dict(
- files=('Files in the installation folder changed after you confirmed the plan, so FreeVideo stopped instead of '
- 'continuing with it.', '确认计划之后,安装位置里的文件又有变化,FreeVideo 因此停止,未按原计划继续。'),
- other=('Something changed after you confirmed the plan (for example the settings, the GPU or the free disk '
- 'space), so FreeVideo stopped instead of continuing with it.',
- '确认计划之后,设置、显卡或可用磁盘空间发生了变化,FreeVideo 因此停止,未按原计划继续。'),
+ files=('Files in the installation folder changed after you confirmed.', '确认之后安装位置里的文件有变化。'),
+ other=('The settings, GPU or free disk space changed after you confirmed.',
+ '确认之后设置、显卡或磁盘空间有变化。'),
)
-CHANGED_REPAIR = ('Click Repair again to review the new plan.', '请再次点击“修复”,查看新的计划。')
+CHANGED_REPAIR = ('Click Repair again.', '请再点一次“修复”。')
CHANGED_WAYS = dict(
- busy=('When the current task ends, a Repair button appears here; click it to review the new plan.',
- '当前任务结束后,这里会出现“修复”按钮;点击后可以查看新的计划。'),
- none=('Click Retry installation below to review the new plan.', '请点击下方的“重试安装”,查看新的计划。'),
+ busy=('A Repair button appears here when the current task ends. Click it.',
+ '当前任务结束后,这里会出现“修复”按钮,请点它。'),
+ none=('Click Retry installation below.', '请点下方的“重试安装”。'),
)
IDENTITY = ('bytes', 'mtime_ns', 'st_dev', 'st_ino', 'parent_realpath')
diff --git a/web/browser_extension.js b/web/browser_extension.js
index dddba37..7059a23 100644
--- a/web/browser_extension.js
+++ b/web/browser_extension.js
@@ -121,12 +121,12 @@ export function detectBrowserExtension(error, {kind = 'unknown', known = null, b
export const EXTENSION_COPY = Object.freeze({
title: ['A browser extension is interfering with FreeVideo', '浏览器扩展干扰了 FreeVideo'],
// English uses straight quotes: curly ones widen in the CJK font stack.
- both: ['The user script "{script}" in the browser extension "{extension}" interfered with this page, so FreeVideo could not complete this action.',
- '浏览器扩展“{extension}”中的用户脚本“{script}”干扰了这个页面,FreeVideo 未能完成这次操作。'],
- extension: ['The browser extension "{extension}" interfered with this page, so FreeVideo could not complete this action.',
- '浏览器扩展“{extension}”干扰了这个页面,FreeVideo 未能完成这次操作。'],
- unknown: ['An extension in this browser interfered with this page, so FreeVideo could not complete this action.',
- '浏览器里的某个扩展干扰了这个页面,FreeVideo 未能完成这次操作。'],
+ both: ['The script "{script}" in the browser extension "{extension}" interfered with this page, so this action did not finish.',
+ '浏览器扩展“{extension}”里的脚本“{script}”干扰了页面,这次操作没有完成。'],
+ extension: ['The browser extension "{extension}" interfered with this page, so this action did not finish.',
+ '浏览器扩展“{extension}”干扰了页面,这次操作没有完成。'],
+ unknown: ['A browser extension interfered with this page, so this action did not finish.',
+ '浏览器里的某个扩展干扰了页面,这次操作没有完成。'],
// The browser says a client blocked the file: an ad-blocking extension, though not which one.
blocked: ['An ad-blocking extension in this browser, such as uBlock Origin, AdGuard or Adblock Plus, blocked one of FreeVideo\'s page files, so the page cannot work properly.',
'浏览器里的广告拦截类扩展(例如 uBlock Origin、AdGuard、Adblock Plus)拦下了 FreeVideo 的页面文件,页面无法正常运行。'],
diff --git a/web/setup.js b/web/setup.js
index 1bc20e3..e04988d 100644
--- a/web/setup.js
+++ b/web/setup.js
@@ -15,20 +15,22 @@ const cn = languageOverride === 'zh' || (languageOverride !== 'en'
const t = (en, zh) => cn ? zh : en;
const INSTALLED_HINT = {en: 'Already installed. To reinstall, click Detect & review first.', zh: '已装好。要重装,请先点“检测并预览”。'};
const gib = n => Number.isFinite(n) ? (n / 2 ** 30).toFixed(1) + " GiB" : "—";
+const SPEED_TEST_FAILED = 'The speed test did not finish. Click "Test source speeds".';
const failureText = value => {
const text = String(value || ''), matches = [...text.matchAll(/MODEL_MISMATCH_REPAIR: ([^\r\n]+)/g)];
if (!matches.length && text.includes('The installation plan changed. Detect configuration again')) {
const files = text.includes('A file in the installation folder changed after the review');
return files
- ? t('The installation plan changed: files in the installation folder changed after you confirmed the plan, so FreeVideo stopped instead of continuing with it. Click Detect & review, then Install / repair to review the new plan.',
- '安装计划有变化:确认计划之后,安装位置里的文件又有变化,FreeVideo 因此停止,未按原计划继续。请先点击“检测并预览”,再点击“安装/修复”,查看新的计划。')
- : t('The installation plan changed: something changed after you confirmed the plan (for example the settings, the GPU or the free disk space), so FreeVideo stopped instead of continuing with it. Click Detect & review, then Install / repair to review the new plan.',
- '安装计划有变化:确认计划之后,设置、显卡或可用磁盘空间发生了变化,FreeVideo 因此停止,未按原计划继续。请先点击“检测并预览”,再点击“安装/修复”,查看新的计划。');
+ ? t('Files in the installation folder changed after you confirmed, so installation stopped. Click Detect & review, then Install / repair.',
+ '确认之后安装位置里的文件有变化,已停止。请先点“检测并预览”,再点“安装/修复”。')
+ : t('The settings, GPU or free disk space changed after you confirmed, so installation stopped. Click Detect & review, then Install / repair.',
+ '确认之后设置、显卡或磁盘空间有变化,已停止。请先点“检测并预览”,再点“安装/修复”。');
}
+ if (text === SPEED_TEST_FAILED) return t('The speed test did not finish. Click "Test source speeds".', '测速没有完成,请点“重新测速”。');
if (!matches.length) return text;
const file = matches.at(-1)[1];
- return t(`${file} differs from the version FreeVideo tests and was left unchanged. Click Detect & review, then Install / repair: the plan will list this file, and after you confirm, it is renamed and kept, and the tested version is downloaded.`,
- `${file} 与 FreeVideo 测试过的版本不同,这次没有改动它。请先点击“检测并预览”,再点击“安装/修复”:计划里会列出这个文件,确认后会把它改名保留,再下载测试过的版本。`);
+ return t(`${file} differs from the tested version and was left unchanged. Click Detect & review, then Install / repair. After you confirm, the original is renamed and kept, and the tested version is downloaded.`,
+ `${file} 和测试过的版本不同,这次没有改动。请先点“检测并预览”,再点“安装/修复”,确认后原文件改名保留,再下载测试过的版本。`);
};
let current;
@@ -106,7 +108,7 @@ export async function openSetup() {
reserve.value = '1.0'; reserve.disabled = true; reserve.className = 'fv-number';
reserveLabel.append(reserve, document.createTextNode('GiB'));
const saveReserve = node('button', t('Save', '保存')), reserveStatus = note('');
- const reserveHelp = note(t('Keep this much additional VRAM free. Applies to new requests; current usage is already accounted for.', '额外保留的空闲显存。对后续请求生效;其他程序当前的占用已单独计入。'));
+ const reserveHelp = note(t('Extra VRAM to keep free. Applies from the next generation.', '额外保留的空闲显存,下次生成起生效。'));
resources.append(autoLabel, reserveLabel, reserveHelp, saveReserve, reserveStatus);
advanced.append(resources);
const clearReserveStatus = () => { reserveStatus.textContent = ''; reserveStatus.className = 'fv-muted'; };
@@ -127,8 +129,8 @@ export async function openSetup() {
const calibrateButton = node('button', t('Run placement test', '运行放置测试'));
const calibrateStatus = note('');
calibration.append(repeatsLabel, note(t(
- 'Measures the placement choices this machine can settle and writes a report. It does not change your settings. The card stays busy for roughly half an hour per pass and generation cannot run meanwhile.',
- '测量本机能定下来的放置选择并生成报告,不会改动你的设置。每轮大约占用显卡半小时,期间无法生成。')),
+ 'Measures this computer and writes a report without changing settings. Each pass keeps the GPU busy for about half an hour, and generation cannot run meanwhile.',
+ '测量这台电脑并生成报告,不改动设置。每轮约占用显卡半小时,期间不能生成。')),
calibrateButton, calibrateStatus);
advanced.append(calibration);
const state = node("p"); state.setAttribute("role", "status");
@@ -184,8 +186,8 @@ export async function openSetup() {
reserve.disabled = reserveAuto.checked;
reserve.value = reserveAuto.checked ? (unified ? '2.0' : '1.0') : String(value[reserveField]);
reserveHelp.textContent = unified
- ? t('CPU and GPU share unified memory. Keep this much additional RAM available for macOS and other applications. Applies to new requests.', 'CPU 与 GPU 共用统一内存。额外保留这些 RAM 供 macOS 和其他程序使用,对后续请求生效。')
- : t('Keep this much additional VRAM free. Applies to new requests; current usage is already accounted for.', '额外保留的空闲显存。对后续请求生效;其他程序当前的占用已单独计入。');
+ ? t('Extra memory to keep for the system and other apps. Applies from the next generation.', '额外保留给系统和其他程序的内存,下次生成起生效。')
+ : t('Extra VRAM to keep free. Applies from the next generation.', '额外保留的空闲显存,下次生成起生效。');
};
calibrateButton.onclick = async () => {
if (!calibrateRepeats.checkValidity()) { calibrateRepeats.reportValidity(); return; }
@@ -246,16 +248,16 @@ export async function openSetup() {
if (family.startsWith('torch-')) names[family] = t('GPU packages','GPU 依赖');
const rate = row.bytes_per_second / 2**20;
const speed = !row.ok ? t('Unavailable','未连通') : row.speed_measured === false || !Number.isFinite(rate) || rate <= 0 ?
- t('Connected; insufficient sample','已连通,样本不足') : rate < .005 ? '<0.01 MiB/s' : `${rate.toFixed(rate < 1 ? 2 : 1)} MiB/s`;
- for (const text of [names[family] || family, `${row.id} · ${row.route === 'direct' ? t('direct','直连') : t('current connection','当前连接')}`,speed]) tr.append(node('td',text));
+ t('Connected; speed not measured yet','已连通,速度还没测出') : rate < .005 ? '<0.01 MiB/s' : `${rate.toFixed(rate < 1 ? 2 : 1)} MiB/s`;
+ for (const text of [names[family] || family, `${row.id} · ${row.route === 'direct' ? t('Direct','直连') : t('Current connection','当前连接')}`,speed]) tr.append(node('td',text));
if (!row.ok) tr.lastChild.className = 'fv-off';
table.append(tr);
}
- speeds.append(table,note(t('HTTP transfer speed, excluding connection wait. Parallel/Xet downloads may differ.','HTTP 传输测速已扣除连接等待;多线程/Xet 下载速度可能不同。')));
+ speeds.append(table,note(t('Speeds are a guide; actual downloads may differ.','测速只作参考,实际下载速度可能不同。')));
}
source.onchange = async () => {
source.disabled = true;
- try { showDownloads(await request('network-source',{root:root.value,source:source.value})); sourceStatus.textContent=t('Switch requested for active downloads; retained fragments will be reused where compatible.','已请求立即切换当前下载,兼容的断点和分片将继续复用。'); }
+ try { showDownloads(await request('network-source',{root:root.value,source:source.value})); sourceStatus.textContent=t('Switching sources; downloaded parts are kept where possible.','正在切换下载源,能续传的部分会保留。'); }
catch(error) { fail(error); }
finally { source.disabled = false; }
};
@@ -273,8 +275,8 @@ export async function openSetup() {
const controls = () => {
for (const e of [root, extra, copy, samplingCaches, saveFolders, inspect, use, hfToken, applyToken, clearToken]) e.disabled = busy;
cancel.hidden = !busy; install.disabled = busy || !planId || !accept.checked; accept.disabled = busy; inspect.classList.toggle("fv-primary", !planId); install.classList.toggle("fv-primary", Boolean(planId));
- const why = busy ? "" : planStale ? t("Settings changed. Click Detect & review again to update the plan.", "设置已更改,请重新点击“检测并预览”更新安装计划。")
- : planErrors ? t("The plan has problems shown in red above. Please resolve them, then click Detect & review again.", "安装计划中有标红的问题,请解决后重新点击“检测并预览”。")
+ const why = busy ? "" : planStale ? t("Settings changed. Click Detect & review again.", "设置已更改,请重新点“检测并预览”。")
+ : planErrors ? t("Fix the problems marked in red above, then click Detect & review again.", "上面有标红的问题,处理后请重新点“检测并预览”。")
: ready && !planId ? t(INSTALLED_HINT.en, INSTALLED_HINT.zh)
: !planId ? ""
: !accept.checked ? t("Tick the agreement above to enable Install / repair.", "勾选上方的同意选项后,即可点击“安装/修复”。") : "";
@@ -338,15 +340,15 @@ export async function openSetup() {
acceptLabel.hidden = busy || !planId;
const p = task.progress || {};
state.className = task.status === "failed" ? "fv-failure" : task.ready && !savedMissing ? "fv-ready" : "";
- state.textContent = failureText(task.error) || (task.ready ? t("Ready. Generate with your existing workflow.", "准备就绪,可使用现有工作流生成。") : busy ? p.label || t("Checking configuration and local models…", "正在检查配置和本地模型…") : task.status === "complete" && task.action === "plan" ? (planId ? t("Review the plan, then install.", "请确认计划后安装。") : "") : task.status === "cancelled" ? t("Stopped. Files retained for resuming.", "已停止,文件保留,可继续安装。") : "");
+ state.textContent = failureText(task.error) || (task.ready ? t("Ready to generate.", "准备就绪,可以开始生成。") : busy ? p.label || t("Checking configuration and local models…", "正在检查配置和本地模型…") : task.status === "complete" && task.action === "plan" ? (planId ? t("Review the plan, then install.", "请确认计划后安装。") : "") : task.status === "cancelled" ? t("Stopped. Files retained for resuming.", "已停止,文件保留,可继续安装。") : "");
const phases = task.phase_progress || {}, valid = Number.isFinite(p.total) && p.total > 0 && Number.isFinite(p.done) && p.done >= 0 && p.done <= p.total;
overall.hidden = !busy;
overallBar.max = phases.total > 0 ? phases.total : 1; overallBar.value = phases.done || 0;
- overallText.textContent = phases.total > 0 ? `${t("Overall", "整体进度")} · ${phases.done} / ${phases.total} ${t("stages complete", "阶段已完成")} · ${Math.floor(100 * phases.done / phases.total)}%` : t("Preparing installation plan…", "正在准备安装计划…");
+ overallText.textContent = phases.total > 0 ? `${t("Overall", "整体进度")} · ${phases.done} / ${phases.total} ${t("stages complete", "阶段已完成")} · ${Math.floor(100 * phases.done / phases.total)}%` : t("Preparing installation…", "正在准备安装…");
bar.hidden = !busy; bar.max = valid ? p.total : 1; bar.value = valid ? p.done : 0;
const amount = n => p.total >= 2 ** 30 ? gib(n) : `${(n / 2 ** 20).toFixed(1)} MiB`;
const count = valid ? `${Math.floor(100 * p.done / p.total)}% · ${p.unit === "bytes" ? `${amount(p.done)} / ${amount(p.total)}` : `${p.done} / ${p.total}`}` : t("Preparing…", "正在准备…");
- const eta = valid && Number.isFinite(p.remaining_seconds) && p.remaining_seconds > 0 ? `${p.unit === "bytes" ? t("File ETA", "本文件预计剩余") : t("ETA", "预计剩余")} ~${Math.ceil(p.remaining_seconds)} s` : valid ? t("Estimating remaining time…", "正在估算剩余时间…") : `${t("Elapsed", "已用时")} ${Math.floor((Date.now() - (waitSince || Date.now())) / 1000)} s`;
+ const eta = valid && Number.isFinite(p.remaining_seconds) && p.remaining_seconds > 0 ? `${p.unit === "bytes" ? t("File time left", "本文件预计剩余") : t("Time left", "预计剩余")} ~${Math.ceil(p.remaining_seconds)} s` : valid ? t("Estimating remaining time…", "正在估算剩余时间…") : `${t("Elapsed", "已用时")} ${Math.floor((Date.now() - (waitSince || Date.now())) / 1000)} s`;
counters.textContent = busy ? `${count} · ${eta}` : "";
const others = (task.active_tasks || []).slice(1).map(p => p.label).filter(Boolean);
const progressDetail = (p.detail || '').replace(/^Keeping the original file: /, t('Keeping the original file: ', '正在保留原文件:'));
@@ -394,7 +396,7 @@ export async function openSetup() {
catch (error) { fail(error); }
};
use.onclick = async () => {
- try { const result = await request("use", {root: root.value}); ready = Boolean(result.ready); state.textContent = result.ready ? t("Existing engine connected. Ready to generate.", "已连接现有引擎,可以生成。") : result.detail; state.className = "fv-ready"; invalidate(); }
+ try { const result = await request("use", {root: root.value}); ready = Boolean(result.ready); state.textContent = result.ready ? t("Existing installation connected. Ready to generate.", "已连接现有安装,可以生成。") : result.detail; state.className = "fv-ready"; invalidate(); }
catch (error) { fail(error); }
};
cancel.onclick = async () => { try { render(await request("cancel")); poll(); } catch (error) { fail(error); } };
diff --git a/web/updates.js b/web/updates.js
index 4daef65..93eae18 100644
--- a/web/updates.js
+++ b/web/updates.js
@@ -156,8 +156,8 @@ export function createUpdateNotice(cn) {
text = t(CANCEL_FAILURE.en, CANCEL_FAILURE.zh);
} else if (busy) {
text = model === 'switching' || (model && offline)
- ? t('Switching to the faster model… ComfyUI restarts once and this page reconnects by itself.', '正在切换到更快的模型…ComfyUI 会重启一次,页面会自动恢复。')
- : model === 'waiting' ? t('The faster model is ready. FreeVideo switches after the current video; ComfyUI restarts once.', '更快的模型已下载好,当前视频生成完后自动切换,ComfyUI 会重启一次。')
+ ? t('Switching to the faster model. This page reconnects by itself.', '正在切换到更快的模型,页面会自动恢复。')
+ : model === 'waiting' ? t('The faster model is ready. FreeVideo switches after the current video.', '更快的模型已下载好,当前视频完成后自动切换。')
: offline || phase === 'restarting' || phase === 'engine'
? t('Restarting FreeVideo to finish the update. The page refreshes by itself.', '正在重启 FreeVideo 完成更新,页面会自动刷新。')
: phase === 'downloading' ? t('Downloading the update', '正在下载更新') + percent