Nodes/ComfyUI-nkxx/1.5 Sora2 异步批量提交 (Grsai)
ComfyUI Node

1.5 Sora2 异步批量提交 (Grsai)

Fire 50 Sora2 videos from a spreadsheet without blocking your queue

By nkxx188·Created 11 months ago·Updated 6 months ago· 14
1.5 Sora2 异步批量提交 (Grsai)
  • image
  • task_ids
  • report
file_path
column_nameprompt
aspect_ratio16:9
duration10
sizesmall
concurrency5
prompt_prefix
max_count50
remixTargetId默认无
api_key

If you've got a spreadsheet full of prompts and you want a video for each one, Sora2SubmitBatchTask_Grsai is the fire-and-forget way to do it: it reads a CSV/XLSX column, submits each prompt as a Sora2 video task concurrently, records every task ID into the pack's local database, and hands you a report - all without ever blocking the graph on a render. It's step 1.5 in the author's numbered async pipeline, slotting between the single submit and the query/download steps.

Inputs:

  • file_path - the CSV or Excel file. Absolute path; the node checks it exists. CSV is read as UTF-8, and .xls/.xlsx go through pandas.
  • column_name - which column holds the prompts (default prompt). If the column is missing, you get a clear error, not garbage.
  • aspect_ratio, duration, size - the usual generation knobs, applied to every row.
  • concurrency - how many submissions run at once, 1–20 (default 5). The real cost/pace dial.
  • prompt_prefix - optional text prepended to every row's prompt (great for a consistent style tag).
  • max_count - cap on how many rows get submitted, up to 999 (default 50). Your spreadsheet can have 2,000 rows; this is the emergency brake.
  • image, remixTargetId, api_key - one shared reference image, a shared sequel target, and the key (blank = pack-wide).

Outputs: task_ids (one per submitted row - the lines that are clean IDs are the wins, lines containing "失败"/"异常" are the fails) and report ("批量完成 | 总数: N | 成功: X | 失败: Y").

Mechanically it's a ThreadPoolExecutor over the row count, capped at your concurrency. Every successful submit is stored in data/sora2_task_history.json with status: pending, so the rest of the pipeline (query → download) picks them up exactly like hand-submitted ones. The IS_CHANGED trick forces re-execution every run, which is great for "queue another batch" - and exactly the foot-gun the pack's circuit breaker is designed to catch if you enable Auto Queue on top of it. Budget accordingly: max_count defaults to 50 because 50 Sora2 renders is real money.

Install is the pack-wide routine:

cd ComfyUI/custom_nodes
git clone https://github.com/jieg9341-lab/ComfyUI-nkxx

Restart and let it auto-install pandas (required for the Excel path), openpyxl, requests, yt-dlp, and friends on first boot. Grsai key from nkxx.grsai.ai.

Grounded gotchas:

  • Every submitted row costs credits. The report shows your balance implicitly and the API errors per-row rather than aborting the batch, so a batch can half-succeed. Read the task_ids output to see which rows failed and why.
  • One shared image gets uploaded once and used for all rows - there's no per-row image column here. For per-row reference images you're in a different workflow.
  • The DB trims old completed tasks (last 5), so don't wait a week before downloading and expect the full list.
  • 20 concurrency against a flaky API will produce more "异常" rows than 5 will. Start at the default.
CategoryNkxx/Grsai/视频 (异步)

Inputs (11)

NameTypeDefaultDescription
file_pathSTRING
column_nameSTRINGprompt
aspect_ratioCOMBO16:92 options: 16:9, 9:16
durationCOMBO102 options: 10, 15
sizeCOMBOsmall2 options: small, large
concurrencyINT51–20
prompt_prefixoptSTRING
max_countoptINT501–999
imageoptIMAGE
remixTargetIdoptSTRING默认无
api_keyoptSTRING

Outputs (2)

NameTypeDescription
task_idsSTRING
reportSTRING