Nodes/comfyui-sora-node/Sora Video-To-Video
ComfyUI Node

Sora Video-To-Video

Edit an existing clip through the API, quirks included

By maxczc·Created 9 months ago·Updated 9 months ago· 0
Sora Video-To-Video
    • job_id
    • status
    • result
    video
    promptExtend this video with smooth continuation.
    api_key
    negative_prompt
    operationextend
    extension_seconds5.0
    duration_seconds5.0
    aspect_ratio16:9
    seed
    fps24
    guidance_scale7.5
    base_urlhttps://api.openai.com/v1/sora
    endpoint/videos
    metadata
    webhook_url
    wait_for_resulttrue
    poll_interval3.00
    max_wait_seconds120.00
    download_path

    SoraVideoToVideo is the editing sibling in the comfyui-sora-node pack. You hand it an existing video plus a prompt, it sends both to a Sora-compatible API, and you get back a clip that's been extended, edited, inpainted, or restyled - depending on the operation you pick. Like the other two nodes in this pack, nothing runs locally: it's a thin API client, not a model. No weights, no VRAM, and a hard requirement for an API key.

    The pitch is basically "stop re-rolling whole clips." Video-to-video is how you fix one awkward moment instead of regenerating a five-second take and hoping. The reality is more qualified: this node is the most awkward of the three, and one design decision makes it a particular trap for people used to how ComfyUI wires things up.

    The one big quirk

    video is a STRING input - a file path or a base64 blob - not a ComfyUI video object. You can't drag a wire from a load-video node into it. The value has to be a path on the machine running ComfyUI (.mp4, .mov, .avi, .webm are handled) or a base64-encoded string pasted in. If you're used to video nodes connecting to everything, this will trip you up on the first attempt. It's the single most important thing to know before you build a workflow around it.

    Also worth lowering expectations on: the inpaint operation is sent to the API as just a flag - there is no mask input on this node. Whether anything actually gets inpainted is entirely up to your backend. The README lists it as a feature, but the node itself gives the server nothing to work with beyond the video and the prompt. Treat inpaint as "ask the backend nicely," not a real mask-driven operation.

    How it works

    Same machinery as its siblings - a pure-stdlib urllib client, no requests, no torch, no requirements.txt. It reads the video file, uploads it as multipart form-data to base_url + endpoint (defaults https://api.openai.com/v1/sora and /videos) alongside a JSON payload with your prompt and settings, then polls the job until it reports succeeded and optionally downloads the result to download_path as <job_id>.mp4.

    The inputs that matter

    • video (required) - a file path or base64 string, as covered above.
    • prompt (required) - what you want done to the video. Default: "Extend this video with smooth continuation."
    • operation - the dropdown that matters most: extend (default), edit, inpaint, style_transfer.
    • extension_seconds (5) - only added to the request when operation is extend, so that's the one to bump for longer continuations.
    • duration_seconds, aspect_ratio, fps, guidance_scale - the usual generation knobs, shared with the rest of the pack.
    • api_key - set SORA_API_KEY or OPENAI_API_KEY in the environment; the field is checked first but stores your key in plaintext in the workflow.
    • max_wait_seconds and download_path - same two gotchas as always.

    Outputs are three strings: job_id, status, and result (a JSON blob with the job id, status, downloaded file path, and raw API response). No preview - set download_path and open the file.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/maxczc/comfyui-sora-node sora
    

    Then fully restart ComfyUI - the README stresses a complete server restart, not a browser refresh. ComfyUI Manager can install it if you search the pack title. No model downloads, no mandatory dependencies; Pillow and numpy are optional and only matter for the image-handling node.

    Where people get burned

    • Feeding it a video. Expecting a wire-in connection is the classic failure. Use a file path the ComfyUI machine can actually read, or a base64 string.
    • Timeout. Video is the slowest job type in this pack and the default max_wait_seconds of 120 is tight. A TimeoutError means bump the cap, not that the job failed.
    • No key. Same error as the rest of the pack: Provide a Sora API key via the node input or SORA_API_KEY/OPENAI_API_KEY env vars.
    • Expecting real inpaint masks. There's no mask input. If masking matters, you need a different tool entirely.

    It's a functional, anonymous little pack - clean stdlib code, no dependency drama - and this node is its least polished member. If you just need "extend this clip by five seconds" through a Sora backend, it works. If you want genuine video editing control, keep looking.

    CategorySora

    Inputs (19)

    NameTypeDefaultDescription
    videoSTRING
    promptSTRINGExtend this video with smooth continuation.
    api_keyoptSTRING
    negative_promptoptSTRING
    operationoptCOMBOextend4 options: extend, edit, inpaint, style_transfer
    extension_secondsoptFLOAT5.0
    duration_secondsoptFLOAT5.0
    aspect_ratiooptSTRING16:9
    seedoptSTRING
    fpsoptINT24
    guidance_scaleoptFLOAT7.5
    base_urloptSTRINGhttps://api.openai.com/v1/sora
    endpointoptSTRING/videos
    metadataoptSTRING
    webhook_urloptSTRING
    wait_for_resultoptBOOLEANtrue
    poll_intervaloptFLOAT3.00
    max_wait_secondsoptFLOAT120.00
    download_pathoptSTRING

    Outputs (3)

    NameTypeDescription
    job_idSTRING
    statusSTRING
    resultSTRING