Skip to main content

Loading a pipeline via the server API

Before streaming video, you need to load a pipeline. Pipeline loading is asynchronous - the API initiates loading and returns immediately, so you must poll for completion.

Overview

Loading a pipeline:
  1. Loads model weights to GPU memory
  2. Initializes the inference pipeline

Load a Pipeline

Request Body

To load a pipeline with a preprocessor, include the preprocessor ID before the main pipeline in the pipeline_ids array:

Load Parameters


Check Pipeline Status

Poll the status endpoint to know when loading completes:

Response Format

Status Values


Wait for Pipeline Ready

Complete example that loads a pipeline and waits for it to be ready:

Switching Pipelines

When you load a different pipeline (or the same pipeline with different parameters), the previous pipeline is automatically unloaded:

LoRA Configuration

Load LoRA adapters at pipeline load time:
With runtime_peft mode, you can update LoRA scales during streaming via the data channel. See Send Parameters for details.

Preprocessor Configuration

Preprocessors can be configured to automatically process input videos before they reach the main pipeline. For example, the video-depth-anything preprocessor can generate depth maps from source videos in real-time for use with VACE V2V. To configure a preprocessor, include it in the pipeline_ids array before the main pipeline:
The preprocessor will automatically process input videos and pass the results to the main pipeline. When using VACE V2V with a preprocessor, the preprocessor’s output (e.g., depth maps) will be used as the control video.
Currently, only the video-depth-anything preprocessor is available. Additional preprocessors will be available via nodes in the future.

VAE Types

The vae_type parameter controls which VAE (Variational Autoencoder) is used for encoding pixels to latents and decoding latents to pixels. Different VAE types offer tradeoffs between quality, speed, and memory usage. See VAE Types for detailed descriptions of each type.

Error Handling


See Also

Receive Video

Start streaming after pipeline loads

Send Parameters

Update parameters during streaming