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.
Mac setup fetches its own Git from conda-forge when the system has none
Bowen Xue5cbeb08f4181
diff --git a/freevideo_engine/bootstrap.py b/freevideo_engine/bootstrap.pyindex b2637fe..b397526 100644--- a/freevideo_engine/bootstrap.py+++ b/freevideo_engine/bootstrap.py@@ -5,6 +5,7 @@ import csvfrom contextlib import ExitStack, contextmanagerimport hashlibimport json+import shleximport loggingimport osfrom pathlib import Path@@ -798,12 +799,16 @@ def plan(args, *, local_progress=None, stage=None):if reuse_cache and not cache_compatible(reuse_cache, **cache_format):errors.append('--cache must contain a prepared FP8 cache compatible with this GPU scale format.')from .download_settings import read as download_preferences+ def native_git_available():+ from .macos_bootstrap import available_git+ return available_git() is not Noneif stage:stage('Testing download sources')networking = network.plan(json.loads((PACKAGE / 'dependencies.json').read_text(encoding='utf-8')),bootstrap_versions(json.loads((PACKAGE / 'bootstrap_versions.json').read_text(encoding='utf-8')), system), layout,mode=getattr(args, 'network', 'auto'), timeout=getattr(args, 'network_timeout', 5),offline=bool(args.hardware_json or errors),+ git_available=not mac_target or bool(args.hardware_json) or native_git_available(),env=dict(os.environ, FREEVIDEO_HOME=str(root)),proxy_mode=download_preferences(root / 'download-settings.json')['proxy_mode'],progress=(lambda message: stage('Testing download sources', message['done'], message['total'])) if stage else None)@@ -1916,19 +1921,22 @@ class Installer:def install_git_linux(self):"""Git from conda-forge, pinned by package hashes, when the system has none new enough."""- spec = json.loads((PACKAGE / 'git_linux.json').read_text(encoding='utf-8'))+ self.install_git_conda('git_linux.json', 'git-linux', self.fetch_git_linux)++ def install_git_conda(self, filename, folder, fetch, wrapper=False):+ spec = json.loads((PACKAGE / filename).read_text(encoding='utf-8'))prefix = self.root / 'tools' / ('git-' + spec['version'])executable = prefix / 'bin' / 'git'receipt, content = prefix / '.freevideo-git.json', {k: spec[k] for k in ('version', 'packages')}if not (receipt.is_file() and json.loads(receipt.read_text(encoding='utf-8')) == content and executable.is_file()):- micromamba, packages = self.fetch_git_linux(spec)+ micromamba, packages = fetch(spec)# conda writes the prefix into the installed files, so the# environment is created in place; an interrupted one is replaced.if prefix.is_symlink():prefix.unlink()elif prefix.exists():shutil.rmtree(prefix)- explicit = self.root / 'downloads' / 'git-linux' / 'explicit.txt'+ explicit = self.root / 'downloads' / folder / 'explicit.txt'explicit.write_text('@EXPLICIT\n' + ''.join(path.resolve().as_uri() + '\n' for path in packages), encoding='utf-8')cache = self.root / 'tools' / 'micromamba-root'env = {k: v for k, v in self.env.items() if not k.upper().startswith(('CONDA', 'MAMBA'))}@@ -1943,7 +1951,15 @@ class Installer:# the other tools of the environment.links = self.root / 'tools' / 'git-bin'links.mkdir(parents=True, exist_ok=True)- if not (links / 'git').is_symlink() or Path(os.readlink(links / 'git')) != executable:+ if wrapper:+ # macOS resolves @loader_path from the path it was started by, so a script+ # starts the real executable instead of a link to it.+ text = '#!/bin/sh\nexec %s "$@"\n' % shlex.quote(str(executable))+ if not (links / 'git').is_file() or (links / 'git').is_symlink() or (links / 'git').read_text(encoding='utf-8') != text:+ (links / 'git').unlink(missing_ok=True)+ (links / 'git').write_text(text, encoding='utf-8')+ (links / 'git').chmod(0o755)+ elif not (links / 'git').is_symlink() or Path(os.readlink(links / 'git')) != executable:(links / 'git').unlink(missing_ok=True)(links / 'git').symlink_to(executable)self.env['PATH'] = str(links) + os.pathsep + self.env['PATH']diff --git a/freevideo_engine/failure_details.py b/freevideo_engine/failure_details.pyindex b782693..6797aee 100644--- a/freevideo_engine/failure_details.py+++ b/freevideo_engine/failure_details.py@@ -221,6 +221,10 @@ def environment_python_removed(args, pythons):# Checked before free space: freeing space cannot fix a disk that cannot hold the installation.PLACE_RULES = (+ (r'Git is unavailable\. Check the network connection', 'git-unavailable',+ ('Git could not be set up', '无法准备 Git'),+ ('Check the network connection and click Check again, or install the Apple Command Line Tools.',+ '请检查网络连接后点击“重新检查”,或者安装 Apple 命令行工具。')),(r'The installation folder is on a FAT32 disk', 'disk-format',('This disk cannot hold the models', '这块硬盘放不下模型'),('It is formatted as FAT32, which stores files up to 4 GB; the prompt model alone is 15.7 GB. 'diff --git a/freevideo_engine/git_macos.json b/freevideo_engine/git_macos.jsonnew file mode 100644index 0000000..656aa09--- /dev/null+++ b/freevideo_engine/git_macos.json@@ -0,0 +1,126 @@+{+ "version": "2.56.0",+ "micromamba": {+ "version": "2.9.0-0",+ "url": "https://github.com/mamba-org/micromamba-releases/releases/download/2.9.0-0/micromamba-osx-arm64",+ "sha256": "ec2a072f028e1a7cf20f3e2e74d5a8127cf5a5f27636375b5359811565f4e5be",+ "bytes": 14596096+ },+ "channels": {+ "official": "https://conda.anaconda.org/conda-forge",+ "tuna": "https://mirrors.tuna.tsinghua.edu.cn/anaconda/cloud/conda-forge",+ "nju": "https://mirror.nju.edu.cn/anaconda/cloud/conda-forge"+ },+ "packages": [+ {+ "path": "osx-arm64/libexpat-2.8.5-h6111c0a_0.conda",+ "sha256": "50aa761b83fc7a116ca88fe0cb4cefce5abababb10a926bf8afbafd5c298d102",+ "bytes": 69565+ },+ {+ "path": "osx-arm64/perl-5.44.0-1_hb001647_perl5.conda",+ "sha256": "d68a8d9a8f329e46920d7750b495f613e093fa40736d00a227b727f5898804bb",+ "bytes": 10327598+ },+ {+ "path": "osx-arm64/libiconv-1.18-he4c29f2_3.conda",+ "sha256": "689a14968267f2f97c07112fca5636e7d756036b9aee969911267c20bd3eea1f",+ "bytes": 750816+ },+ {+ "path": "osx-arm64/libzlib-1.3.2-h8088a28_3.conda",+ "sha256": "a18fa5d5bac452401459f966cf0d872224e8080c4ff93c77e168d43ab42ef9d7",+ "bytes": 47822+ },+ {+ "path": "osx-arm64/bzip2-1.0.8-h4e30115_10.conda",+ "sha256": "8ec22f0ba25cbfc2e64d70cf29459eccd7ffdf6436f6a6ff15bbfef799f7d4f6",+ "bytes": 124965+ },+ {+ "path": "osx-arm64/libcxx-23.1.4-h55c6f16_2.conda",+ "sha256": "9c390b4f403db32346754ccef6b84b7e5d9b70cb6d76258fd23b05f2db2ab216",+ "bytes": 577255+ },+ {+ "path": "osx-arm64/libev-4.33-h1a92334_3.conda",+ "sha256": "c0100064506ae8abb432c5a506d474f10af2cf48c33d62bc221fb28b6d6ff6ac",+ "bytes": 39991+ },+ {+ "path": "osx-arm64/c-ares-1.34.9-h74c22ad_0.conda",+ "sha256": "74b52d784b3576643da3aea1240a4120c1f25ee057f14ae5a89e8a7b3fb2e69f",+ "bytes": 201979+ },+ {+ "path": "osx-arm64/ncurses-6.6-he64c551_1.conda",+ "sha256": "7024a48c8c0d0114ed4ab53c76bf9275d50e91ba7cea367a9aead638d3c29c68",+ "bytes": 804298+ },+ {+ "path": "osx-arm64/icu-78.3-py310h579977c_2.conda",+ "sha256": "6cdb5dee54c72e56ab189fb3ad33cb28533553d42590e7e831160248f4416a43",+ "bytes": 14070242+ },+ {+ "path": "osx-arm64/libintl-0.25.1-hae62183_2.conda",+ "sha256": "b43c6645e668f86d04d5c06d6dc17efe921bbd9244be4b77946d56fb950a3fcc",+ "bytes": 90024+ },+ {+ "path": "osx-arm64/zstd-1.5.7-hf451053_7.conda",+ "sha256": "da867f5092eb0cb746d353694f0098031fd9817a4ce7d5743121209ae0f406ca",+ "bytes": 433687+ },+ {+ "path": "osx-arm64/pcre2-10.47-he63d830_1.conda",+ "sha256": "f8c415329b542e1fca1ff2917b80e687c18302dfa0353530668b90cb225b494f",+ "bytes": 851704+ },+ {+ "path": "osx-arm64/libedit-3.1.20260512-pl5321h26f1114_0.conda",+ "sha256": "5692a969e49b200c7874d1e869d281753361980b2ecfe9191b571d7e550f8b92",+ "bytes": 108512+ },+ {+ "path": "osx-arm64/libpsl-0.23.1-hdb0c161_1.conda",+ "sha256": "c8c3153df39abedf3413483f672151ad70f1adb0c06c192bdf7ec432c3616b07",+ "bytes": 72673+ },+ {+ "path": "noarch/ca-certificates-2026.10.23-hbd8a1cb_0.conda",+ "sha256": "95619b9c1184be7175392eeb0ee7eeb5ccf25d280951f4225f2d62e725790be3",+ "bytes": 130057+ },+ {+ "path": "osx-arm64/openssl-3.6.5-h55eecbc_0.conda",+ "sha256": "44fbc526456571a9fb8fa18157f6f269d4d4bd40eef20183a93b9c9296f94497",+ "bytes": 3111573+ },+ {+ "path": "osx-arm64/libssh2-1.11.1-hbf2880b_1.conda",+ "sha256": "a056e518c3d2d09fbb1778cea80c0c95338fb24adf1a817bbf90fb484850a304",+ "bytes": 280492+ },+ {+ "path": "osx-arm64/krb5-1.22.2-h34f8a20_2.conda",+ "sha256": "aaea1d42b07769920db2af7471ece9399d2613448863da64ad8272998db5db34",+ "bytes": 1165740+ },+ {+ "path": "osx-arm64/libnghttp2-1.68.1-h435687b_1.conda",+ "sha256": "445440d8cccccb6585f71d1eb7c949d64a2af2ced5481d924621424ff3b6a398",+ "bytes": 567024+ },+ {+ "path": "osx-arm64/libcurl-8.23.0-h6651222_0.conda",+ "sha256": "d9f60525b665e50da15c84fcb4e74e6b1f0a56ea4c89a02d4258f23c3fe1f02c",+ "bytes": 425637+ },+ {+ "path": "osx-arm64/git-2.56.0-pl5440h66f49b9_0.conda",+ "sha256": "2faaa571f7da2dd0b17f54ddb8a0437c9bde290af2202257c75ba73889819975",+ "bytes": 13480930+ }+ ]+}diff --git a/freevideo_engine/macos_bootstrap.py b/freevideo_engine/macos_bootstrap.pyindex f9987bb..2f1b0ef 100644--- a/freevideo_engine/macos_bootstrap.py+++ b/freevideo_engine/macos_bootstrap.py@@ -38,6 +38,9 @@ def versions(value):uv=dict(UV, url=UV['sources']['official']), github_probe_url=value['uv']['url'])+GIT_UNAVAILABLE = 'Git is unavailable. Check the network connection, or install Git (Apple Command Line Tools), then retry.'++def available_git():executable = shutil.which('git')if not executable:@@ -86,8 +89,6 @@ def preflight(args, snapshot=None, *, ram_gib=None, vram_gib=None):errors.append('CUDA device and SageAttention build options do not apply to Mac.')if vram_gib is not None:errors.append('Mac has one unified memory pool; use --ram-gib instead of a separate VRAM limit.')- if not snapshot.get('git'):- errors.append('Git is unavailable. Install or repair Git (Apple Command Line Tools), then retry.')total, available = hardware['ram_total'], hardware['ram_available']if any(type(n) is not int or n < 0 for n in (total, available)) or not 0 < total or available > total:raise ValueError('Invalid unified-memory observation')diff --git a/freevideo_engine/macos_setup.py b/freevideo_engine/macos_setup.pyindex 9f6b4c5..cb01083 100644--- a/freevideo_engine/macos_setup.py+++ b/freevideo_engine/macos_setup.py@@ -20,6 +20,19 @@ class Installer(SharedInstaller):def prepare_tools(self):return native.prepare_uv(self.root, self.network, self.env, self.fetch)+ def install_git(self):+ """The system Git when it runs; otherwise Git from conda-forge in FreeVideo's own folder."""+ git = native.available_git()+ if git:+ return+ try:+ self.install_git_conda('git_macos.json', 'git-macos',+ lambda spec: self.fetch_conda_lock(spec, 'git-macos', 'Git'), wrapper=True)+ except Exception as error:+ if self.cancel.is_set():+ raise+ raise RuntimeError(native.GIT_UNAVAILABLE) from error+def component_tasks(self, uv):tasks = {}def task(name, run, after=(), writes=()):@@ -27,6 +40,7 @@ class Installer(SharedInstaller):python = self.pythons['engine']writer = ('environment:unified',)task('python', lambda: self.python_install(uv))+ task('git', self.install_git)task('unified-venv', lambda: None if python.is_file() elseself.command('unified-venv', [uv, 'venv', '--python', native.PYTHON_VERSION, self.root / 'envs/unified']),('python',), writer)@@ -36,12 +50,12 @@ class Installer(SharedInstaller):task('engine', lambda: self.packages('unified-engine', [uv, 'pip', 'install', '--python', python,'--no-deps', '-e', SOURCE]), ('runtime',), writer)task('vdn-source', lambda: self.command('vdn-source', [python, '-c',- 'from freevideo_engine.install import install; install()']), ('unified-venv',))+ 'from freevideo_engine.install import install; install()']), ('unified-venv', 'git'))task('vdn-install', lambda: self.packages('vdn', [uv, 'pip', 'install', '--python', python,'--no-deps', '-e', self.root / 'vendor/vdn' / self.spec['vdn']['diffusers_subdirectory']]),('engine', 'vdn-source'), writer)task('encoder-source', lambda: self.clone('h3-text-encoder',- self.spec['encoder']['comfy_url'], self.spec['encoder']['comfy_commit']))+ self.spec['encoder']['comfy_url'], self.spec['encoder']['comfy_commit']), ('git',))task('models', lambda: self.command('models', [python, '-m', 'freevideo_engine.provision','--plan', self.run_dir / 'plan.json']), ('engine',))return tasks, {'unified': python}, self.root / 'vendor/h3-text-encoder'diff --git a/freevideo_engine/network.py b/freevideo_engine/network.pyindex ea3000a..4b69f81 100644--- a/freevideo_engine/network.py+++ b/freevideo_engine/network.py@@ -395,14 +395,14 @@ def probe_score(row, family):def plan(spec, versions, layout='unified', *, mode='auto', timeout=5, offline=False, env=None,- model_only=False, measure_speed=True, progress=None, proxy_mode='auto'):+ model_only=False, measure_speed=True, progress=None, proxy_mode='auto', git_available=True):from .environments import ENVIRONMENTS, environment_namesenv = proxy_environment(env)started = time.monotonic()if proxy_mode not in proxy.MODES:raise ValueError('Unknown download connection mode')proxy_configured = proxy.configured(env)- git_keys = [] if offline or model_only else proxy.git_proxy_keys(env)+ git_keys = [] if offline or model_only or not git_available else proxy.git_proxy_keys(env)families = ['pypi', 'models', 'vdn-models', 'image-models', 'github', 'git', 'cuda']if spec['models'].get('edge_modelscope'):families.insert(3, 'edge-models')@@ -422,8 +422,15 @@ def plan(spec, versions, layout='unified', *, mode='auto', timeout=5, offline=Faif mode != 'official' and configured_source(group, env):names.insert(0, 'user')selections[family] = []- routes = proxy.routes(env, git=family == 'git', mode=proxy_mode)+ routes = proxy.routes(env, git=family == 'git' and git_available, mode=proxy_mode)jobs += [(family, name, route) for name in names for route in routes]+ # Without a usable Git, any `git` on PATH may be Apple's tool launcher,+ # which opens an installation dialog when run. Leave those sources unmeasured.+ skipped = [job for job in jobs if job[0] == 'git' and not git_available and not offline]+ if skipped:+ jobs = [job for job in jobs if job not in skipped]+ for family, name, route in skipped:+ selections[family].append({'id': name, 'route': route, 'ok': None, 'score': 0, 'scope': 'Git not available yet; not measured'})if offline:for family, name, route in jobs:selections[family].append({'id': name, 'route': route, 'ok': None, 'scope': 'Offline fixture; not measured'})diff --git a/pyproject.toml b/pyproject.tomlindex 2e898f6..0fbe352 100644--- a/pyproject.toml+++ b/pyproject.toml@@ -36,4 +36,4 @@ include = ["freevideo_engine*"][tool.setuptools.package-data]"freevideo_engine.prompt_vlm" = ["model.json"]"freevideo_engine.image_gen" = ["image_models.json", "licenses/NOTICE.txt"]-freevideo_engine = ["stage_estimate_params.json", "build-version.txt", "build-identity.json", "release_notes.json", "dependencies.json", "model_files.json", "model_shares.json", "prepared_models.json", "macos_reference_catalog.json", "superseded_tables.json", "bootstrap_versions.json", "curl_windows.json", "git_linux.json", "gcc_linux.json", "uv_downloads.json", "torch_downloads.json", "test_prompts.json", "windows_bootstrap.ps1", "assets/*.png", "assets/*.ico", "launcher/*.qml", "launcher/licenses/*.txt", "licenses/*.txt", "licenses/runtime/*.txt", "subtitle_pack.json", "frame_preview_weights.json"]+freevideo_engine = ["stage_estimate_params.json", "build-version.txt", "build-identity.json", "release_notes.json", "dependencies.json", "model_files.json", "model_shares.json", "prepared_models.json", "macos_reference_catalog.json", "superseded_tables.json", "bootstrap_versions.json", "curl_windows.json", "git_linux.json", "git_macos.json", "gcc_linux.json", "uv_downloads.json", "torch_downloads.json", "test_prompts.json", "windows_bootstrap.ps1", "assets/*.png", "assets/*.ico", "launcher/*.qml", "launcher/licenses/*.txt", "licenses/*.txt", "licenses/runtime/*.txt", "subtitle_pack.json", "frame_preview_weights.json"]