
Source camera and cartoon-style output from the upstream JoyAI-Video-Edit demo.
Key facts
The benchmark measures inference, not camera-to-screen latency. Output playback adapts to inference throughput.
What the app does
The client publishes its camera, sets an instruction, and sendsstart.
The model reads incoming frames in chunks and sends back edited frames without waiting for a complete video.
It takes the newest camera frames and drops older queued frames so input does not build up behind inference.
Each run keeps one instruction, reference image, and seed.
To change the edit, send reset, set the new instruction, and send start again.
The camera stays connected throughout.
Requirements
- A Reactor account with Serve access, remote builds, and capacity for one B200 and a project configured by Reactor with a 128 GiB host-memory limit.
- The Reactor CLI and Git.
- A browser with a camera, Node.js 22.12 or later, and pnpm for the client.
- An API key for the account that owns the deployment.
1. Prepare the project
Terminal
reactor.yaml, change model.name to your-org/joy-video-edit.
Replace your-org with your account or team slug. Keep the rest of the manifest unchanged.
Create the project before arranging its host-memory allocation:
Terminal
model.resources.memory settings.
2. Deploy the editor
Deploy one B200 instance with enough host memory to load the checkpoint:Terminal
production with the project’s configured resources.
Wait for the deployment to become ready. In another terminal, from the same model directory, follow startup:
Terminal
3. Edit your camera stream
Download the browser client and unzip it. In a separate terminal, open the extracted folder:Terminal
reactor.yaml in .env:
.env
Terminal
Try a different edit
Move in front of the camera and check that the edited video follows you. Change the instruction to “Make everything sepia” and select Apply new edit. The camera stays connected while the model starts a new run with that instruction. The status line reportschunk_complete messages with the frame count and processing time. A run begins with one frame, then usually produces eight per chunk.
Its timing measures model processing, not the full trip from camera to screen.
How the client works
The starter includes the UI, token endpoint, and connection cleanup. These are the SDK calls that connect the camera to the model.Connect and publish the camera
The local/api/session endpoint returns a model-scoped token and model name.
connect() waits until the session is ready before the client publishes its camera:
Connect and publish (selected calls)
Start an edit and change the instruction
The model snapshots the instruction when a run starts. The starter checks replies before sending the next command:Start an edit
Change the edit
reset has no reply payload. Sending set_prompt alone updates the next run, not the active one.
How the model runs
This recipe includes a customDockerfile.
It installs CUDA 13.2.1, Python 3.12, PyTorch 2.14.0, and
Reactor Runtime 3.6.0, then compiles the model’s CUDA kernels.
reactor deploy builds this Dockerfile remotely.
The manifest connects the image to the application and its configuration:
reactor.yaml (selected settings)
joyai_video_edit_dit_0811.pth.
The Dockerfile’s RUNTIME_VERSION must match build.runtime_version.
Recording is disabled because encoding a recording on the model’s GPU reduces inference throughput.
At startup, the model downloads its pinned checkpoints and runs warmup sessions that capture its CUDA graphs.
The CLI waits for the model to finish startup and become ready.
Process camera frames
The application reads camera frames and handles client commands. The model class loads weights and edits each chunk. These excerpts show how the two connect; the full implementation is in the cookbook. The names in these declarations are the names the client publishes and receives:joy_video_edit_types.py (selected declarations)
process_input() waits for start and enough camera frames, then captures the inputs for one inference call.
generate() passes that input to the model:
joy_video_edit.py (generate)
process_output() reports progress before publishing the frames:
joy_video_edit.py (inside process_output)
JoyVideoEditOutput(main_video=result.frames).
The runtime streams those frames to the client on main_video.
Add a reference image
To guide the appearance as well as the instruction, add a file input to the client. With the session connected, upload the selected PNG or JPEG before starting a new run:Apply a reference image
file is the browser File from your input. The reference stays selected across resets until you replace it.
The client contract also covers seed controls, progress messages, and command errors.
Stop the deployment
Select Disconnect to end the session and release the camera. Then, from the cookbook model directory, stop the GPU instance:Terminal
Troubleshoot the first run
Troubleshoot the first run
- Startup takes a while: follow
reactor logs production --followfor checkpoint downloads, model loading, and warmup. A CLI wait timeout does not stop startup. - Model loading runs out of host memory: contact Reactor to check the host-memory allocation for your B200 deployment.
- The client cannot connect: check the API key and qualified model name in
.env, then restartpnpm dev. - The camera works but no edited video appears: check the browser console and model logs. The model needs both a published
cameratrack andstart. - A command returns
already_generating: reset the active run before starting another run or setting a reference image.