Nodes/KIE.ai Nodes Next/Wan 2.7 - Video Edit
ComfyUI Node

Wan 2.7 - Video Edit

Describe the change, keep the take

By felipederosilva·Created about a month ago·Updated about 22 hours ago· 3
Wan 2.7 - Video Edit
  • video_url
  • reference_image
  • video
  • url
  • all_urls_json
  • task_id
  • raw_json
  • credits_consumed
  • credits_left
◄promptChange the character's outfit and add the hat shown in the reference image.►
◄negative_promptlow resolution, errors, worst quality, low quality, malformed, extra fingers, bad proportions►
◄resolution1080p►
◄aspect_ratio16:9►
◄duration0►
◄audio_settingauto►
◄prompt_extendtrue►
◄watermarkfalse►
◄seed0►
◄nsfw_checkerfalse►
◄timeout_seconds1200►
◄callback_url►
◄reference_image_url►

This is video editing as instruction-following: you keep the footage and the performance, and you change what you want changed - a wardrobe swap, a background element, a hat that was never there. Locally in 2026 this job belongs to Bernini (built on the frozen Wan 2.2 base) or VACE with a mask pipeline, and Bernini's editing cost is roughly double an equivalent generation because your source clip becomes part of the input sequence. Here you skip the compute and pay per second.

The audio_setting field is what makes this one distinct from the rest of the Wan 2.7 family: because your input has a soundtrack, you have to decide what happens to it.

How it works

Two required inputs: prompt (the edit instruction, up to 5000 characters - note the schema lists it as required even though KIE's field description calls it optional, and the node follows the schema) and video_url, a VIDEO socket. The node writes your clip to a temp MP4, uploads it, POSTs to /api/v1/jobs/createTask with model wan/2-7-videoedit, polls /api/v1/jobs/recordInfo until it resolves, then downloads the edited MP4 into ComfyUI/output/KIE-Results/videos and returns a native VIDEO.

Inputs that matter

  • video_url - the source take. Quality in, quality out; a soft source gives you a soft edit.
  • prompt - say what should change. "Change the character's outfit and add the hat shown in the reference" is the shipped default, and that register - a change plus a source for it - is what works.
  • audio_setting - auto (default) lets the model decide whether to regenerate audio based on your prompt; origin forces the original track to stay.
  • duration - 0 (default) means keep the full input duration untruncated. Set it instead and the output is clipped from second 0 to that length, with valid values of 0 or 2-10.
  • reference_image - a URL string, not a socket, for character/clothing/style guidance. JPEG, JPG, PNG without alpha, BMP, WEBP; 240-8000 px per side, aspect ratio 1:8 to 8:1.
  • resolution - 1080p default, 720p cheaper, and KIE's own note says 1080p costs more.
  • aspect_ratio - five options; omit it and the output matches the input video's ratio.
  • prompt_extend (on by default), watermark (off), seed, negative_prompt (500 characters).

Outputs

video for saving or for another pass. url, all_urls_json, task_id, raw_json, and credits_consumed / credits_left - plus the on-node receipt the pack prints after every generation. Editing the full length of a long clip at 1080p is the expensive configuration; set duration if you only need part of it.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/felipederosilva/ComfyUI-KIE-Nodes-Next
cd ComfyUI-KIE-Nodes-Next && pip install -r requirements.txt

Restart ComfyUI. Nothing runs locally but an HTTP client: requests, Pillow, numpy, PyYAML. Find the node under KIE Next / Video / Wan - the pack generates its model tree from KIE's live API catalog on startup, which is why each model is its own node.

Key once: Settings → KIE.ai Nodes Next → Connection → Paste / replace KIE.ai API key. Validated before saving, ✅ CONNECTED after, masked fingerprint only on the frontend. KIE_API_KEY for headless installs. Pre-paid credits, no subscription, one balance across everything KIE hosts.

Common issues

The audio came back wrong. audio_setting was on auto, which lets the model regenerate sound based on your prompt. Use origin when the original track matters.

Your 20-second clip came back as five seconds. duration got set. It's 0 for "keep everything".

The edit drifted way past what you asked. No strength dial on this node - there's no denoise to turn down, only the prompt to rewrite. Be more specific about what must stay unchanged.

Reference image rejected. Alpha channels aren't supported, and the size/ratio limits are enforced.

Long job timing out. Raise timeout_seconds from 1200; editing jobs queue behind generations.

comfy_api.latest.InputImpl.VideoFromFile error. Update ComfyUI - this node both uploads and returns native video objects.

CategoryKIE Next/Video/Wan

Inputs (15)

NameTypeDefaultDescription
promptSTRINGChange the character's outfit and add the hat shown in the reference image.Optional text prompt describing the expected elements and visual features in the generated video. Supports Chinese and English. Maximum length: 5000 characters.
video_urlVIDEO—
negative_promptoptSTRINGlow resolution, errors, worst quality, low quality, malformed, extra fingers, bad proportionsOptional negative prompt describing content that should not appear in the video. Supports Chinese and English. Maximum length: 500 characters.
reference_imageoptIMAGE—
resolutionoptCOMBO1080pOutput video resolution tier. `1080p` costs more than `720p`. Default value: `1080p`. - `720p`: 720p - `1080p`: 1080p
aspect_ratiooptCOMBO16:9Output video aspect ratio. - If omitted: the output uses an aspect ratio close to the input video - If provided: the output uses the specified aspect ratio - Available values: `16:9`, `9:16`, `1:1`, `4:3`, `3:4`
durationoptINT00–10Output video duration in seconds. - Default `0` means using the full input video duration without truncation - If a value is provided, the output is clipped from second `0` to the specified length - Valid values are `0` or any integer in `[2,10]`
audio_settingoptCOMBOautoVideo audio setting. - `auto`: default, the model decides whether to regenerate audio based on the `prompt` - `origin`: force keeping the original input video audio
prompt_extendoptBOOLEANtrueWhether to enable prompt rewriting. When enabled, the model expands the input prompt. This usually works better for short prompts but increases processing time.
watermarkoptBOOLEANfalseWhether to add a watermark. The watermark is placed in the lower-right corner of the video with the fixed text "AI generated".
seedoptINT00–2147483647Random seed. Range: `0-2147483647`. If omitted, the system generates one automatically.
nsfw_checkeroptBOOLEANfalseDefaults to false. You can set it to false based on your needs. If set to false, our content filtering will be disabled, and all results will be returned directly by the model itself. Note: There is no guarantee that everything can be filtered out; if you are not satisfied with the results, you will need to make your own arrangements.
timeout_secondsoptINT120030–7200—
callback_urloptSTRINGOptional KIE callback URL. Leave empty for normal ComfyUI use.
reference_image_urloptSTRINGLegacy or remote reference URL. Leave empty when connecting the native reference_image IMAGE socket.

Outputs (7)

NameTypeDescription
videoVIDEO—
urlSTRING—
all_urls_jsonSTRING—
task_idSTRING—
raw_jsonSTRING—
credits_consumedFLOAT—
credits_leftFLOAT—