Skip to main content
Your weights are not part of the container image. Reactor keeps them separately and mounts them into the container when it starts, so a release that only changes code reuses the weights it already has. Your model reads them once, in load(), from a path the runtime gives it.
A timeline. The container starts, load() runs once and reads from a weights folder through get_weights_path(), then session 1, session 2, and more follow, each running generate() repeatedly.

load() runs once when the container starts and reads the weights the runtime mounted. Everything after that is sessions.

Loading

get_weights_path() returns the folder your checkpoints live under.
Your model uses the same code to load weights during local testing and when deployed on Reactor. Only the folder the path resolves to changes.

How the runtime finds your weights

The model needs its weights in both places. On Reactor, the runtime points get_weights_path() at the bundle uploaded with the release, so there is nothing to configure. Locally, you tell reactor run where they are, in one of three ways. When more than one is set, the first in this list wins:
1

The --weights flag

Pass --weights to run with the weights in that directory.
2

$REACTOR_WEIGHTS_PATH in your shell

Set REACTOR_WEIGHTS_PATH once to use the same directory for every run.
3

runtime.weights_path in reactor.yaml

Put the path in reactor.yaml when the weights live inside the workspace, so anyone who clones it can run the model with no flags. This is what the scaffold uses.
reactor.yaml
A relative path resolves against the workspace folder, so ./weights is <workspace>/weights wherever you launch from.
Whichever you set, get_weights_path() returns that folder inside the container, so the loading code above needs no change. reactor run does this by mounting the folder and setting REACTOR_WEIGHTS_PATH to the mount point. With none set, nothing is mounted and the runtime falls back to ~/.cache/reactor_registry inside the container. To use weights from a Hugging Face repository, pass hf://org/repo[@rev] in place of a folder in any of the three. reactor run pins the revision, fetches it through your Hugging Face cache, and mounts the result. See reactor run for the cache rules and the download prompt.
When reactor run itself runs inside a container, set REACTOR_HOST_WEIGHTS_PATH to the real path on the host so the mount works. reactor run lists what it overrides.

Shipping weights with a release

Publishing a release uploads the weights alongside the image, and reactor weights upload swaps the weights on a release without rebuilding it. Size is not a limit: the upload streams files, and bundles of hundreds of gigabytes are fine.
Symlinks are rejected, at the root and anywhere inside the tree. Resolve them before you publish, with cp -L or tar --dereference.

Publish a release

How publish picks up weights, uploading them later with reactor weights upload, pinning a Hugging Face revision, and carrying a previous release’s weights over.

Next

Managing State

The state object your model reads on every step, and how clients set it.

Session Recording

Record sessions and let clients capture clips.