Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
8078087
Agent connection: MCP clients start the installation's own Python, so…
KBRASK Nov 27, 2026
0e61a2b
Players: the edit view's source preview has sound, speed and fills th…
KBRASK Nov 28, 2026
f1e165b
Share: the save key reads whether or not it can be pressed, and the t…
KBRASK Nov 28, 2026
58b0694
Colours: the dark theme's primary key keeps white words at 4.5:1 when…
KBRASK Nov 28, 2026
4a96554
Setup on Windows: check the Visual C++ libraries PyTorch imports, per…
KBRASK Nov 28, 2026
3a02713
Edit view: the empty music track says how to start, and + Audio track…
KBRASK Nov 28, 2026
5314e0a
Launcher model card: formal titles, a failed removal said once, and n…
KBRASK Nov 28, 2026
e975789
Estimate line: the phrase after the dot (including first-time setup) …
KBRASK Nov 28, 2026
70cc646
Assistant connection: a refused address says why, so the card can say…
KBRASK Nov 28, 2026
de26808
Editor: Escape while the quality knob is held cancels the drag and ke…
KBRASK Nov 28, 2026
994aa8a
Reuse settings: an edit after the fill takes the shared notice and it…
KBRASK Nov 28, 2026
f1c38bc
H3 Image downloads from the China source take each file from a fixed …
KBRASK Nov 28, 2026
10ccdae
Editor: Escape closes the lent bar's open quality or size pop-up, or …
KBRASK Nov 28, 2026
58312f9
Edit view: closing the adjust drawer gives the focus back to the Adju…
KBRASK Nov 28, 2026
58c8aac
Multi-GPU startup: cards read again when the first read fails, and a …
KBRASK Nov 28, 2026
f5ed256
Keyboard: Tab right after a page is chosen goes into that page's cont…
KBRASK Nov 28, 2026
a4db91f
Offline setup links the Environment ZIP of this version on the releas…
KBRASK Nov 28, 2026
e4c105a
Interface language Spanish: the sentences added after 0.6.15 (Visual …
KBRASK Nov 28, 2026
0ea1f0e
Interface language Brazilian Portuguese: the sentences added after 0.…
KBRASK Nov 28, 2026
1a33261
French interface text: the new sentences for the Visual C++ file of a…
KBRASK Nov 28, 2026
73aadca
German interface text: the new sentences for the Visual C++ file of a…
KBRASK Nov 28, 2026
0d6763a
Interface languages Russian, Ukrainian, Turkish and Indonesian: the e…
KBRASK Nov 28, 2026
327761b
Prompt enhancement: a rewrite that writes a picture label in other br…
KBRASK Nov 28, 2026
9cbc6a9
Release 0.6.16: update notes
KBRASK Nov 28, 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
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ Requirements: an NVIDIA RTX 30 series or newer graphics card (professional cards

**Security software:** FreeVideo.exe is code-signed. If security software blocks FreeVideo.exe or quarantines files in the FreeVideo folder, check that the SHA-256 of FreeVideo.exe matches the value on the release page, then restore the files and add the FreeVideo folder to the software's exclusion list.

**Offline installation:** Download the packages from [Quark](https://pan.quark.cn/s/c51235b84618) and drag the ZIP files into the launcher without extracting them. A fully offline installation needs the four model packs (video model, text encoder, video & audio decoder, and sampling caches), plus the environment package for a new ComfyUI installation. After importing only the environment package, you can also choose **Automatic download** for the models (v0.3.12 or newer). The audio reference cache is optional and is used only when a reference includes audio.
**Offline installation:** Download the model packages from [Quark](https://pan.quark.cn/s/c51235b84618) and the environment package from [ModelScope](https://modelscope.cn/models/BowenXue/FreeVideo-releases/tree/master/offline), then drag the ZIP files into the launcher without extracting them. A fully offline installation needs the four model packs (video model, text encoder, video & audio decoder, and sampling caches), plus the environment package for a new ComfyUI installation. After importing only the environment package, you can also choose **Automatic download** for the models (v0.3.12 or newer). The audio reference cache is optional and is used only when a reference includes audio.

### macOS (Apple silicon preview)

Expand Down
2 changes: 1 addition & 1 deletion README.zh-CN.md
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ FreeVideo 是面向消费级显卡的 MiniMax H3 本地推理引擎,基于 [Op

**安全软件:** FreeVideo.exe 已进行代码签名。如果安全软件拦截 FreeVideo.exe,或隔离了 FreeVideo 文件夹中的文件,请先核对 FreeVideo.exe 的 SHA-256 与发布页列出的值一致,再恢复文件,并把 FreeVideo 文件夹加入该软件的排除列表。

**离线安装:** 从[夸克网盘](https://pan.quark.cn/s/c51235b84618)下载离线包,将 ZIP 文件直接拖入启动器,无需解压。完全离线安装需要「视频模型」「文本编码器」「视频与音频解码器」「采样缓存」四个模型包,全新安装 ComfyUI 时还需要「运行环境」包。也可以只导入「运行环境」包,再在模型来源中选择**自动下载**(v0.3.12 及以上)。「音频参考缓存」为可选包,仅在参考素材带有音频时使用。
**离线安装:** 从[夸克网盘](https://pan.quark.cn/s/c51235b84618)下载模型包,从[魔搭](https://modelscope.cn/models/BowenXue/FreeVideo-releases/tree/master/offline)下载「运行环境」包,将 ZIP 文件直接拖入启动器,无需解压。完全离线安装需要「视频模型」「文本编码器」「视频与音频解码器」「采样缓存」四个模型包,全新安装 ComfyUI 时还需要「运行环境」包。也可以只导入「运行环境」包,再在模型来源中选择**自动下载**(v0.3.12 及以上)。「音频参考缓存」为可选包,仅在参考素材带有音频时使用。

### macOS(Apple 芯片预览版)

Expand Down
5 changes: 3 additions & 2 deletions __init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,9 @@

async def comfy_entrypoint():
from .freevideo_engine.comfy_environment import control_process
from .freevideo_engine.gpu_pool import pool_enabled
if control_process() and pool_enabled():
# The launcher made this the control process; register_pool reads the cards (again if it must) and either starts
# the multi-GPU queue or turns this back into a single-card process.
if control_process():
from server import PromptServer
from .freevideo_engine import comfy_bridge
from .freevideo_engine.comfy_pool import register_pool
Expand Down
14 changes: 12 additions & 2 deletions freevideo_engine/agent/access.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,9 @@ def check(request, *, local=False, lan=False):
or address is None or not address.is_loopback and (local_only or not address.is_private or not lan_enabled())):
raise JobError('local_only', 'Peer is not permitted')
socket = request.transport.get_extra_info('sockname') if request.transport else None
# Why the request was refused, in facts of this computer only (never what the request itself named): the page says
# what to open. 'port' carries the port FreeVideo answers on.
reason, listening = 'name', None
try:
host = urlsplit(request.scheme + '://' + request.host)
allowed = {socket[0].split('%')[0]} if socket else set()
Expand All @@ -56,8 +59,14 @@ def check(request, *, local=False, lan=False):
allowed.add(proxy_origin.hostname)
socket = (proxy_origin.hostname, proxy_origin.port)
scheme = proxy_origin.scheme
if host.hostname not in allowed or host.port not in (None, socket[1]):
if host.hostname not in allowed:
raise ValueError
if host.port not in (None, socket[1]):
# The port this computer answers on; not through the LAN proxy, where it would be the loopback port behind
# it, which another device can neither reach nor needs.
reason, listening = 'port', None if proxied else socket[1]
raise ValueError
reason = 'origin'
if len(request.headers.getall('Origin', [])) > 1:
raise ValueError
origin = request.headers.get('Origin')
Expand All @@ -70,4 +79,5 @@ def check(request, *, local=False, lan=False):
or parsed.path or parsed.query or parsed.fragment or parsed.username or parsed.password):
raise ValueError
except (ValueError, TypeError, IndexError):
raise JobError('origin_forbidden', 'Origin or Host does not identify this instance') from None
detail = dict(reason=reason, **({'port': listening} if isinstance(listening, int) else {}))
raise JobError('origin_forbidden', 'Origin or Host does not identify this instance', details=[detail]) from None
10 changes: 5 additions & 5 deletions freevideo_engine/agent/cli.py
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
"""./freevideo agent ... — the agent API from a shell; every command prints JSON.
r"""./freevideo agent ... — the agent API from a shell; every command prints JSON.
./freevideo agent status
./freevideo agent submit shot.json --wait
./freevideo agent batch storyboard.json --wait
./freevideo agent job j0123456789ab
Linux x86_64 uses ./freevideo; Windows uses freevideo.cmd. On macOS and other
Unix platforms, use the installed interpreter and source folder:
env FREEVIDEO_AGENT=1 PYTHONPATH=/path/to/FreeVideo/engine-source /path/to/installed/python -X utf8 \
/path/to/FreeVideo/engine-source/freevideo_engine/installed_entry.py freevideo_engine.agent.cli --root /path/to/FreeVideo status
The installation's own Python (the python in machine.json) runs it the same way across updates:
/path/to/FreeVideo/envs/unified/bin/python -X utf8 -B -I -m freevideo_engine.agent.cli --root /path/to/FreeVideo status
C:\FreeVideo\envs\unified\Scripts\python.exe -B -I -m freevideo_engine.agent.cli --root C:\FreeVideo status
./freevideo (Linux x86_64) and freevideo.cmd (Windows) start it from the source folder of their own version.
"""
import argparse
import json
Expand Down
4 changes: 3 additions & 1 deletion freevideo_engine/agent/errors.py
Original file line number Diff line number Diff line change
Expand Up @@ -298,10 +298,12 @@ def safe_details(value):
if isinstance(value, dict):
return {k: (v if k == 'failure_kind' and v in ('allocation', 'gpu_oom', 'ram_pressure', 'invalid_inputs')
or k == 'confirm' and isinstance(v, str) and re.fullmatch(r'cf[0-9a-f]{10}', v)
# Why an address was refused (access.check): one of three fixed words, never request text.
or k == 'reason' and v in ('port', 'origin', 'name')
else safe_details(v)) for k, v in value.items() if k in {
'field', 'path', 'allowed', 'got', 'limit_bytes', 'block', 'total',
'width', 'height', 'frames', 'seconds', 'failure_kind', 'alternatives', 'owner', 'agent', 'ui', 'count',
'confirm'}}
'confirm', 'reason', 'port'}}
if value is None or type(value) in (bool, int):
return value
if type(value) is float:
Expand Down
51 changes: 32 additions & 19 deletions freevideo_engine/agent/mcp.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,10 @@
"""FreeVideo as an MCP server (stdio, JSON-RPC 2.0), for Claude Code, Claude Desktop, Cursor and other agents.
r"""FreeVideo as an MCP server (stdio, JSON-RPC 2.0), for Claude Code, Claude Desktop, Cursor and other agents.
./freevideo mcp # Linux x86_64
freevideo.cmd mcp # Windows
./freevideo mcp --print-config # Linux client configuration
# macOS / other Unix platforms: use the installed Python and source folder.
env FREEVIDEO_AGENT=1 PYTHONPATH=/path/to/FreeVideo/engine-source /path/to/installed/python -X utf8 \
/path/to/FreeVideo/engine-source/freevideo_engine/installed_entry.py freevideo_engine.agent.mcp --root /path/to/FreeVideo
# Add --print-config to print client configuration.
# The installation's own Python (the python in machine.json); the same command keeps working after an update.
/path/to/FreeVideo/envs/unified/bin/python -X utf8 -B -I -m freevideo_engine.agent.mcp --root /path/to/FreeVideo
C:\FreeVideo\envs\unified\Scripts\python.exe -B -I -m freevideo_engine.agent.mcp --root C:\FreeVideo
# Add --print-config to print client configuration. ./freevideo mcp (Linux x86_64) and freevideo.cmd mcp
# (Windows) start it from the source folder of the version they belong to.
Standard library only; it talks to the running ComfyUI through the agent API.
"""
Expand Down Expand Up @@ -503,35 +501,50 @@ def linux_wrapper_supported():


def python_shell_command(config, module):
"""Direct Unix entry using this installation's interpreter, source and root."""
"""Direct Unix entry using this installation's interpreter and root."""
command = list(config['command'])
command[command.index('freevideo_engine.agent.mcp')] = module
command[1:1] = ['-X', 'utf8']
env = ['FREEVIDEO_AGENT=1'] + [key + '=' + value for key, value in config['env'].items()]
return 'env ' + ' '.join(shell_quote(value) for value in env + command)


def cli_command(config, *arguments, windows=None):
"""The agent command line (freevideo_engine.agent.cli) as text, from the same stable entry as the MCP server."""
windows = sys.platform == 'win32' if windows is None else windows
if not windows:
return ' '.join([python_shell_command(config, 'freevideo_engine.agent.cli'), *(shell_quote(a) for a in arguments)])
command = list(config['command'])
command[command.index('freevideo_engine.agent.mcp')] = 'freevideo_engine.agent.cli'
return ' '.join(shell_quote(p, windows=True) for p in [*command, *arguments])


def client_config(root):
"""How MCP clients start this server for this installation."""
"""How MCP clients start this server for this installation.
The installation's own Python (machine.json) runs the module. Its environment imports FreeVideo from the source
the launcher binds it to when it installs or updates to a build (the first start after an update does this), so
the command stays the same across updates; no versioned source folder or PYTHONPATH is named. -I keeps the folder
the client starts in, PYTHON* variables and the user's own packages out of the import path, so another copy of
FreeVideo there is never imported in its place."""
root = Path(root).resolve()
try:
machine = json.loads((root / 'machine.json').read_text(encoding='utf-8'))
python = machine['python']
except (OSError, ValueError, KeyError):
python = sys.executable
source = Path(__file__).resolve().parents[2]
command = [python, '-B', str(source / 'freevideo_engine' / 'installed_entry.py'), 'freevideo_engine.agent.mcp', '--root', str(root)]
env = {'PYTHONPATH': str(source)}
command = [python, '-B', '-I', '-m', 'freevideo_engine.agent.mcp', '--root', str(root)]
env = {}
shell_command = list(command)
if sys.platform != 'win32' and not linux_wrapper_supported():
shell_command[1:1] = ['-X', 'utf8']
# Keep JSON argv untouched. Windows command text targets Command Prompt.
assignment = ' --env '.join(shell_quote(key + '=' + value) if sys.platform == 'win32' else key + '=' + shell_quote(value)
for key, value in env.items())
return dict(command=command, env=env, codex='codex mcp add freevideo --env %s -- %s' % (
assignment, ' '.join(shell_quote(p) for p in shell_command)), mcp_json={'mcpServers': {'freevideo': {
'command': command[0], 'args': command[1:], 'env': env}}},
claude_code='claude mcp add freevideo --env %s -- %s' % (
assignment = ''.join(' --env ' + (shell_quote(key + '=' + value) if sys.platform == 'win32' else key + '=' + shell_quote(value))
for key, value in env.items())
server = {'command': command[0], 'args': command[1:], **({'env': env} if env else {})}
return dict(command=command, env=env, codex='codex mcp add freevideo%s -- %s' % (
assignment, ' '.join(shell_quote(p) for p in shell_command)), mcp_json={'mcpServers': {'freevideo': server}},
claude_code='claude mcp add freevideo%s -- %s' % (
assignment, ' '.join(shell_quote(p) for p in shell_command)))


Expand Down
26 changes: 12 additions & 14 deletions freevideo_engine/agent/routes.py
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ def reply(value, status=200):
connection = dict(connected=False, client=None, via=None, last_seen_at=None, disconnected_at=None, refused_at=None)
refused_connects = set()

def note_connect_refusal(code, request):
def note_connect_refusal(code, request, reason=None):
# The card only says the address could not be had; the log says why, once per reason and kind of address.
# The kind, never the name: a computer or network name does not belong in a log that may be sent along.
import ipaddress
Expand All @@ -528,9 +528,12 @@ def note_connect_refusal(code, request):
kind = 'IP address'
except ValueError:
kind = 'localhost' if host == 'localhost' else 'name'
if (code, kind) not in refused_connects:
refused_connects.add((code, kind))
logging.getLogger(__name__).warning('[FreeVideo] Agent connection address refused: %s (opened by %s)', code, kind)
# The reason is one of access.check's fixed words (port, origin, name), never the request's own text.
reason = reason if reason in ('port', 'origin', 'name') else None
if (code, kind, reason) not in refused_connects:
refused_connects.add((code, kind, reason))
logging.getLogger(__name__).warning('[FreeVideo] Agent connection address refused: %s%s (opened by %s)',
code, ' ' + reason if reason else '', kind)
# The conversation in the Autopilot view: the page and the connected agent talk in the agent's latest session.
chat = dict(client=None, waiting=0, folds={}, told={})
chat_writes = asyncio.Lock()
Expand Down Expand Up @@ -638,7 +641,7 @@ async def respond(request):
except JobError as error:
value = error.view()
if suffix.endswith('/connect'):
note_connect_refusal(error.code, request)
note_connect_refusal(error.code, request, next((d.get('reason') for d in error.details.get('details') or [] if isinstance(d, dict)), None))
if value.get('next') and request.match_info.get('id'):
value['next'] = value['next'].replace('{id}', request.match_info['id'])
if error.code == 'too_large':
Expand Down Expand Up @@ -1626,9 +1629,9 @@ def work():
@guarded
async def connect(request):
# For the Autopilot view: how to connect an agent on this computer. The token itself stays in its file.
from ..comfy_bridge import installation_root, source_root
from ..comfy_bridge import installation_root
from .guide import page_language
from .mcp import client_config, linux_wrapper_supported, python_shell_command, shell_quote
from .mcp import cli_command, client_config
page_language(request[query_key].get('lang'))
try:
root = installation_root()
Expand All @@ -1637,13 +1640,8 @@ async def connect(request):
note_connect_refusal('not_ready', request)
return problem('not_ready', str(error), 503)
config = await asyncio.to_thread(client_config, root)
if os.name != 'nt' and not linux_wrapper_supported():
cli = python_shell_command(config, 'freevideo_engine.agent.cli') + ' status'
else:
script = next((folder / name for folder in (root, source_root())
for name in (('freevideo.cmd',) if os.name == 'nt' else ('freevideo',))
if (folder / name).is_file()), None)
cli = shell_quote(str(script), windows=os.name == 'nt') + ' agent status' if script else None
# The same entry as the MCP server: the installation's Python, which follows every update.
cli = cli_command(config, 'status', windows=os.name == 'nt')
seen = {}
for row in jobs.rows():
if row.get('client'):
Expand Down
4 changes: 2 additions & 2 deletions freevideo_engine/comfy_bridge.py
Original file line number Diff line number Diff line change
Expand Up @@ -1465,9 +1465,9 @@ def generate(prompt, width, height, seconds, seed, output_directory, *,
continue_from=None, frames=None, first_frame_reference=False, voice_reference=False, hide_tail=False,
step_cache=None, upscale_factor=2, allow_empty_prompt=False, upscale_from=None, upscale_to=None,
fast_mode=None):
from .comfy_environment import control_process
from .comfy_environment import NOT_DISPATCHED, control_process
if control_process(environ):
raise RuntimeError('Generation requires a dispatched executor')
raise RuntimeError(NOT_DISPATCHED)
if upscale_to not in (None, '', '4k', 'fast'):
raise ValueError('Upscale size must be 4k or fast')
if upscale_to:
Expand Down
3 changes: 3 additions & 0 deletions freevideo_engine/comfy_environment.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,9 @@ def with_private_compiler(root, env):

EXECUTOR_DEVICE = 'FREEVIDEO_EXECUTOR_DEVICE'
POOL_CONTROL = 'FREEVIDEO_POOL_CONTROL'
# A generation that reached the control process itself: the multi-GPU queue is running and did not hand it to a card.
NOT_DISPATCHED = ('The multi-GPU queue did not hand this generation to a graphics card (pool_not_dispatched). '
'Restart FreeVideo; if it happens again, send a diagnostic report.')


def executor_device(environ=None):
Expand Down
9 changes: 5 additions & 4 deletions freevideo_engine/comfy_nodes.py
Original file line number Diff line number Diff line change
Expand Up @@ -243,10 +243,11 @@ def execute(cls, text, width, height, seconds, seed, first=None, last=None,
continue_from='', frames=0, first_frame_reference=False, voice_reference=False, hide_tail=False,
step_cache='none', upscale_factor='2', allow_empty_prompt=False, upscale_from='', upscale_to='',
fast_mode='none'):
from .comfy_environment import control_process
from .gpu_pool import pool_enabled
if control_process() and pool_enabled():
raise RuntimeError('Generation requires a dispatched executor')
from .comfy_environment import NOT_DISPATCHED, control_process
# Still the control process only while its multi-GPU queue runs (comfy_pool.register_pool); that queue sends
# every generation to a card's own process, so one reaching here was not sent.
if control_process():
raise RuntimeError(NOT_DISPATCHED)
from server import PromptServer
from .comfy_chain import block_context, block_finished, report_fields
refine_from, continue_from = optional_text(refine_from), optional_text(continue_from)
Expand Down
Loading