Nodes/ComfyUI-nkxx/Sora2 视频生成同步 (Grsai)
ComfyUI Node

Sora2 视频生成同步 (Grsai)

Sora2 text/image-to-video, synchronously, with a progress bar and a download

By nkxx188·Created 11 months ago·Updated 6 months ago· 14
Sora2 视频生成同步 (Grsai)
  • image
  • video
  • video_url
  • response
promptA cute cat playing on the grass
aspect_ratio16:9
duration10
sizesmall
remixTargetId默认无
api_key

Sora2 is OpenAI's closed video line, and this node is the "just give me a video" version of it inside the ComfyUI-nkxx pack: you type a prompt, optionally attach an image, hit Queue, and ComfyUI sits there polling the Grsai reseller API until a finished MP4 lands in your output folder. It's synchronous, it shows a real progress bar, and when it's done you've got three outputs instead of a task ID and a prayer.

The inputs that matter:

  • prompt - multiline, default "A cute cat playing on the grass". Sora responds well to full cinematic sentences, not tag soup.
  • aspect_ratio - 16:9 or 9:16. Two choices, that's it.
  • duration - 10 or 15 seconds.
  • size - small or large. Cost and resolution knob; there's no visible 4K toggle here.
  • image (optional) - attach one and it becomes image-to-video (the node uploads it to Grsai and passes it as the start frame).
  • remixTargetId - optional video-remix target ID (s_xxxx). This is "make a sequel to that other video I generated" - you'd grab the PID from a previous run's response. Leave "默认无" to ignore it.
  • api_key - blank uses the pack-wide Grsai key (env var GRSAI_KEY or the global key manager).

The outputs are the nice part: video is a proper ComfyUI VIDEO (VideoAdapter-wrapped local file), video_url is the remote URL so you can re-download or share it, and response is a status blob with the task ID, the PID (which you'll want for remixTargetId later), and your remaining credit balance.

Mechanically it's honest about being a poller: it posts to /v1/video/sora-video, then loops /v1/draw/result every ~3 seconds for up to 900 seconds, driving the progress bar the whole way. Because IS_CHANGED returns a fresh timestamp, it re-runs on every queue execution - so don't leave it in a graph you're continuously queueing unless you actually want to burn credits each pass.

The whole pack installs the same way:

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

Restart; first boot auto-installs requests, pandas, yt-dlp, opencv-python and friends. You need a Grsai key from nkxx.grsai.ai - no key, no request, and the node tells you exactly that in the response string.

Grounded gotchas:

  • This node blocks your graph. That's the point of "同步". A 15-second Sora2 clip can take minutes; if you want to keep the queue moving, use the async trio (Sora2SubmitAndRecordTask_GrsaiSora2QueryTasks_GrsaiSora2GetNextVideo_Grsai) instead.
  • The download is yt-dlp first, curl fallback, three retries. If both fail you still get the URL in video_url - grab it manually rather than re-queueing and paying twice.
  • Every run costs API credits. The node helpfully shows the remaining balance, which is the pack's way of making you feel the pain.
  • removeWatermark is baked into the request payload, so outputs come back clean - a real advantage over some reseller channels that stamp their logo on everything.

For a one-off clip this is the node you reach for. For anything batch or background, the async set is strictly better, and that's what the author's own numbered workflows use.

CategoryNkxx/Grsai/视频 (同步)

Inputs (7)

NameTypeDefaultDescription
promptSTRINGA cute cat playing on the grass
aspect_ratioCOMBO16:92 options: 16:9, 9:16
durationCOMBO102 options: 10, 15
sizeCOMBOsmall2 options: small, large
imageoptIMAGE
remixTargetIdoptSTRING默认无
api_keyoptSTRING

Outputs (3)

NameTypeDescription
videoVIDEO
video_urlSTRING
responseSTRING