A ComfyUI custom node for automatic video scene segmentation using TransNetV2.
This node segments videos into individual scenes automatically using the TransNetV2 deep learning model. TransNetV2 is a state-of-the-art neural network for shot boundary detection in videos.
Clone or download this repository to your ComfyUI custom_nodes directory:
D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Video-Segmentation\
Install required dependencies:
pip install -r requirements.txt
Install FFmpeg (required for video processing):
sudo apt-get install ffmpegbrew install ffmpegDownload TransNetV2 model weights (for best performance):
transnetv2-weights directory from TransNetV2 repositoryAlternative TransNetV2 installation:
pip install transnetv2
Restart ComfyUI
pip install transnetv2pip install opencv-python (used as fallback)The node first attempts to use TransNetV2 for scene detection. TransNetV2 is a neural network specifically designed for shot boundary detection and provides superior accuracy compared to traditional methods.
If TransNetV2 is not available, the node falls back to an OpenCV-based scene detection algorithm that:
segment_000.mp4, segment_001.mp4, etc.If you see errors about TransNetV2 not being found:
pip install transnetv2For video segmentation, FFmpeg is required:
conda install ffmpegEnsure the output directory is writable and you have sufficient disk space for the segmented videos.
This project is licensed under the same terms as ComfyUI. Please refer to the original TransNetV2 license for the underlying model.
4 commits
Python
100.0%
A ComfyUI custom node for automatic video scene segmentation using TransNetV2.
This node segments videos into individual scenes automatically using the TransNetV2 deep learning model. TransNetV2 is a state-of-the-art neural network for shot boundary detection in videos.
Clone or download this repository to your ComfyUI custom_nodes directory:
D:\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-Video-Segmentation\
Install required dependencies:
pip install -r requirements.txt
Install FFmpeg (required for video processing):
sudo apt-get install ffmpegbrew install ffmpegDownload TransNetV2 model weights (for best performance):
transnetv2-weights directory from TransNetV2 repositoryAlternative TransNetV2 installation:
pip install transnetv2
Restart ComfyUI
pip install transnetv2pip install opencv-python (used as fallback)The node first attempts to use TransNetV2 for scene detection. TransNetV2 is a neural network specifically designed for shot boundary detection and provides superior accuracy compared to traditional methods.
If TransNetV2 is not available, the node falls back to an OpenCV-based scene detection algorithm that:
segment_000.mp4, segment_001.mp4, etc.If you see errors about TransNetV2 not being found:
pip install transnetv2For video segmentation, FFmpeg is required:
conda install ffmpegEnsure the output directory is writable and you have sufficient disk space for the segmented videos.
This project is licensed under the same terms as ComfyUI. Please refer to the original TransNetV2 license for the underlying model.
4 commits
Python
100.0%