ComfyUI Extension
Comfyui-Sequential-VideoLoading
ComfyUI node that loads video by time segments, extracts frames and audio, runs speaker diarization and transcription with optional LLM-based dialogue translation. (Description by CC)
pmarmotte2/Comfyui-Sequential-VideoLoading
Nodes—
On cloudLocal install
Stars0
Updated3 months ago
Readme
ComfyUI Sequential Video Loading
LoadVideoSequentially is a custom ComfyUI node that:
- Loads a video by time segments (turn-based)
- Extracts all frames in the selected segment (unless
select_every_nth > 1) - Extracts matching audio for the same segment
- Runs speaker diarization + transcription
- Maps detected speakers to your configured position labels (A/B/C/D)
- Optionally translates dialogue lines with an LLM (Qwen/Gemma-compatible Transformers folders)
What The Node Outputs
images: image batch for the selected time segmentaudio: audio for the selected time segmentturn_used,start_second,end_second,frame_rate- speaker position passthrough strings
dialogue_text: formatted transcript lines, e.g.0:03 Center left character says: ...
Time Segment Logic
For each run:
start_second = (turn - 1) * duration_secondsend_second = start_second + duration_seconds
Example:
duration_seconds = 20turn = 2- Node loads second
20to40
Inputs (Important)
video: source video from ComfyUI input folderduration_seconds: segment length per turnturn: segment index (1-based)select_every_nth: frame skipping (use1for all frames)hf_token: Hugging Face token for pyannote diarizationwhisper_model: Whisper model for transcriptionmerge_consecutive_speaker: merges adjacent lines from same speakercontinue_without_hf_token: allow fallback transcription without diarizationtranslation_language: target language (nonedisables translation)llm_model: model folder fromComfyUI/models/LLM(must includeconfig.json)speaker_a_position ... speaker_d_position: labels used in output text
HF Token Prompt Behavior
If hf_token is empty, a popup appears:
HF Token is not present see node readme for instructions. Continue YES//NO
NO: queue is canceledYES: node proceeds without diarization (transcription fallback)
How To Create A Hugging Face Token (for pyannote)
- Create/login account at https://huggingface.co
- Open token settings: https://huggingface.co/settings/tokens
- Create a new token (Read access is enough)
- Accept model access terms (once) for:
pyannote/speaker-diarization-3.1
- Copy token (starts with
hf_...) - Paste into node input
hf_token
If the token is missing/invalid, diarization may fail and fallback transcription will be used (if allowed).
LLM Translation Notes
- Translation is done line by line.
- Only utterance text is sent to the model.
- Timeline and speaker label prefix are preserved exactly.
Input line:
0:03 Center left character says: Bonjour tout le monde
Translated output:
0:03 Center left character says: Hello everyone
Installation
- Copy this folder to:
ComfyUI/custom_nodes/Comfyui__Load_Video_Sequentially
- Restart ComfyUI
- Hard refresh browser (
Ctrl+F5) to load JS extensions
Requirements
Python packages used by this node include:
opencv-pythonnumpytorchpyannote.audioopenai-whispertransformers
Install missing ones in your ComfyUI Python environment.
Troubleshooting
- Too few frames / accelerated output:
- Set
select_every_nth = 1
- Set
- Single speaker for multi-speaker clip:
- Check valid HF token and pyannote model access
- Translation skipped:
- Ensure selected
llm_modelfolder is a valid Transformers model directory (config.jsonpresent)
- Ensure selected