Nodes/ComfyS3/Save Video Files to S3
ComfyUI Node

Save Video Files to S3

Take VHS output and push it to the bucket

By TemryL·Created 3 years ago·Updated 2 years ago· 62
Save Video Files to S3
  • filenames
  • s3_video_paths
filename_prefixVideoFiles

SaveVideoFilesS3 is the ComfyS3 node for video: it takes the output of VideoHelperSuite's VHS_VideoCombine and uploads the finished video to your S3 bucket. Your video workflow keeps saving locally as usual - this node just grabs the resulting files and pushes a copy to the cloud on the way out.

The use case is the same one that motivates the rest of the pack: the bucket is the deliverable's destination, not your local disk. You generate a clip on a GPU box that nobody can conveniently reach, and the finished video lands somewhere a client, teammate, or downstream service can grab it.

How it works

The key input is filenames, typed as VHS_FILENAMES - that's the output type of VHS_VideoCombine from ComfyUI-VideoHelperSuite. You wire the video combine node's filename output into this node's filenames input and it reads the list of local video paths from it. The other input is filename_prefix (default VideoFiles).

On run it does the ComfyUI-style counter dance, but against the bucket: it lists what's already in S3_OUTPUT_DIR, figures out the next number, renames each video to something like VideoFiles_00001_.mp4, and uploads each file. It returns s3_video_paths - a list of the object keys it just wrote, so you can log them or pass them to whatever wants to know where the video went.

Two things stand out in the mechanism. First, the counter is computed by listing the bucket, not the local disk, which is the point - multiple machines saving to the same bucket share the numbering. Second, the node does not delete the local video after uploading. You get local plus cloud, which is usually what you want when you're archiving.

You need VideoHelperSuite installed

The VHS_FILENAMES type belongs to Kosinkadink's ComfyUI-VideoHelperSuite, not to ComfyS3. No VHS, no type - this node won't even resolve. If you load a workflow containing SaveVideoFilesS3 and Manager flags missing nodes, that's almost certainly the cause.

Worth knowing: there's another, unrelated pack called ComfyUI-S3-IO that reuses VideoHelperSuite's class names, which makes Manager show VHS nodes as "conflicting" even when you've never installed it. If you see that, it's a different project's quirk, not this node failing.

Installing and configuring the pack

ComfyS3 installs like any custom node - Manager search for "ComfyS3" (author TemryL), or:

cd ComfyUI/custom_nodes
git clone https://github.com/TemryL/ComfyS3
cd ComfyS3
pip install -r requirements.txt   # boto3==1.34.32, python-dotenv==1.0.1

Restart, then create .env in custom_nodes/ComfyS3/:

S3_REGION=us-east-1
S3_ACCESS_KEY=your_access_key
S3_SECRET_KEY=your_secret_key
S3_BUCKET_NAME=your-bucket
S3_INPUT_DIR=input
S3_OUTPUT_DIR=output

S3_ENDPOINT_URL and S3_ADDRESSING_STYLE are optional for S3-compatible storage.

Common issues

Videos are big, and the upload is synchronous boto3 - a multi-gigabyte mp4 will block your queue while it's going up. Run it on a decent uplink and don't expect to multitask through it. As with the rest of the pack, the S3 client is built at node load, so a missing or wrong .env shows up as ComfyS3 - ERROR - Missing required S3 environment variables. in the console before you even run anything. And treat those plaintext AWS keys in .env carefully - this is a small open-source node, but custom nodes run with full OS access, so don't expose your ComfyUI publicly while they're in the folder.

CategoryComfyS3

Inputs (2)

NameTypeDefaultDescription
filename_prefixSTRINGVideoFiles
filenamesVHS_FILENAMES

Outputs (1)

NameTypeDescription
s3_video_pathsSTRING