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.

Unmatched launcher failures give a next step, and path, installer memory and report-form details...

Bowen Xue1e5e68bb73ca
diff --git a/freevideo_engine/bootstrap.py b/freevideo_engine/bootstrap.py
index 478977c..a4e3139 100644
--- a/freevideo_engine/bootstrap.py
+++ b/freevideo_engine/bootstrap.py
@@ -140,8 +140,14 @@ def setup_memory_failure(pressure):
detail = 'Installation paused: system RAM is nearly exhausted (%.2f GiB available; %.2f GiB minimum).' % (
pressure['available_bytes'] / GiB, pressure['emergency_floor_bytes'] / GiB)
else:
- detail = 'Installation crossed its RAM budget (%.2f GiB used; %.2f GiB budget; %s).' % (
- pressure['working_bytes'] / GiB, pressure['budget_bytes'] / GiB, pressure['guard_metric'])
+ # The budget is the memory free at planning minus the reserve, and setup itself
+ # peaked near 1 GiB; so the free memory needed is the reserve plus that, rounded up to
+ # the next half GiB above it, which leaves some room.
+ needed = (pressure.get('planning_reserve_bytes') or 0) + max(pressure['working_bytes'], GiB)
+ detail = ('Installation crossed its RAM budget (%.2f GiB used; %.2f GiB budget; %s). '
+ 'At least %.1f GiB of RAM must be free when it starts.') % (
+ pressure['working_bytes'] / GiB, pressure['budget_bytes'] / GiB, pressure['guard_metric'],
+ (needed * 2 // GiB + 1) / 2)
return detail + ' Downloaded files are retained.'
diff --git a/freevideo_engine/comfy_launcher.py b/freevideo_engine/comfy_launcher.py
index d3111c3..439615b 100644
--- a/freevideo_engine/comfy_launcher.py
+++ b/freevideo_engine/comfy_launcher.py
@@ -694,9 +694,10 @@ class Launcher:
def report_error(self):
if self.error_text:
- from .launcher_issue import issue_url
+ from .launcher_issue import environment_line, issue_url, product_version
from .windows_ux import open_browser
- open_browser(issue_url(self.error_text, __version__, None, zh=self.zh))
+ version = product_version(__version__)
+ open_browser(issue_url(self.error_text, version, None, zh=self.zh, environment=environment_line(version)))
def show_details(self):
dialog = self.tk.Toplevel(self.window); dialog.title(self.t('FreeVideo · Details', 'FreeVideo · 详情'))
diff --git a/freevideo_engine/failure_details.py b/freevideo_engine/failure_details.py
index faa352a..3de1fb8 100644
--- a/freevideo_engine/failure_details.py
+++ b/freevideo_engine/failure_details.py
@@ -567,6 +567,10 @@ def launcher_failure(value, *, zh=False, other_disk=False, disk_name='', can_rep
('A video is still generating', '还有视频正在生成'),
('The update is installed. Click Connect again after the job finishes to restart ComfyUI with it.',
'更新已装好。等当前任务完成后点“重新连接”,ComfyUI 会重启并使用新版。')),
+ (r'WinError 206|The filename or extension is too long', 'path-too-long',
+ ("The installation folder's path is too long", '安装文件夹的路径太长'),
+ ('Install FreeVideo in a folder with a shorter path, such as D:\\FreeVideo, then click "Retry installation".',
+ '请把 FreeVideo 安装到路径较短的文件夹,例如 D:\\FreeVideo,然后点击“重试安装”。')),
(r'Installation paused: Windows commit headroom', 'memory-commit',
('Windows is low on available memory', 'Windows 可用内存不足'),
('Close memory-heavy applications, then retry. Downloaded files are retained.',
@@ -618,6 +622,18 @@ def launcher_failure(value, *, zh=False, other_disk=False, disk_name='', can_rep
('Memory is unavailable for this step', '这一步可用内存不足'),
('Close other memory-heavy applications and retry. Copy the details if it continues.', '关闭占用内存较多的程序后重试;仍失败时可复制详情反馈。')),
)
+ if re.search(r'Installation crossed its RAM budget', text):
+ # Only the installer's memory monitor says this. The sentence carries the amount; an
+ # older retained error does not, and then the card names none.
+ free = re.search(r'At least ([\d.]+) GiB of RAM must be free', text)
+ if free:
+ action = ('Close other applications until at least %s GiB of RAM is free, then click "Retry installation". Downloaded files are retained.' % free.group(1),
+ '请关闭其他程序,直到至少有 %s GiB 内存空闲,然后点击“重试安装”。已下载的文件会保留。' % free.group(1))
+ else:
+ action = ('Close other applications to free memory, then click "Retry installation". Downloaded files are retained.',
+ '请关闭其他程序以空出内存,然后点击“重试安装”。已下载的文件会保留。')
+ return dict(title=('There is not enough free memory to continue installing', '可用内存不足,无法继续安装')[zh],
+ detail='', action=action[zh], kind='memory-budget')
for pattern, kind, title, action in rules:
if re.search(pattern, text, re.I):
if kind in WITHOUT_REPAIR and not can_repair:
@@ -631,8 +647,38 @@ def launcher_failure(value, *, zh=False, other_disk=False, disk_name='', can_rep
if not line.startswith(('File ', 'Traceback', '^', 'All files retained.', 'Rerun the same setup command'))), '')
detail = re.sub(r'^(?:ValueError|RuntimeError|OSError):\s*', '', detail)
from .launcher_copy import lan_error
- return dict(title='暂时未能完成' if zh else 'Couldn’t complete this step',
- detail=lan_error(detail, zh), action='', kind='unknown')
+ title = '暂时未能完成' if zh else 'Couldn’t complete this step'
+ # The cause line is the last error line, which a traceback or pip's "ERROR:" can displace; the
+ # failed step's own line is found anywhere in the text.
+ step = re.search(r'^Failed step: ([\w.-]+) \(exit code (-?\w+)\)', text, re.M)
+ if step:
+ # The internal step id never reaches the card; the exit code stays as the detail.
+ name = _step_name(step.group(1), zh)
+ if name:
+ title = ('“%s”这一步没有完成' if zh else 'The step "%s" did not finish') % name
+ detail = ('退出码 %s' if zh else 'Exit code %s') % step.group(2)
+ # A message the launcher raised itself (a ValueError) is the next step already.
+ unexpected = 'Traceback' in text and not re.match(r'(?:[\w.]+\.)?ValueError:', causes[-1] if causes else '')
+ detail = lan_error(detail, zh)
+ if step or unexpected:
+ # The launcher's failure card shows the action only when there is no detail, so the next
+ # step goes under the detail rather than being hidden by it.
+ return dict(title=title, detail=(detail + '\n' if detail else '') + UNKNOWN_NEXT_STEP[zh], action='', kind='unknown')
+ return dict(title=title, detail=detail, action='', kind='unknown')
+
+
+UNKNOWN_NEXT_STEP = ('Try again. If it fails again, export the report, then use "Report a problem" and attach it.',
+ '请重试。仍然失败时,请先导出报告,再点“提交问题”并附上报告。')
+
+
+def _step_name(label, zh):
+ """The name the progress card showed for a setup step, in the interface language, or ''."""
+ try:
+ from .bootstrap import setup_task
+ from .launcher_copy import display
+ return display(setup_task(label)[0], zh)
+ except Exception:
+ return ''
def _read(path, limit, *, tail=False):
diff --git a/freevideo_engine/launcher_issue.py b/freevideo_engine/launcher_issue.py
index f0e393e..222f7f7 100644
--- a/freevideo_engine/launcher_issue.py
+++ b/freevideo_engine/launcher_issue.py
@@ -18,15 +18,55 @@ def _lines(error):
return [line for line in scrub(error).splitlines() if line.strip()]
-def issue_url(error, version=None, title=None, zh=False):
+def product_version(fallback=None):
+ """The 0.4.x release of this launcher; the fallback (the build number) only when no release says."""
+ try:
+ from pathlib import Path
+ from .release_notes import installed_details
+ return installed_details(Path(__file__).parent, fallback).get('product_version') or fallback
+ except Exception:
+ return fallback
+
+
+def machine_hardware(engine):
+ """The hardware record of the installation at engine (machine.json), or {} when it is not readable."""
+ try:
+ import json
+ from pathlib import Path
+ from .long_paths import io_path
+ hardware = json.loads(io_path(Path(engine) / 'machine.json').read_text(encoding='utf-8'))['hardware']
+ return hardware if isinstance(hardware, dict) else {}
+ except Exception:
+ return {}
+
+
+def environment_line(version=None, hardware=None):
+ """One line about this computer: release, system, GPU, driver and memory. No paths, user names or build numbers."""
+ hardware = hardware if isinstance(hardware, dict) else {}
+
+ def gib(key):
+ value = hardware.get(key)
+ return '%.1f GiB' % (value / 2**30) if type(value) is int and value > 0 else ''
+
+ gpu = ', '.join(part for part in (str(hardware.get('gpu_name') or ''), gib('vram_total') + ' VRAM' if gib('vram_total') else '') if part)
+ parts = ['FreeVideo ' + str(version).lstrip('v') if version else '', str(hardware.get('system') or ''), gpu,
+ 'driver ' + str(hardware['driver_version']) if hardware.get('driver_version') else '',
+ gib('ram_total') + ' RAM' if gib('ram_total') else '']
+ return scrub(' · '.join(part for part in parts if part))[:300]
+
+
+def issue_url(error, version=None, title=None, zh=False, environment=''):
lines = _lines(error)
first = (lines[-1] if lines and lines[0].startswith('Traceback') else (lines[0] if lines else '')).strip()
place = '启动器' if zh else 'Launcher'
problem = ('FreeVideo 启动器显示了一个错误。\n' if zh else 'The FreeVideo launcher showed an error.\n') + first[:300]
report = '\n'.join(lines)
+ # The environment line is for triage, so it stays English in either language and is kept whole;
+ # only the error text gives way to fit the address.
+ head = (('Environment: ' + scrub(environment).strip() + '\n\n') if str(environment).strip() else '')
def fit(limit):
- return report if len(report) <= limit else report[:limit // 3] + '\n...\n' + report[-(limit - limit // 3 - 5):]
+ return head + (report if len(report) <= limit else report[:limit // 3] + '\n...\n' + report[-(limit - limit // 3 - 5):])
def build(body):
params = {'template': 'bug_launcher.yml', 'title': f'[{place}] ' + (str(title).strip() if title else place),
diff --git a/freevideo_engine/modern_launcher.py b/freevideo_engine/modern_launcher.py
index 744bf27..14ce0bd 100644
--- a/freevideo_engine/modern_launcher.py
+++ b/freevideo_engine/modern_launcher.py
@@ -294,10 +294,13 @@ def create_ui(session, *, show=True):
@Slot(str, str)
def reportProblem(self, error, title):
from . import __version__
- from .launcher_issue import issue_url
+ from .launcher_issue import environment_line, issue_url, machine_hardware, product_version
from .windows_ux import open_browser
- url = issue_url(error, session.installed_product_version() or __version__, title,
- zh=session.language.startswith('zh'))
+ # The release (0.4.x) is named, not the build number; only fields that carry no path or user name travel.
+ version = session.installed_product_version() or product_version(__version__)
+ engine = session.installation_engine()
+ url = issue_url(error, version, title, zh=session.language.startswith('zh'),
+ environment=environment_line(version, machine_hardware(engine) if engine else {}))
self.invoke(open_browser, url)
@Slot()