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
[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
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:- 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 likecolor_rare passed to__call__()and should be read usingkwargs.get()
Creating a Video Input Pipeline
A video input pipeline processes incoming video frames. It must implementprepare() to tell Scope how many input frames it needs.
Example: Invert Colors
This pipeline inverts the colors of input video frames. pipelines/schema.py:prepare()returnsRequirements(input_size=N): Tells Scope to collect N frames before calling__call__modes = {"video": ModeDefaults(default=True)}: Declares this pipeline only supports video modevideoparameter: 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 withui_field_config().
Example: Adding an Intensity Slider
__call__():
ui_field_config Options
Load-time vs Runtime Parameters
Parameters behave differently depending onis_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.
Creating Preprocessors
Preprocessors transform input video before the main pipeline processes it. Useful for generating control signals (depth maps, edges) for VACE V2V workflows.- Set
usage = [UsageType.PREPROCESSOR] - Use
modes = {"video": ModeDefaults(default=True)}(video input required) - Implement
prepare()returningRequirements(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.
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