Video To Images
Burst a video into ComfyUI frames — upload or path mode, start frame and all
- images
- total_frames
- fps
- video_info
Any frame-by-frame workflow starts the same way: get the video's frames into ComfyUI as an IMAGE batch. AutoFlowVideoToImages (shown as "Video To Images") does that in one node - with an upload button, a loop preview in the node, and control over exactly which frames you pull. It's the entry point for img2img-style video work, frame-by-frame upscaling, or feeding frames into a video model.
Underneath it's OpenCV (cv2.VideoCapture) doing the reading: it opens the file, grabs the source's total frame count, fps and dimensions up front, converts each frame BGR→RGB, normalizes to 0–1 floats, and stacks everything into a single IMAGE tensor. No ffmpeg, no separate pre-extraction step.
Inputs:
use_path_mode(bool, default false) -falsemeans upload mode: pick a video already sitting in ComfyUI'sinputfolder (or use the node's browse/upload button and its built-in loop preview).truemeans path mode: type a full path likeD:/videos/my_video.mp4and it'll read a video from anywhere the machine can reach.video_upload- the dropdown of videos found in ComfyUI's input directory (upload mode).video_path- the full path string (path mode).start_frame(int, default 0) - the zero-based frame to start reading at.frame_count(int, default -1) - how many frames to pull;-1means "the rest of the video."
Outputs:
images- the IMAGE batch, ready to wire into whatever eats frames.total_frames- INT, the number of frames actually read.fps- INT, the source's frame rate.video_info- a STRING summary likeVideo: clip.mp4 | 1280x720 | 30fps | 300 frames. Handy for a display node or logging.
Where people get burned:
total_framesis frames read, not the source's total length. Withstart_frame=100andframe_count=50, you get 50 back, not the video's length. The node clamps to the end of the file, so you can also request more than exists and get whatever's left.fpsis an int. A 29.97 fps clip reports 29. Fine for most purposes; don't use it to compute exact durations.- Audio doesn't exist here. Frames only. If you need sound re-muxed on the other end, keep the source file around.
- Upload mode needs the file in ComfyUI's input folder (or use the node's upload button). Path mode happily reads anything the machine can reach, which is the flexible option for batch automation.
- The pack imports OpenCV at load time. If
opencv-pythonis missing from your Python env, every node in the pack fails to register, string and timestamp nodes included. A stock ComfyUI ships it, so this is more a "what to check if the pack won't load" note than a real risk.
Once you have the frames, the downstream is wide open: process each one, run an interpolation or image-to-video pass, or pair it with the pack's own alpha/transparent-video tools for green-screen-style output.
Install
Part of the ComfyUI-AutoFlow pack. Use ComfyUI Manager (search ComfyUI-AutoFlow) or:
cd ComfyUI/custom_nodes
git clone https://github.com/ZXL-Xinram/ComfyUI-AutoFlow
Restart ComfyUI, then look under the AutoFlow category. No requirements.txt, no model downloads - the pack leans on torch, numpy, Pillow and opencv-python, all of which a stock ComfyUI installs. The frontend upload button and preview live in the pack's web/ directory and load automatically.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| use_path_mode | BOOLEAN | false | — |
| video_upload | COMBO | 1 options: | |
| video_path | STRING | — | |
| start_frame | INT | 00–999999 | — |
| frame_count | INT | -1-1–999999 | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| images | IMAGE | — |
| total_frames | INT | — |
| fps | INT | — |
| video_info | STRING | — |