-
Notifications
You must be signed in to change notification settings - Fork 0
China Network
zhanglinghao edited this page Oct 3, 2026
·
1 revision
The first runs reach servers abroad: npm, PyPI, Hugging Face, the Chrome that HyperFrames uses, GitHub, and, while rendering, sometimes Google Fonts. Where those are blocked or slow (mainland China, for example), set the mirrors below. This page used to be part of the Chinese README; it moved here on 2026-10-04. 中文
The addresses and variable names were checked against each provider's documentation on 2026-10-01. Mirrors move; if one stops working, go by the official page.
| What | How | Docs |
|---|---|---|
npm packages: the engines' dependencies, each HyperFrames project's node_modules
|
export npm_config_registry=https://registry.npmmirror.com |
npmmirror, npm config |
| Python packages: the sound tools and contact sheets, installed by uv on first use |
export UV_DEFAULT_INDEX=https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple (Tsinghua), or https://mirrors.aliyun.com/pypi/simple/ (Alibaba Cloud) |
Tsinghua PyPI, Alibaba Cloud PyPI, uv environment variables |
| The Qwen3-TTS model (about 2 GB, from Hugging Face) | export HF_ENDPOINT=https://hf-mirror.com |
hf-mirror, huggingface_hub environment variables |
Set the variables before running install.sh or bin/vh: in ~/.zshrc to keep them, or for one command, for example the installer:
curl -fsSL https://raw.githubusercontent.com/ZLHad/OpenVideoHarness/main/install.sh | npm_config_registry=https://registry.npmmirror.com bashDetails:
-
npm. The repo's
package-lock.jsonfiles recordregistry.npmjs.orgaddresses; npm swaps the host for the registry you set (replace-registry-hostdefaults tonpmjs), sonpm cigoes through the mirror too (tested: no request reached npmjs.org). To keep it:npm config set registry https://registry.npmmirror.com. -
uv and pip.
UV_INDEX_URLis the old name, deprecated in uv's docs; useUV_DEFAULT_INDEX. To keep it, put it in~/.config/uv/uv.toml(the same place on macOS and Linux; environment variables win over the file):With pip directly:[[index]] url = "https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple" default = true
pip config set global.index-url https://mirrors.tuna.tsinghua.edu.cn/pypi/web/simple. Tsinghua's other domain,https://pypi.tuna.tsinghua.edu.cn/simple, works too. Alibaba Cloud's page showshttp://withtrusted-host;https://works as well. -
Hugging Face.
HF_ENDPOINTis the variablehuggingface_hubreads, and it's whatbin/vh ttsuses to download Qwen3-TTS. hf-mirror doesn't support logging in: a gated model needs an Access Token from huggingface.co first, passed with--token(see hf-mirror's front page). The default Qwen3-TTS model is public, so none of that applies to it. -
HyperFrames' Chrome. The first
hyperframes renderdownloads chrome-headless-shell fromstorage.googleapis.com(0.8.82 pins 152.0.7977.30). When that is blocked, the terminal spins on "Checking browser…" and finally fails withFailed to download chrome-headless-shell. Install it from npmmirror's binary mirror to where HyperFrames looks, from any HyperFrames project or fromstyles/_swatch:npx browsers install chrome-headless-shell@152.0.7977.30 \ --path ~/.cache/hyperframes/chrome --base-url https://cdn.npmmirror.com/binaries/chrome-for-testingnpx hyperframes browser paththen prints it, and renders stop downloading it (tested: the render log showsBrowser: cache). If that fails too,export HYPERFRAMES_BROWSER_PATH="/Applications/Google Chrome.app/Contents/MacOS/Google Chrome"(macOS; on Linux, the path ofgoogle-chromeorchromium) uses your installed Chrome: it renders, but through the slower screenshot path, which this repo hasn't tested for determinism. -
GitHub.
install.shandreferences/fetch.shclone from GitHub, andtools/fetch_media.shdownloads the showcase videos from a GitHub release. If GitHub is unreliable, install withbash install.sh --no-refsand fetch reference repos one at a time when a doc points at them (references/fetch.sh <name>); git can also go through a proxy:git config --global http.proxy http://127.0.0.1:<port>.
A few things request fonts.googleapis.com while rendering:
-
engines/ClaudeAnimationBase/studio.htmlrequests Permanent Marker for handwriting; hand-drawn and music-video projects (bin/vh new handdrawn,mv) andshowcase/01are copied from it.render.mjswaits for the network to go idle before rendering: if the request hangs, it exits after 30 s withNavigation timeout of 30000 ms exceeded; if it fails at once, it prints oneFailed to load resourceline and renders anyway, with the handwriting in the fallback font (Comic Sans MS). -
showcase/02-short-leo-doppler/index.html, and vertical science shorts modeled on it: Noto Sans SC at weights 500 and 800. - HyperFrames itself: any font in a stack that isn't declared with
@font-faceis requested from Google Fonts on everyrender,snapshotandcheck, even when it's cached in~/.cache/hyperframes/fonts. Names its linter accepts (Arial, Helvetica Neue, Menlo and others) are on that list too: they're swapped for Inter and JetBrains Mono and fetched. A stack that starts with a generic family such assans-serifgets Inter put in front of it. When the request hangs,renderstops at 5 % "Compiling composition" andsnapshotandcheckprint nothing (tested: still waiting after 90–150 s). When it fails at once there is no warning, and Inter is left with only the 400, 700 and 900 weights HyperFrames ships, so a 600 title renders at 700.bin/vh hf-initnow replaces the scaffold's defaultInterwith local fonts declared withlocal()(option 1 below), so new projects make no Google Fonts requests; change older projects the same way.
Three ways to keep fonts local, easiest first:
-
System fonts, no network. The style-sample renderer and the
bin/vh hf-initscaffold do this: declare@font-facein the page's<style>with alocal()source, for example@font-face { font-family: "PingFang SC"; src: local("PingFangSC-Semibold"), local("PingFang SC Semibold"); font-weight: 600; }. Every font in a stack needs such a declaration, and the first one must be declared. Ready-made declarations are instyles/_swatch/fonts.css; on another machine,python3 styles/_swatch/fonts.pyregenerates them from the fonts installed there. Which weights each font has: the "字体" section ofstyles/_swatch/README.md. -
Font files in the project. Put them in
assets/fonts/, declare@font-face { font-family: "…"; src: url("assets/fonts/….woff2") format("woff2"); }in<style>, and record their source and license inNOTES.md. HyperFrames doesn't fetch a font the page declares itself (tested: no requests). -
From npm. Fontsource packages Google Fonts for npm, so the npm mirror above applies:
- The hand-drawn engine:
npm i -D @fontsource/permanent-marker(0.1 MB), then replace thefonts.googleapis.com<link>instudio.htmlwith<link rel="stylesheet" href="node_modules/@fontsource/permanent-marker/index.css">. Tested with Google Fonts blocked: the font loads within a second. - Noto Sans SC:
npm i -D @fontsource-variable/noto-sans-sc(a variable font of about 5 MB covering weights 100–900),<link rel="stylesheet" href="node_modules/@fontsource-variable/noto-sans-sc/wght.css">in the page, andfont-family: "Noto Sans SC Variable". Showcase 02 changed this way renders pixel-identical HyperFrames snapshots (tested at three moments); snapshot prints[StaticGuard] … Font family used without @font-face declaration, but the font is loaded and the warning can be ignored.
- The hand-drawn engine: