Nodes/Comfyui_Attome_S3/Attome S3 Load Video
ComfyUI Node

Attome S3 Load Video

Turn an S3 video into a frame batch, without the download dance

By attome-ai·Created 9 months ago·Updated 8 months ago· 4
Attome S3 Load Video
  • s3_config
  • frames
  • frame_count
  • fps
s3_keypath/to/video.mp4
frame_start0
frame_count0
skip_frames0

Video work in ComfyUI starts with a frame batch - a single IMAGE tensor where each row is one frame. Attome S3 Load Video is the node that builds that batch from an MP4 sitting in a bucket: it downloads the video, extracts the frames, and hands you the tensor plus the frame count and the real FPS. No manual download, no Load Images node pointed at a folder you had to fill by hand.

It's part of Comfyui_Attome_S3, and it's what makes workflows like "render a video on one machine, feed its frames to an img2vid upscaler on another" actually work. Central storage turns into a pipeline, which is the whole reason this pack exists.

How it works

boto3 downloads the object to a temp file, then OpenCV (cv2.VideoCapture) reads it frame by frame, converting BGR→RGB and normalizing to a 0–1 float tensor in ComfyUI's BHWC layout. fps comes straight from the file's metadata, not a guess. The temp file is deleted after extraction, so no disk clutter.

Inputs and outputs

  • s3_key (required) - object path, e.g. clips/scene01.mp4.
  • s3_config (optional) - from the Attome S3 Config node, or the pack's env.txt defaults.
  • frame_start (optional) - frame index to begin at (default 0).
  • frame_count (optional) - how many frames to extract; 0 means "all of them." That default catches people who assume 0 means zero.
  • skip_frames (optional) - sampling. Skip N frames between kept ones: skip_frames: 1 keeps every 2nd frame, skip_frames: 3 keeps every 4th. Handy for cheap previews.
  • Outputs: frames (IMAGE batch), frame_count (INT), fps (FLOAT).

That fps output is quietly important - save it and feed it straight back into the pack's Save Video node and you'll reconstruct the video at the original frame rate, which is the difference between smooth playback and a silent slideshow.

Install and gotchas

ComfyUI Manager (search "Comfyui_Attome_S3"), or:

cd ComfyUI/custom_nodes
git clone https://github.com/attome-ai/Comfyui_Attome_S3
cd Comfyui_Attome_S3
pip install -r requirements.txt

Restart. This node needs opencv-python, which the requirements file installs - if you skipped the requirements and get No module named 'cv2', that's why. The usual S3 failures apply (missing s3:GetObject permission, no endpoint_url for MinIO/R2), plus two video-specific ones. First, a big video is a full download and a full decode every run - there's no caching, so loading the same 10,000-frame clip repeatedly will feel expensive. Second, if s3_key is empty you get a single 512×512 black frame with frame_count 0 and fps 24.0 instead of an error. That's deliberate optional-resource behavior, but it means "my video is one black frame" = "I left the key blank." Everything else about it is unglamorous and predictable, which is exactly what you want from a loader.

CategoryAttome/S3

Inputs (5)

NameTypeDefaultDescription
s3_keySTRINGpath/to/video.mp4
s3_configoptS3_CONFIG
frame_startoptINT00–10000
frame_countoptINT00–10000
skip_framesoptINT00–100

Outputs (3)

NameTypeDescription
framesIMAGE
frame_countINT
fpsFLOAT