Sora2 原视频角色同步 (Grsai)
Recycle a Sora2 video's PID into a character ID — no local files needed
- character_id
- status
Sora2 has two ways to build a reusable character asset. Sora2UploadCharacter_Grsai uploads a video you have. This one is for when the character you want already lives in a video Sora2 generated: you feed it a PID - the s_xxxx identifier that every successful Sora2 run returns - and it extracts the character straight off the server, no local files, no re-upload. If you're chaining "generate a video, then make a series of character-consistent sequels," this is the glue.
Mechanically it's the same pattern as the upload node but with a lighter payload: it sends the PID plus a start_time/end_time slice to /v1/video/sora-create-character, polls until extraction finishes (up to a 15-minute window), and returns the fresh character_id. The one thing it needs from you is knowing which PID to use - you'll have seen it in the response output of any Sora2Generator_Grsai or async run.
Inputs:
- pid - the target video's PID (
s_xxxx...). This is the one required field with no sane default, and the node bails with a clear "missing PID" message if you skip it. - start_time / end_time - which seconds of that generated video contain the character you want to lock in (defaults 0 → 3).
- 备注 (remark) - optional label.
- api_key - optional; blank uses the pack-wide Grsai key (env
GRSAI_KEYor the global key manager).
Outputs: character_id (STRING, the reusable asset ID) and status (STRING - success/error, with your remark and whether the record landed in the local library). Like the upload variant, it writes every successful extraction to data/character_library.txt in the pack folder, so your character archive grows even when you're not actively thinking about it.
The workflow this unlocks is the fun one:
- Generate a video with Sora2 (sync or async).
- Copy the PID from its
response. - Run this node with that PID →
character_id. - Plug the ID into
remixTargetIdon a later Sora2 generation → the same person, new scene.
Install is the pack-wide one:
cd ComfyUI/custom_nodes
git clone https://github.com/jieg9341-lab/ComfyUI-nkxx
Restart, let it auto-install deps on first boot, and grab a Grsai API key at nkxx.grsai.ai.
Grounded gotchas:
- PID vs character ID are different things. PID identifies a generated video; character_id identifies an extracted person. Confusing the two is the #1 mistake - this node takes the former and produces the latter.
- It blocks the queue while polling, same as all the sync Grsai video nodes. For anything automated, prefer recording PIDs from async runs and doing extraction in a dedicated pass.
- The 0→3 second default slice is tuned for a person being visible early in the clip. If your character appears at second 8, set the timestamps or you'll extract a background.
- Every run consumes credits and the node shows your balance in the status string - worth glancing at if you're registering a lot of characters in a hurry.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| pid | STRING | — | |
| start_time | FLOAT | 0.00–100 | — |
| end_time | FLOAT | 3.00.1–100 | — |
| api_keyopt | STRING | — | |
| 备注opt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| character_id | STRING | — |
| status | STRING | — |