Skip to main content

Developing nodes for Scope

Create your own Scope nodes to add custom pipelines, preprocessors, or postprocessors. This guide walks through building a node from scratch with working examples.

Prerequisites

  • Python 3.12 or newer
  • uv package manager
  • Scope installed locally for testing

Project Setup

Create a new directory with the following structure:

pyproject.toml

The [project.entry-points."scope"] section registers your node with Scope. The key (my_scope_node) is your node name, and the value points to the module containing your hook implementation.
If your node needs additional third-party packages, add them to [project.dependencies] in pyproject.toml - Scope installs them automatically. You don’t need to declare packages that Scope already provides (e.g. torch, pydantic) since they’re available from the host environment.

node.py

The register_pipelines hook is called when Scope loads your node. Call register() for each pipeline class you want to make available.

Creating a Text-Only Pipeline

A text-only pipeline generates video without requiring input video. This is the simplest type of pipeline.

Example: Color Generator

This pipeline generates solid color frames based on configurable RGB values. pipelines/schema.py:
pipelines/pipeline.py:
Key points:
  • No prepare() method: Text-only pipelines don’t need to request input frames
  • modes = {"text": ModeDefaults(default=True)}: Declares this pipeline only supports text mode
  • __call__ returns {"video": tensor}: Tensor must be in THWC format with values in [0, 1] range
  • Runtime parameters are read from kwargs: Parameters like color_r are passed to __call__() and should be read using kwargs.get()

Creating a Video Input Pipeline

A video input pipeline processes incoming video frames. It must implement prepare() to tell Scope how many input frames it needs.

Example: Invert Colors

This pipeline inverts the colors of input video frames. pipelines/schema.py:
pipelines/pipeline.py:
Key points:
  • prepare() returns Requirements(input_size=N): Tells Scope to collect N frames before calling __call__
  • modes = {"video": ModeDefaults(default=True)}: Declares this pipeline only supports video mode
  • video parameter: A list of tensors, one per frame, each with shape (1, H, W, C) in [0, 255] range
  • Output normalization: Input is [0, 255], output must be [0, 1]

Adding UI Parameters

Expose pipeline parameters in the Scope UI by adding fields to your config with ui_field_config().

Example: Adding an Intensity Slider

Then read the parameter in __call__():

ui_field_config Options


Load-time vs Runtime Parameters

Parameters behave differently depending on is_load_param: Load-time parameters are passed when the pipeline loads and require a restart to change. Use for resolution, model selection, device configuration. Runtime parameters are passed to __call__() on every frame. Use for effects, strengths, colors.
Runtime parameters must be read from kwargs in __call__(), not stored in __init__():

Creating Preprocessors

Preprocessors transform input video before the main pipeline processes it. Useful for generating control signals (depth maps, edges) for VACE V2V workflows.
Preprocessors must:
  • Set usage = [UsageType.PREPROCESSOR]
  • Use modes = {"video": ModeDefaults(default=True)} (video input required)
  • Implement prepare() returning Requirements(input_size=N)

Testing Your Node

1

Install locally

In the Scope desktop app or UI, install your node using the local path to your node directory.
2

Make changes

Edit your node source code as needed.
3

Reload

Click the reload button next to your node in the Settings dialog.
4

Test

Select your pipeline and verify it works as expected.
In the desktop app, you can use the Browse button to select your local node directory. Without the desktop app, run pwd in the node directory to get the full path to paste into the install field - this also works if you are running the server on a remote machine (e.g. RunPod).

See Also

Using Nodes

Install and manage nodes

Pipeline Architecture

Technical details of the pipeline system

Node Architecture

How node discovery, installation, and lifecycle work

Tutorial: Build a VFX Node

Step-by-step tutorial building a complete node from scratch