Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
33 commits
Select commit Hold shift + click to select a range
dd73f1c
Release 0.6.3: update notes
KBRASK Nov 18, 2026
75387c0
Tutorial, System status: the steps and pictures follow the top bar's …
KBRASK Nov 18, 2026
aba7a55
This computer's figures are read once every 2 seconds: the old header…
KBRASK Nov 18, 2026
7b7ed4a
Library: a delete that stops on a file problem says why (in use, no p…
KBRASK Nov 18, 2026
bc050b3
Works menu: the Info item shows an information mark instead of the wa…
KBRASK Nov 18, 2026
e096fec
Editor: with a part that is not generated yet selected, the side pane…
KBRASK Nov 18, 2026
00525f2
Launcher update window: the release-notes button under the notes wrap…
KBRASK Nov 18, 2026
5a7caa0
Editor on a narrow window: the generation bar grows when its controls…
KBRASK Nov 18, 2026
71e945c
Editor timeline: Ctrl+wheel zoom keeps the time under the pointer in …
KBRASK Nov 18, 2026
0f9418a
Editor: a blank edit takes the quality level chosen in the creation p…
KBRASK Nov 18, 2026
308d285
Settings: a save that fails after Settings was closed is shown as a f…
KBRASK Nov 18, 2026
eff569b
Tutorial book: pictures and text follow the redesigned panels
KBRASK Nov 18, 2026
96d4ef0
The old header status capsule's leftovers are removed: its stylesheet…
KBRASK Nov 18, 2026
176eb62
Editor: choosing parts apart on the timeline no longer breaks the bor…
KBRASK Nov 18, 2026
a3edcd6
The Edit view's generation bar shows the first-frame reference switch…
KBRASK Nov 18, 2026
00379a3
Phone access: the panel opens under the entry with its right edge on …
KBRASK Nov 18, 2026
65ef56c
Portrait and touch styles use the mirrored state attributes instead o…
KBRASK Nov 18, 2026
9a862e3
Settings: the GPU reserve card's failed save reads like the compatibi…
KBRASK Nov 19, 2026
3f73ebb
Failure wording check: the command palette no longer uses the bare re…
KBRASK Nov 19, 2026
f7f098f
Failure wording check: phone access no longer uses the bare retry sen…
KBRASK Nov 19, 2026
c8c4f2f
Your creations: the undo bar and the selection bar are fully opaque, …
KBRASK Nov 19, 2026
dc8ef37
Creation panel: a failure card on a small picture widens and grows th…
KBRASK Nov 19, 2026
ec2a007
Image editor queues when the engine is busy and starts when it frees
KBRASK Nov 19, 2026
326d621
Image editor: a queue note in the generation bar wraps inside its pla…
KBRASK Nov 19, 2026
827bfd9
Creation panel: beside a picture widened by a failure card, the conso…
KBRASK Nov 19, 2026
7b4e2a7
Image failure card: a failure with no report, stage or step names a f…
KBRASK Nov 19, 2026
2f077bc
Two-pass speed-up: engine messages use the short UI name
KBRASK Nov 19, 2026
1bb8513
Failure messages in launcher, installer, download and offline paths s…
KBRASK Nov 19, 2026
3b382b8
First, last and middle frames can be used together with reference pic…
KBRASK Nov 19, 2026
aa2ec94
Length and time estimates count each keyframe used with references as…
KBRASK Nov 19, 2026
9f4ca16
Windows setup waits and installs the packages again when another prog…
KBRASK Nov 19, 2026
6827017
Image worker: a full warm-up builds the model's own runner from the s…
KBRASK Nov 19, 2026
3cdcf8c
Release 0.6.4: update notes
KBRASK Nov 19, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions THIRD_PARTY_NOTICES.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ FreeVideo code uses [Apache-2.0](LICENSE). Its dependencies and models retain th
| --- | --- |
| [Three.js](https://threejs.org/) r160 and its TransformControls (examples/jsm; import path and handle colours changed), © 2010–2023 three.js authors (bundled whitebox renderer and mannequin) | [MIT](web/vendor/three/LICENSE) |
| [Depth Anything V2 Small](https://github.com/DepthAnything/Depth-Anything-V2/tree/a561b849ebae10a6f5ef49e26c83cbbcd36c71bf), © 2024 Depth Anything authors; DINOv2 © Meta Platforms, Inc. and affiliates. Small-only DPT/DINOv2 inference and preprocessing are adapted and bundled; Small weights are an optional download pinned at `03876f8651c73a60fe4c2c48294e09fcb6838fcf`. | [Apache-2.0 (code and Small weights)](freevideo_engine/licenses/Depth-Anything-V2-Apache-2.0.txt) |
| [Real-ESRGAN](https://github.com/xinntao/Real-ESRGAN/tree/685d429c81888252bdb10f56c7754baededc3823) realesr-general-x4v3, © 2021 Xintao Wang. The SRVGGNetCompact inference network is adapted and bundled for upscaling finished videos to 4K; the weights are an optional download (4,885,111 bytes, SHA-256 `8dc7edb9ac80ccdc30c3a5dca6616509367f05fbc184ad95b731f05bece96292`, the v0.2.5.0 release file). | [BSD-3-Clause (code and weights)](freevideo_engine/licenses/Real-ESRGAN-BSD-3-Clause.txt) |
| Qt, PySide6 and Shiboken6 | LGPL-3.0; [component notices](freevideo_engine/launcher/licenses/NOTICE.txt) |
| PyInstaller bootloader | GPL-2.0 with the bootloader exception |
| CPython / psutil | PSF / BSD-3-Clause |
Expand Down
2 changes: 2 additions & 0 deletions __init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""Optional ComfyUI custom-node entry point; the engine also runs standalone."""
from .freevideo_engine.comfy_logging import configure_managed_logging
from .freevideo_engine.comfy_privacy import configure_managed_privacy

configure_managed_logging()
configure_managed_privacy()

WEB_DIRECTORY = './web'

Expand Down
2 changes: 1 addition & 1 deletion docs/zh-CN/使用说明.md
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@
| 参考 | 图里的内容出现在视频中,但不规定哪一帧 | 保持人物、物品、场景的样子 |

- 首帧和尾帧可以同时使用,会按输出画幅居中裁切。
- 首帧、尾帧暂不能与参考图、参考视频同时使用;同时给了两类,先保留其中一类。
- 首帧、尾帧和中间帧可以与参考图、参考视频同时使用;Mac 上暂不支持,请只保留其中一类。
- 参考图保持原有比例,按输出像素面积缩小。参考视频只取与成片等长的一段,最长 15 秒,生成用时约为只用图片时的两倍。

## 作品库和收藏
Expand Down
5 changes: 4 additions & 1 deletion freevideo.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -158,7 +158,7 @@ try {
if ($pythonReason) { $pythonDetail = " uv reported: $pythonReason." }
if (-not $installed) { throw "Python installation failed (uv exit $pythonExit).$pythonDetail Check your network or connection mode in Downloads. See $bootstrapLog and retry." }
$freevideoPython = (& $uv python find --managed-python $versions.python | Select-Object -Last 1).Trim()
if ($LASTEXITCODE -ne 0 -or -not (Test-Path -LiteralPath $freevideoPython)) { throw 'Managed Python could not be located.' }
if ($LASTEXITCODE -ne 0 -or -not (Test-Path -LiteralPath $freevideoPython)) { throw "Python was installed but could not be found (uv exit $LASTEXITCODE). See $bootstrapLog, then run the same command again." }
} finally {
if ($patientDownloadNotice -and $env:FREEVIDEO_UI_EVENTS -eq '1') {
Write-Host '{"event":"freevideo_ui","kind":"progress","key":"download-patient-python","label":"Download","detail":"","state":"complete"}'
Expand All @@ -177,6 +177,9 @@ try {
} catch {
Write-Host ("FreeVideo could not start: " + $_.Exception.Message) -ForegroundColor Red
Write-Host 'Existing files are retained. Retry the same command after resolving the reported issue.'
$freevideoReportLog = ''
if ($bootstrapLog -and (Test-Path -LiteralPath $bootstrapLog)) { $freevideoReportLog = " and attach $bootstrapLog" }
Write-Host ("To report it: open a new issue at https://github.com/FlashML-org/FreeVideo/issues/new with this message" + $freevideoReportLog + '.')
} finally {
[Console]::OutputEncoding = $freevideoConsoleEncoding
foreach ($name in $freevideoSavedEnvironment.Keys) {
Expand Down
13 changes: 8 additions & 5 deletions freevideo_engine/agent/schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -184,17 +184,20 @@ def common():
def generation_media(*, local=False, enhance=False):
properties = {'first': nullable(media(True, local=local)), 'last': nullable(media(True, local=local)),
'references': nullable(array(media(enhance, local=local, early=not enhance), high=8 if enhance else 32))}
rules = [{'if': {'required': ['references'], 'properties': {'references': {'type': 'array', 'minItems': 1}}},
'then': {'properties': {'first': {'type': 'null'}, 'last': {'type': 'null'}}}}]
# A video takes keyframes and references together (each keyframe becomes a still guide on its frame);
# the prompt enhancer still describes one layout.
rules = [] if not enhance else [{'if': {'required': ['references'], 'properties': {'references': {'type': 'array', 'minItems': 1}}},
'then': {'properties': {'first': {'type': 'null'}, 'last': {'type': 'null'}}}}]
if not enhance:
from ..media_request import MAX_MIDDLE
properties['middle'] = nullable(array(media(True, local=local, timed=True), high=MAX_MIDDLE, description=
'Still pictures the video passes through between its first and last frame, each at a time in seconds. '
'Needs both first and last, and no references.'))
'Needs both first and last; references may be given too.'))
present = {'required': ['middle'], 'properties': {'middle': {'type': 'array', 'minItems': 1}}}
rules.append({'if': present, 'then': {'required': ['first', 'last'], 'properties': {
'first': {'not': {'type': 'null'}}, 'last': {'not': {'type': 'null'}}, 'references': {'type': ['null', 'array'], 'maxItems': 0}}}})
return obj(properties, description='A first or last frame request does not take a voice reference.', allOf=rules)
'first': {'not': {'type': 'null'}}, 'last': {'not': {'type': 'null'}}}}})
return obj(properties, description=('First, last and middle frames may be given with references; on a Mac use one of the two.'
if not enhance else 'A first or last frame request does not take a voice reference.'), allOf=rules)


def generate(*, local=False):
Expand Down
49 changes: 38 additions & 11 deletions freevideo_engine/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -1814,7 +1814,7 @@ def environment(folder=venv, executable=python, label=name):
elif folder.exists():
command.append('--clear')
try:
return self.packages(label + '-venv', [*command, folder])
return self.packages(label + '-venv', [*command, folder], wait_busy=False)
except RuntimeError as error:
# Another program (usually security software scanning the
# Python file just unpacked) held it open while uv copied it.
Expand Down Expand Up @@ -2007,11 +2007,23 @@ def notice(message):
if active:
self.ui.event('progress', key=key, label='Download', detail='', state='complete')

def packages(self, label, args, family='pypi'):
with self.download_notice('download-patient-' + label) as notice:
return network.package_command(self.network, family,
lambda env, source: self.command(label if source == 'official' else label + '-' + source, args, env=env),
self.env, notice=notice)
def packages(self, label, args, family='pypi', *, wait_busy=True):
from .failure_details import file_in_use
for wait in (*ENVIRONMENT_BUSY_WAITS, None):
try:
with self.download_notice('download-patient-' + label) as notice:
return network.package_command(self.network, family,
lambda env, source: self.command(label if source == 'official' else label + '-' + source, args, env=env),
self.env, notice=notice)
except RuntimeError as error:
# Security software or an indexer can hold a file uv has just
# written or is about to run (the build environment's Python).
# No other download source helps; the file is free again shortly.
if wait is None or not wait_busy or not file_in_use(error) or self.cancel.is_set():
raise
self.ui.write('A file is in use by another program; trying again in %d s.\n' % wait)
if self.cancel.wait(wait):
raise

def python_sources(self, names):
"""The GitHub mirror refuses the Python runtime files, so it is tried after a mirror that serves them."""
Expand Down Expand Up @@ -2646,13 +2658,25 @@ def progress(value):
try:
image_pack.install(Path(model_root), progress, engine_root=Path(engine_root))
except image_pack.PackError as error:
print('The image model was not downloaded (%s). Download it later from the launcher.' % error.reason, file=sys.stderr)
from .failure_details import IMAGE_PACK_FAILURES
reason = IMAGE_PACK_FAILURES.get(error.reason, IMAGE_PACK_FAILURES['failed'])[0]
print('The image model was not downloaded: %s The video model is ready; download the image model later from '
'the launcher.' % reason, file=sys.stderr)
except (OSError, ValueError, RuntimeError) as error:
print('The image model was not downloaded (%s). Download it later from the launcher.' % type(error).__name__, file=sys.stderr)
print('The image model was not downloaded: %s The video model is ready; download the image model later from '
'the launcher.' % (str(error).strip() or type(error).__name__), file=sys.stderr)
else:
print('Image model ready.')


def report_hint():
"""How to report a failed command-line setup: the report command and where to send it."""
from .launcher_issue import ISSUE_FORM
entry = '.\\freevideo.ps1 diagnose' if platform.system() == 'Windows' else './freevideo diagnose'
return ('To report it: run %s and attach the ZIP it saves to a new issue at %s\n'
'如需报告:请运行 %s,并将生成的 ZIP 附在 %s 的新问题中。' % (entry, ISSUE_FORM, entry, ISSUE_FORM))


def run_main(argv, shown):
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument('--root', type=Path, default=Path(os.environ.get('FREEVIDEO_HOME', DEFAULT_ROOT)))
Expand Down Expand Up @@ -2786,7 +2810,9 @@ def curl_progress(message):
return 1
except (OSError, ValueError) as error:
prepare_end(ui, False)
print('Setup could not start: ' + str(error), file=sys.stderr)
print('Setup could not start: %s\nCheck that the installation folder exists, is writable and has free space, '
'then run the same command again.\n%s' % (str(error).strip() or type(error).__name__, report_hint()),
file=sys.stderr)
return 1
def interrupted(signum, frame):
raise KeyboardInterrupt('Setup interrupted by signal %s' % signum)
Expand Down Expand Up @@ -2828,8 +2854,9 @@ def interrupted(signum, frame):
print('\nSetup complete. Next: %s --root "%s"' % (entry, installer.root))
return 0
ui.event('failure', error=installer.state.get('resource_guard') or installer.state['error'])
print('\nSetup failed: %s\nAll files retained. Logs: %s\nRerun the same setup command to resume.' %
(installer.state.get('resource_guard') or installer.state['error'], installer.run_dir), file=sys.stderr)
print('\nSetup failed: %s\nAll files retained. Logs: %s\nRerun the same setup command to resume.\n%s' %
(installer.state.get('resource_guard') or installer.state['error'], installer.run_dir, report_hint()),
file=sys.stderr)
return 1


Expand Down
22 changes: 20 additions & 2 deletions freevideo_engine/capabilities.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,10 @@
UNAVAILABLE = {'version': 1, 'status': 'unavailable'}


# A still guide's normalized row: no picture size of its own, one canvas grid on every size row.
GUIDE = ('guide', None, None, None, None)


def normalize_references(task, references=None):
"""Panel metadata, never tokens or file identities; immutable cache key.

Expand All @@ -53,6 +57,12 @@ def normalize_references(task, references=None):
if not isinstance(row, dict):
raise ValueError('Invalid reference metadata.')
kind = row.get('kind')
if kind == 'image' and row.get('guide') is True:
# A keyframe next to references: a still guide of the canvas size, counted on each size row.
if set(row) != {'kind', 'guide'}:
raise ValueError('A still guide takes the canvas size; give no width or height.')
rows.append(GUIDE)
continue
allowed = {'kind', 'seconds', 'use'} if kind == 'audio' else {'kind', 'width', 'height'}
if kind == 'video':
allowed |= {'seconds', 'audio_seconds', 'guide'}
Expand Down Expand Up @@ -91,6 +101,8 @@ def normalize_references(task, references=None):
if seconds > MAX_SECONDS:
raise AudioUseError('audio_original_long')
rows.append((kind, width, height, seconds, audio) + (('original',) if use else ()))
if rows and all(row == GUIDE for row in rows):
raise ValueError('Still guides go with references; keyframes alone have their own task.')
if sum(len(row) == 6 for row in rows) > 1:
raise AudioUseError('audio_original_multiple')
visual = any(r[0] != 'audio' for r in rows)
Expand All @@ -110,8 +122,9 @@ def reference_parameters(references):
"""JSON form of a normalized cache key, also used in notifications."""
if references is None:
return None
return [{k: v for k, v in zip(('kind', 'width', 'height', 'seconds', 'audio_seconds', 'use'), row)
if v is not None} for row in references]
return [{'kind': 'image', 'guide': True} if row == GUIDE else
{k: v for k, v in zip(('kind', 'width', 'height', 'seconds', 'audio_seconds', 'use'), row) if v is not None}
for row in references]


def valid_reference_rows(value):
Expand Down Expand Up @@ -139,6 +152,11 @@ def _material(canvas, task, references):
duration = 0.
limit = reference_frames(canvas)
for row in references:
if row == GUIDE:
# Cropped to the canvas and encoded like a still (media_encoding.reference_load).
video_rows += patch
duration += 5.
continue
kind, width, height, seconds, soundtrack = row[:5]
if len(row) == 6:
# Original audio occupies the existing target rows. Keep all
Expand Down
Loading