Load Video (Path) 🎥AniPortrait
Load a Video by Absolute Path and Get Frames, FPS, and Audio in One Shot
- video
- frames
- frame_per_second
- audio
Every AniPortrait pipeline needs a driving video - a clip whose face motion gets copied onto your reference portrait. AniPortrait_LoadVideoPath is the pack's path-based way to pull that video in, and it does the job in one node instead of the usual two or three: it hands you the frames as an IMAGE batch, the frame rate, and the audio track.
What it's for
The author of this pack moved to Video Helper Suite (VHS Load Video) as the recommended way in, and that's honestly the better default - it's WYSIWYG, lets you pick files in the UI, and drops straight into the ecosystem. This node is the "give me an absolute filesystem path" alternative: type (or paste) the path to your .mp4, and it validates that the file exists and has a supported extension before doing anything. Some people prefer it because it never touches the file picker, and it plays nicer when you're scripting or reusing the same clip.
How it works
Under the hood it's PyAV (av==11.0.0, pinned in requirements.txt) decoding the whole video into a list of PIL frames, plus a read of the stream's average frame rate. It's a simple loader - no caching, no frame-limit widget - which means a long video becomes a big IMAGE batch sitting in memory. Keep clips short for your own sanity.
Inputs and outputs
Just one required input: video, a STRING defaulting to X://insert/path/here.mp4. Type your actual path there. If it doesn't resolve, the node raises a clear "video is not a valid path" error rather than silently failing.
Four outputs, and you'll use at least two:
- frames (IMAGE) - every decoded frame. This feeds
AniPortrait_Video_Gen_Posein the self-driven pose workflow, or theimagesinput ofAniPortrait_Audio2Videoin the face-reenactment workflow. - frame_per_second - the clip's FPS, wired into
AniPortrait_Audio2Video'sfpsinput for reenactment (where it's used to decide whether to drop every other frame of a 60fps source). - video - the path itself, passed through as the custom
AniPortrait_Videotype. Mostly there for chaining to other nodes that want the path. - audio - the audio track handed over as an
AniPortrait_Audiopath (an intermediate.aacin your ComfyUI output directory). The README notes these intermediate files get cleaned up as they're consumed.
Gotchas
Square input, again. The README's warning applies to the whole pack: upload video that's roughly 512×512, or the landmark extraction gets weird - a landscape 1920×1080 clip will be squeezed into whatever the pose nodes resize to. And this node gives you the frames, but it won't crop a face for you: pick a clip where the face is centered and visible, or your landmark map will be off.
Install
It ships with the pack, so install the pack once:
cd ComfyUI/custom_nodes
git clone https://github.com/frankchieng/ComfyUI_Aniportrait
cd ComfyUI_Aniportrait && pip install -r requirements.txt
or search "ComfyUI_Aniportrait" in ComfyUI Manager. Restart ComfyUI after. The heavy lifting (models for rendering) happens downstream - this node itself is just a loader, so it's one of the least intimidating places to start if you're poking at this pack.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| video | STRING | X://insert/path/here.mp4 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| video | AniPortrait_Video | — |
| frames | IMAGE | — |
| frame_per_second | Frame_per_second | — |
| audio | AniPortrait_Audio | — |