Integrations
APIComfyUIManager
Runs on Batch GPUs

Batch for ComfyUI.
Inside your graph.

Send a clip from your graph to Batch and get back ProRes mattes, a depth pass or a 2x or 4x upscale. You see the quote before anything runs.

You don't need a big GPU for this. You do need a Batch account: jobs use the same credits as Batch Portal.

ComfyUI 0.3.45 or newer · macOS, Windows and Linux · Free to install · Needs a Batch account
A ComfyUI graph running Batch roto on a desert plate: Load Video, Batch Process Video, Batch Result Video and Save Video showing the returned matte
Desert plate
Roto, people
Quoted 10 credits
One account

One Batch workspace and one pool of credits across Portal, the API and ComfyUI.

Same engine

Batch Roto V3.2, Batch Depth V3 and Batch Upres. ComfyUI jobs show up in Portal with everything else.

Your ceiling

Set max_credits on the node (100 by default). If the quote comes in higher, nothing gets submitted.

What you get

One node does all three.

Roto
Type what you want matted, like people, car, sky. You get a ProRes matte for each prompt, subject white on black, plus a separate matte for each subject it finds unless you set matte_output to combined.
Depth
A relative depth pass of the whole frame, as a ProRes movie.
Upscale
2x or 4x, back as ProRes, up to 4,096 px on the long edge.
Install

Install the nodes.

Before you start, you need a Batch account. Download Batch Portal and create your account, then connect it below. The nodes work in ComfyUI 0.3.45 or newer on macOS, Windows and Linux: Comfy Desktop, the portable build or a manual install.

01

Open ComfyUI Manager

In ComfyUI, open Manager, Custom Nodes Manager.

02

Search Batch and install

Install Batch: Roto, Depth & Upscale by batchfilm. Always take the latest release; Manager's nightly option isn't supported for this node.

03

Restart ComfyUI

Four nodes appear in the Batch category of the node library, and Settings gets a Batch section.

From a terminal

comfy node install batch-film-nodes

Then restart ComfyUI. If ComfyUI Manager isn't on that machine, download the package zip from the node's Registry page and follow its README.

Connect

Add your Batch key.

01

Make a key in Batch Portal

A workspace admin opens Integrations, API keys, Create key from the account menu at the top right of Batch Portal (in Portal 1.1.6 and earlier, API keys sit under Settings). Name it after the machine or artist that will use it, like "ComfyUI Edit Bay 2", and pick the ComfyUI preset: Read pricing, Submit jobs, Write artifacts, Read jobs and Read artifacts. Add Read billing to see your balance inside ComfyUI.

Copy the key now; Portal won't show it again. ComfyUI on Linux? Make the key in Portal on a Mac or Windows machine, then use it on Linux. Download Batch Portal if you don't have it yet.

02

Save it in ComfyUI

Open Settings, Batch, Connection, Set up Batch, paste the key and choose Save key.

The node checks the key with a read call that uses no credits, then keeps it in macOS Keychain, Windows Credential Manager or the Linux Secret Service. It is never written into a workflow. The dialog shows the workspace and the key it's connected to, so you can match the key prefix against the list in Portal.

On a server, in Docker or over a tunnel

Set up Batch works in a browser on the machine that runs ComfyUI. Everywhere else, set BATCH_API_KEY in the environment that starts ComfyUI, without typing the key on the command line:

read -rs BATCH_API_KEY && export BATCH_API_KEY   # paste the key, then Enter
python main.py

On a server that stays up, load BATCH_API_KEY from a file no other user can read, or from your secrets manager. A key in BATCH_API_KEY wins over a saved key.

Nodes and templates

The nodes, and graphs to start from.

Batch Process Video
Runs one Batch job on one video, from quote to download.
Batch Resume Job
Collects an existing job by its job ID. Never creates or charges a new one.
Batch Result Files
Lists every downloaded file and the job's folder.
Batch Result Video
Passes one result movie on as a ComfyUI VIDEO, for example to Save Video.

Open Browse Templates and look under batch-film-nodes. Opening a template never submits anything.

batch-roto
Load Video, Batch Process Video (roto), Batch Result Video, Save Video
batch-depth
Load Video, Batch Process Video (depth), Batch Result Video, Save Video
batch-upscale
Load Video, Batch Process Video (2x upscale), Batch Result Video, Save Video
batch-resume-video
Batch Resume Job, Batch Result Video, Save Video
Run a shot

Set a ceiling, then run it.

01

Open a Batch template and pick your clip in Load Video.

02

On Batch Process Video, choose the service. The node hides the controls that service doesn't use.

03

Set max_credits to the most you'll approve for this job.

04

Run the workflow. Before it submits, the node shows the account it charges, the key prefix, the quote and, with Read billing, your balance. If the quote is above max_credits, nothing is submitted and the node tells you the ceiling you'd need.

service
roto, depth or upscale.
prompts · roto
Single words, separated by commas: people, car, sky. Each prompt is one subject, and each extra prompt adds to the price. Write car, not red car.
matte_output · roto
individual (the default): a combined matte per prompt plus one per subject found. combined: the combined matte alone, and it costs less.
upscale_factor
2x for sources up to 2,048 px on the long edge, 4x for sources up to 1,024 px.
max_credits
The highest quote you approve. Default 100.
project_name · job_name
Optional. Shown with the job in Batch Portal.
rerun_nonce
Leave it empty. Change it only when you want to pay for a fresh run of a clip Batch has already processed with the same settings.

Depth processes the whole picture and has no extra controls. While it runs, the node shows each step, and the ComfyUI console shows the same lines starting with [Batch]: uploading, checking the upload, queued, processing, complete, downloading.

