How to automate cinematic B-roll generation using ComfyUI and Stable Video Diffusion
I’ve moved my workflow to a headless setup where I trigger ComfyUI via its API. Instead of dragging nodes manually, I use a Python script to inject a list of prompts into a custom workflow JSON.
The key to getting "cinematic" movement rather than "warping" artifacts is the motion_bucket_id. In my experience, values between 40 and 80 provide that slow, sweeping drone shot feel, while anything over 120 usually results in the image collapsing.
Here is the core logic I use to iterate through a folder of high-res base images (generated via Midjourney or Flux) and push them into the SVD pipeline:
import requests
import json
import os
def queue_svd_generation(image_path, motion_bucket=60, augmentation_level=0.1):
# Load the exported ComfyUI API JSON
with open("svd_workflow_api.json", "r") as f:
workflow = json.load(f)
# Update the specific node IDs for the image and motion settings
# Note: Node IDs vary based on your specific workflow export
workflow["12"]["inputs"]["image"] = image_path
workflow["15"]["inputs"]["motion_bucket_id"] = motion_bucket
workflow["15"]["inputs"]["augmentation_level"] = augmentation_level
payload = {"prompt": workflow}
response = requests.post("http://127.0.0.1:8188/prompt", json=payload)
return response.json()
# Batch process a directory of cinematic stills
image_folder = "./broll_stills"
for img in os.listdir(image_folder):
if img.endswith((".jpg", ".png")):
queue_svd_generation(os.path.join(image_folder, img))A few critical config tips to avoid the common "jitter" in B-roll:
FPS and Motion Control
Set your video_frames to 25 and fps to 6 or 12. If you want a smooth slow-motion effect, generate at a low FPS and then use Topaz Video AI or a simple RIFE interpolation node in ComfyUI to bring it up to 60fps. Generating high FPS natively in SVD often leads to faster, more erratic movement.
The Augmentation Trap
Keep augmentation_level low (around 0.02 to 0.1). If you crank this up, SVD adds too much noise to the initial frame, and you lose the identity of your original cinematic shot. If the video feels "static," increase the motion bucket before touching the augmentation.
VRAM Management
SVD is a memory hog. If you're hitting OOM errors while batching, add the --lowvram flag to your ComfyUI launch command. I also recommend using the SVD-xt model over the base version for better temporal consistency across the 25 frames.
The real productivity gain happens when you combine this with a simple bash script to move the output .mp4 files into a Premiere or Resolve watch folder. Instead of spending three hours manually clicking "Queue Prompt," I can dump 50 cinematic stills into a folder, run the script, and go grab coffee. By the time I'm back, I have a library of atmospheric B-roll that actually looks intentional.
All Replies (0)
No replies yet — be the first!
