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.
Name the stage a failed video worker stopped in, not the last planning snapshot
Bowen Xue756f8fd8b745
diff --git a/freevideo_engine/failure_details.py b/freevideo_engine/failure_details.pyindex 920a1da..faa352a 100644--- a/freevideo_engine/failure_details.py+++ b/freevideo_engine/failure_details.py@@ -678,6 +678,20 @@ def _checkpoint_change(report):return ''+# Labels of the resource-planning snapshots (generate.py), never stages of the run.+SNAPSHOT_LABEL = re.compile(r'(?:before|after)-encoding|retry-\d+')+++def _attempt_phase(report):+ """The stage the last failed video attempt stopped in, or ''."""+ attempts = report.get('resource_attempts')+ for row in reversed(attempts) if isinstance(attempts, list) else ():+ phase = row.get('phase') if isinstance(row, dict) and row.get('failure') else None+ if isinstance(phase, str) and re.fullmatch(r'[a-z_]{1,32}', phase) and phase not in ('unknown', 'complete'):+ return phase+ return ''++# Stands in for the repair sentence until the report text is redacted: the# redactor reads "Install / repair" as a path.REPAIR_MARK = 'FREEVIDEO_REPAIR_SENTENCE'@@ -738,13 +752,21 @@ def generation_failure(run, exit_code=None, *, repair=None):encoding_failure = report.get('encoding_failure')phase = encoding_failure.get('phase') if isinstance(encoding_failure, dict) else Nonephase = phase or report.get('phase')+ snapshot = None+ if isinstance(planning, list) and planning and isinstance(planning[-1], dict):+ snapshot = planning[-1].get('stage')+ if isinstance(phase, str) and SNAPSHOT_LABEL.fullmatch(phase):+ # A planning label is where the resources were last read, not where the run stopped.+ snapshot, phase = snapshot or phase, None+ phase = phase or _attempt_phase(report)+ if not phase and (snapshot or report.get('resource_attempts')):+ phase = 'generation'if phase:lines.append('Stage: ' + str(phase))if isinstance(planning, list) and planning and isinstance(planning[-1], dict):last = planning[-1]- if not phase:- lines.append('Stage: ' + str(last.get('stage', 'unknown')))- lines.append('\nLast resource-planning snapshot (before this failure; not the stopping sample):')+ lines.append('\nLast resource-planning snapshot (%s, before this failure; not the stopping sample):'+ % (re.sub(r'[^a-z0-9-]', '', str(snapshot))[:32] or 'unlabeled'))state = last.get('idle_cache') or {}accounting = state.get('ram_accounting', {}) if isinstance(state, dict) else {}if not isinstance(accounting, dict):diff --git a/web/failure_issue.js b/web/failure_issue.jsindex 069d5a4..26a7a0d 100644--- a/web/failure_issue.js+++ b/web/failure_issue.js@@ -13,8 +13,10 @@ const PHASES = [export function failureStage(report) {if (report?.stage === 'submission') return ['submitting the task', '提交任务'];if (report?.stage === 'queue') return ['queue operation', '队列操作'];+ // A resource-planning snapshot label says where the resources were last read, not where the run stopped.const named = [report?.progress?.phase, report?.progress?.stage,- /^Stage: (\S+)/m.exec(String(report?.details || ''))?.[1]].filter(Boolean);+ /^Stage: (\S+)/m.exec(String(report?.details || ''))?.[1]]+ .filter(name => name && !/^(?:before|after)-encoding$|^retry-\d+$/.test(name));for (const name of named)for (const [pattern, words] of PHASES) if (pattern.test(name)) return words;return null;