Results

Where the files land.

Results are ProRes movies, saved in ComfyUI's output folder under Batch/<job ID>/, for example ComfyUI/output/Batch/<job ID>/. Set BATCH_COMFY_OUTPUT_DIR to save them somewhere else.

Roto
<prompt>_matte.mov for each prompt: subject white, everything else black, no alpha. With individual, also <prompt>_<n>_matte.mov for each subject found.
Depth
One ProRes movie of relative depth.
Upscale
The upscaled video as ProRes (MXF when the source is MXF), in a folder such as upscale_2x.

Batch Result Video passes one movie on. For roto, index 0 is the combined matte. Batch Result Files gives you the path of every file. A Save Video preview is a copy; keep the originals for finishing. Need a matte as a mask? Batch Result Video, then Get Video Components, then Convert Image to Mask on the red channel.

Credits

Paying for a job.

Same credits as Batch Portal, same rates.

Ceiling
Every job carries max_credits, 100 by default. If Batch quotes more, nothing is submitted. It caps the quote, not the final charge.
Hold
When processing starts, Batch holds the quoted credits.
Settle
When the job finishes, Batch charges per second for the footage it actually processed and returns the rest, so the charge usually lands at or a little under the quote. It can be higher if the footage turns out longer than the node measured.
Failed job
If a job fails while processing, the hold comes back.
Final charge
Portal shows it under Usage and Metrics. Add credits under Credits and billing.
Shared machine
BATCH_COMFY_MAX_CREDITS sets one ceiling for every job on that ComfyUI. A workflow's max_credits can't go above it.
Stop and resume

If ComfyUI goes down during a job.

Stop
Press Stop while Batch Process Video is running and Batch cancels the job. You may still be charged for work it finished before you stopped it.
Pick up again
ComfyUI closed, crashed, slept or lost the internet? The job keeps running on Batch. Run the same saved workflow again with unchanged inputs and the node picks up the same job, with no second charge.
Resume by ID
Batch Resume Job collects any job by its ID, even from another machine. It never creates or charges a new job.
Run again
To pay for a fresh run of a clip Batch has already processed with the same settings, change rerun_nonce. A copied node, or the same clip in a different workflow, also starts a new paid job.
Limits

Limits per job and per key.

Videos per job
One. Each Batch Process Video node submits one clip.
Clip length
Up to 120 minutes for roto and depth, 90 for upscale. Batch works best on shots and short clips.
Upload
Each upload link lasts about an hour. Rule of thumb: 2.5 Mbit/s of upload speed per GB.
Roto prompts
Up to 50 single-word prompts per job.
Upscale size
Up to 4,096 px on the long edge of the result.
Per key
1,000 credits per UTC day and 60 requests a minute. The daily limit resets at 00:00 UTC.
Requires
ComfyUI 0.3.45 or newer, Python 3.10 or newer, macOS, Windows or Linux, an internet connection and a Batch account with credits. FFmpeg is optional.

For higher key limits, write to support@batch.film.

Keep the key safe

No keys in workflows
The nodes have no key field, so a shared workflow never carries one.
Who can reach it
Anyone who can open your ComfyUI can spend the key's credits. With a key saved, keep ComfyUI off the network unless you trust everyone on it.
One per machine
One key per machine or artist. Portal shows when each key was last used, and you can revoke one without stopping the rest.
A leaked key
Revoke it in Batch Portal under Integrations, API keys, and make a new one.
Messages

What the messages mean.

Every message says whether a job was created and whether credits were used. Match the start of the message:

"Connect Batch in Settings > Batch > Connection, or set BATCH_API_KEY"

No key yet. See Connect above.

"Batch did not accept this API key"

The key is mistyped, revoked or expired. Make a new key and save it.

"This Batch API key is missing permissions the node needs"

Make a new key with the ComfyUI preset, save it, then revoke the old one.

"Batch API access is turned off"

Every workspace has API access, so this means the account isn't active or Batch paused its API access. A new key won't help. Write to support@batch.film.

"Your Batch account does not have enough credits for this job"

Add credits in Batch Portal under Credits and billing, then run again.

"Batch quoted ... more than this node's max_credits limit"

Raise max_credits to at least the quote shown, or use a shorter clip.

"This API key has reached its daily Batch credit cap"

Wait until 00:00 UTC, or write to support@batch.film.

"Batch roto prompts are single words separated by commas"

Rewrite the prompts: car, not red car.

"Batch upscale makes results up to 4096 pixels on the long edge"

Choose 2x, or resize the video before you run it.

"Batch could not inspect the video"

Install FFmpeg, or set BATCH_COMFY_FFPROBE to the full path of ffprobe, then restart ComfyUI.

"No Linux Secret Service is available"

Use BATCH_API_KEY instead (see Connect).

"[Batch] Another copy of the Batch nodes" in the ComfyUI console

An older copy is still in custom_nodes. Delete the folder the message names and restart ComfyUI.

ComfyUI Manager: "Installation of this flagged CNR version is blocked"

If ComfyUI Manager flags or blocks this version, don't install it another way. Read the warning, then write to support@batch.film with the version number and we'll confirm whether it's a genuine Batch release and what to do.

When you write to support@batch.film, include the job ID and the lines starting with [Batch] from the ComfyUI console. Never send your key. The README on the node page lists every message.

Batch for ComfyUI

Try it on
a single clip.

You'll need a key from Batch Portal and credits in your workspace. For a studio wide setup, write to lets@batch.film.

ComfyUI is the property of its owner. Batch is not affiliated with or endorsed by ComfyUI. Installing the nodes means you agree to the Batch Terms of Service, Privacy Policy and EULA.