Generated by flyhigh-dev options-doc from the option declarations in the engine (#[derive(Options)], ARCHITECTURE.md):
edit the doc comments there, not this file; CI fails when it is stale.
Every option has a default: a host that passes nothing gets the configuration below. Change an option only for the
reason in its row. The same options exist in every API: Rust takes the structs named in each section, C the
Fh*Options structs (start from fh_*_options_default(); the field in the last column), JavaScript the options objects
of the classes (api-js.md).
Fixed when the engine (the device) is created; the sessions and streams on it inherit them. A host that passes nothing gets the platform's best backend and adapter, the f16 kernels, the tensor-core kernels where the GPU exposes them and an autotune at the first build of every frame size. In the browser only precision, tensor_cores and autotune apply: the browser picks the backend and the adapter. from_env adds the developer overrides (FH_*, docs/development.md) the CLI tools honour; library hosts pass the options explicitly.
| Option | Default | Values | What it does, when to change it | C |
|---|---|---|---|---|
backend |
automatic | automatic, Vulkan, DX12, Metal, OpenGL | wgpu backend. Automatic picks the platform's best (Vulkan on Windows and Linux, Metal on macOS, WebGPU in the browser). Force DX12 when presenting through DirectComposition or sharing D3D12 resources; it needs the DXC DLLs beside the library (dxc_path, docs/platforms.md). |
backend (0 automatic, 1 Vulkan, 2 DX12, 3 Metal, 4 OpenGL) |
tensor_cores |
on | on, off | Use the cooperative-matrix kernels where the GPU and driver expose them (NVIDIA on Vulkan today). Off = the portable kernels, the same ones the browser runs, within a few percent on this network. | tensor_cores (0, 1) |
autotune |
on | on, off | When a session is built, time every applicable conv kernel per layer shape and keep the fastest: a few seconds per new frame size at build time (0.9 s at 1080p on an RTX 4060 Ti over Vulkan, 9.6 s over DX12), faster frames after. Off = the fixed kernel routing. Native only; the browser tunes explicitly. | autotune (0, 1) |
adapter |
the high-performance GPU | low-power, #N, vvvv:dddd, part of the name | Which GPU. low-power for the integrated one, #N for an index in list_adapters(), vvvv:dddd for a PCI vendor and device in hex, any other text for a case-insensitive part of the adapter name (4060, radeon). An unknown selector fails with the list of adapters. Native only. |
adapter (NULL = default) |
precision |
automatic | automatic, f16, f32 | Tensor precision. Automatic uses f16 where the GPU has shader-f16 and the f32 path elsewhere (GTX 10xx and other GPUs without f16 arithmetic, WebGPU without the feature), so the engine runs there instead of failing. f32 moves twice the bytes and costs a few percent on the fast render path (1080p pair 1.45 against 1.40 ms on an RTX 4060 Ti); the pictures match within rounding (full-graph parity 84 dB against 72 dB with f16). Tensor cores need f16. | precision (0, 1, 2) |
tune_cache |
none (in memory) | a directory | Where the autotune results persist, one file per GPU, driver, precision, kernel set and engine version. The first build on a GPU times the kernels (a few seconds; 20 to 30 s on a laptop GTX 1650), later starts reuse the choices (1080p plan build 1.6 s to 10 ms). None = in memory for this process only. Native only. | tune_cache (NULL = none) |
compact_memory |
on | on, off | Small blocks from the GPU memory allocator. At 1080p the engine's buffers take about 100 MB; with large blocks (off) the allocator keeps 512 MB reserved and never hands it back, with small blocks about 190 MB. Matters when a game fills the video memory: the driver starts moving memory and both stutter. | compact_memory (0, 1) |
dxc_path |
beside the library | a directory, or dxcompiler.dll itself | Windows, DX12 only: the directory (or the file) of dxcompiler.dll, with dxil.dll beside it. By default the engine looks beside its own module (the executable, or flyhigh.dll), then wgpu looks on the DLL search path, and without the DLL the kernels go through FXC: the set compiles in minutes instead of seconds and has no shader-f16, so the f32 kernels run. DeviceInfo::shader_compiler says which one loaded. |
dxc_path (NULL = default) |
Fixed when a session is built; changing one means a new session (tens of milliseconds, plus the autotune at the first build of a new size). The Stream takes the same options in Stream::open, the CPU convenience api::Options mirrors them. validate() names the field and the reason when one is out of range.
| Option | Default | Values | What it does, when to change it | C |
|---|---|---|---|---|
width |
(required) | >= 64 | Width of the source frames and of the generated frames, at least 64. | width |
height |
(required) | >= 64 | Height of the source frames and of the generated frames, at least 64. | height |
internal |
automatic | automatic, frame, w x h (32 x 32 up to the frame) | Resolution the network runs at; only the final render runs at the frame size. Automatic: the frame itself up to 960 px on the long side, above that the 480-line rung (1920 x 1080 runs at 856 x 480). The model is trained at that scale: raising it above about 540 lines makes the motion estimates worse, not better, and costs more. Lower it only to save GPU time. | internal_w, internal_h (0, 0 = automatic) |
k |
1 | 1 to 3 | Refinement passes of the fine flow. 2 costs about 20% more GPU time for a small gain on hard motion; 3 rarely helps. | k |
repair |
1 | 0, 1, 2 | Periodic-structure repair of the flow (fences, railings, window grids under a camera pan). 1 = safe: only switches where the motion clearly jumped by a period; measured neutral or better on games, anime and natural video; costs about 0.2 ms per source pair at the default network size on an RTX 5090, 0.6 ms on an RTX 4060 Ti with the network at 720p. 2 = aggressive: better on drawn content (+0.4 dB on the anime test clip), worse on natural video (about -0.8 dB). 0 = off. | repair |
render |
the model's | model, bilinear, bicubic | How the source frames are sampled when the in-between is rendered. The model manifest says what it was trained with (the shipped model: bicubic). Override only to compare. | render (0, 1, 2) |
static_protection |
frames 8, tolerance 4 | off, or frames 1 to 255 with tolerance 0 to 255 | Keeps what did not move still: pixels unchanged for the last frames source frames that also stayed put while the picture around them moved, twice (a game's HUD, the crosshair, chat, burnt-in subtitles, a logo), are taken from the source frames instead of being warped with the motion behind them; tolerance is the largest per-channel change still counted as unchanged. On for games and screen capture with the defaults, frames 8 and tolerance 4, which also suit streamed (compressed) video: a looser tolerance or fewer frames hold parts of the moving picture as overlays. Nothing is protected for the first frames frames after a session starts or an overlay appears, nor in the first in-between after the camera starts moving. |
keep_static (0, 1), static_frames, static_tolerance |
fast_render |
off | on, off | Renders the in-between straight from the source textures into the output (one RGBA texel per tap, no full-resolution intermediate). The same picture as the exact render (38.16 against 38.16 dB on the natural set), 30 to 40% cheaper per generated frame. Needs an internal size below the frame size; the texture path only. | fast_render (0, 1) |
linear_t |
off | on, off | With fast render: the t-dependent part of the network runs once per source pair (at t = 0.5) and the other phases scale its motion linearly, so each further generated frame is only a render (0.95 to 0.21 ms at 1080p on the portable kernels). Phase quality on 60 fps video unchanged (t = 0.25 / 0.5 / 0.75: 40.58 / 39.63 / 40.83 dB against 40.54 / 39.64 / 40.83 exact); motion that bends within one source interval is followed less closely. | linear_t (0, 1) |
keep_maps |
off | on, off | Keep the repair stage's maps after the pair: the Stream's cadence re-timing reads them. Raises repair to 1. |
keep_maps (0, 1) |
protection_mask |
off | on, off | The host paints a mask of pixels never to interpolate (write_mask: one byte per pixel, 0 interpolates, anything else protects): a HUD, a crosshair, subtitles whose place the host knows. Protected pixels take the source frames' value like statically protected ones, and the render keeps the motion around them off them. Works with or without static_protection; a rewritten mask applies from the next pair. |
protection_mask (0, 1) |
nearest_source |
off | on, off | Where the two warped frames disagree over a whole region (a flick the network could not follow), the in-between takes the nearer source frame alone there: a short hold instead of the fog of two misplaced copies. Off by default: on captured 120 fps video it costs 0.53 dB and gains no sharpness; a host whose viewers prefer the hold on fast turns turns it on. The environment variable FH_NEAR=1 sets the default to on. |
none (FH_NEAR=1 in the environment) |
precise_motion |
off | on, off | Frames above 1280 px on the long side: the motion is found on a 400-line picture and refined on an 800-line one (internal Auto picks that size), instead of one pass at 480 lines. On captured 1080p 120 fps video (UVG, 14 clips) 33.83 against 33.42 dB and LPIPS 0.159 against 0.165; on synthetic 1080p pans and moving objects 35.41 against 33.35 dB. Costs GPU time: 1.94 against 1.06 ms per generated frame at 1080p on an RTX 5090. No effect on smaller frames or with fast_render. The environment variable FH_PRECISE=1 sets the default to on. |
none (FH_PRECISE=1 in the environment) |
tune |
none | an autotune table | Kernel choices from an earlier autotune on this device at this size (the text of a TuneTable); without one the engine tunes at the first build, or uses the fixed routing when the autotune is off. |
tune (text, NULL = none) |
How source frames with timestamps become generatable intervals (ARCHITECTURE.md); fixed when the stream opens. The session options travel beside them in Stream::open.
| Option | Default | Values | What it does, when to change it | C |
|---|---|---|---|---|
mode |
realtime | realtime, video | Realtime: no lookahead, the in-betweens of the previous and the newest frame; for games and capture. Video: one source frame of lookahead (one frame more latency), the interval that can be generated starts two frames back; cadence re-timing needs it. | mode (0, 1) |
cadence |
off | on, off | Video mode only. Anime is often drawn on twos (each drawing held for two frames) over a camera pan on every frame; with cadence on, held elements are re-timed onto a smooth path. Presented frames are then generated in-betweens, the real drawings included, except where the model could not match the frames (there the real drawing stays): big drawing steps show the generator's softness more often. A choice for the viewer, not a default. Needs repair at least 1 (0 is raised to 1). | cadence (0, 1) |
scene_cut |
threshold 0.08 | off, or a threshold 0 to 1 | Detects cuts from the mean per-channel difference on a 48 x 27 grid and detects abrupt brightness steps from spatially coherent changes. The player shows source frames across these transitions. Off disables both checks. | scene_cut (threshold, 0 = off) |
held_frames |
off | off, or mean and max thresholds 0 to 1 | A pair whose mean difference is below mean and whose most different cell is below max is a held frame: shown as is and counted for the unique-frame rate, instead of a still in-between. The first change after a held frame is then shown as drawn too (animation on twos and threes is not motion), unless cadence re-timing spreads it. On for anime; the defaults 0.0033 and 0.06 stay above codec noise on a re-encoded hold. |
held_frames (0, 1), held_mean, held_max |
inputs |
4 | Input slots created up front (more with add_input); the Pacer's history says how many a host needs. |
inputs |
|
outputs |
4 | Output slots created up front (more with add_output). |
outputs |
Every heuristic of the Pacer (ARCHITECTURE.md) with its default: what to present on a display tick and what to generate for the coming ones. Times in milliseconds, rates in Hz. They may change live (set_options); the defaults are tuned on the recorded sessions in crates/flyhigh-engine/tests/traces/.
| Option | Default | Values | What it does, when to change it | C |
|---|---|---|---|---|
mode |
Auto | Auto, Factor(n), DisplayHz, Target(fps) | How many frames to generate per source frame: a fixed factor (benchmarks and players that want exactly 2x), Auto (as many as the display and the GPU allow, capped by motion: whole factors where the display runs at a whole multiple of the source rate, else every tick or every nth tick of the display at its own media time, so 24 fps on a 60 Hz display is 60 even pictures and not 48 uneven ones), the display's rate, or a target rate. | mode (0 auto, 1 factor, 2 display Hz, 3 target), factor, target_fps |
max_factor |
6 | 1 to 6 | The ceiling of Auto. | max_factor |
fps_limit |
off | off, or a rate | Auto capped at this many presentations per second: a strict ceiling, never raised to the 2x floor. Off = the display's rate. | fps_limit (0 = off) |
lookahead |
off | on, off | The generated interval is one source frame back: the Stream's video mode with its lookahead, where the real slot may still be re-timed. | lookahead (0, 1) |
limit_to_display |
on | on, off | The measured refresh rate is a ceiling on the output rate. Off lets the GPU generate above it; the extra frames are superseded, not dropped. | limit_to_display (0, 1) |
fill_display |
off | on, off | The exact modes use the whole rate of a host that cannot present on every tick, instead of leaving the headroom (a display's own rate is used whole either way). | fill_display (0, 1) |
display_headroom |
0.97 | 0.9 to 1 | Fraction of the presentation rate Auto's factors, a capped Auto and a host with a present limit may use; the rest absorbs hitches. A display's own rate and its whole fractions are used exactly (every tick one frame). | display_headroom |
compute_budget |
0.9 | 0 to 1 | Fraction of the source interval the GPU may spend per interval; the factor is capped so the measured costs fit. | compute_budget |
delay_floor_ms |
60 | The least presentation delay: how far ahead of their arrival source frames are shown, so that their in-betweens have time to be generated. | delay_floor_ms |
|
low_latency |
off | on, off | For games and anything driven by a hand on a mouse: the presentation delay is the least that still lets the in-betweens be generated, (1 - 1/N) of a source interval at factor N plus the measured pair and frame cost, and the arrival jitter, instead of the video window (delay_floor_ms) with its 25 ms reserve. At 60 fps that is 10 to 15 ms instead of 60. Auto and a fixed factor; the exact modes keep their own delay. |
low_latency (0, 1) |
delay_max_ms |
180 | The most presentation delay the controller may grow to (the exact modes may grow further, to 2500). | delay_max_ms |
|
lateness_intervals |
3 | How late a frame may still be shown, in output intervals; later ones are dropped for the newest due one. | lateness_intervals |
|
queue_capacity |
24 | Pending presentations the queue holds. | queue_capacity |
|
pressure_tau_ms |
300 | Memory of the drop pressure integrator: how long a drop keeps weighing. | pressure_tau_ms |
|
penalty_up |
1.2 | Pressure that costs Auto one step of factor. | penalty_up |
|
penalty_burst |
3 | Pressure that costs two steps at once. | penalty_burst |
|
penalty_min_gap_ms |
500 | The least time between two penalties. | penalty_min_gap_ms |
|
penalty_max |
3 | The most steps Auto may be penalised below its ceiling. | penalty_max |
|
recovery_after_ms |
6000 | Clean time (pressure below 0.15) before Auto recovers one step. | recovery_after_ms |
|
stall_window_ms |
20 | Drops within this window after a host stall are not charged to the GPU. | stall_window_ms |
|
stall_rate_limit |
4 | Stalls per 2 s above which they stop being exempt: that often, the GPU is the problem after all. | stall_rate_limit |
|
settle_ms |
1200 | Drops exempt after a mode change (fullscreen, resize): the reflow stall is not a GPU limit (the extension's measured fullscreen reflow). | settle_ms |
|
motion_adaptive |
on | on, off | Fewer in-betweens on fast scenes, where they are worth less and cost the same. On a display that runs at a whole multiple of the source rate the limit rounds up to a factor that lands evenly on its ticks. | motion_adaptive (0, 1) |
min_present_interval_ms |
0 | The host's present spacing limit: presentations closer than this are held to it. The Firefox adapter sets 7 (its compositor stalls 40 to 90 ms below that); 0 = none. | min_present_interval_ms |
|
playback_rate |
1 | Media seconds per wall second (a player's speed). | playback_rate |
|
mid_cost_seed_ms |
10 | The GPU cost assumed per generated frame until the first measurement (10 ms at 848 x 480; scale with the output resolution). | mid_cost_seed_ms |
|
pair_cost_seed_ms |
4 | The pair cost assumed until the first measurement. | pair_cost_seed_ms |
|
gpu_timestamps |
on | on, off | The host measures GPU time with timestamp queries: cost probes are only useful when their cost comes back. Off = the seeds stay. | gpu_timestamps (0, 1) |