Wan2.7: Video Edit - After
Wan2.7: Video Edit - Before

This ComfyUI workflow demonstrates reference-guided video editing with Wan2.7. You load a source clip with LoadVideo, provide one or more reference images with LoadImage, and let the Wan2VideoEditApi node apply character or scene replacements consistently across frames. The node calls the Wan2.7 model to infer identity, attire, and style cues from your references, then synthesizes edited frames that preserve the original camera motion and timing. Finally, SaveVideo assembles the frames into a finished MP4/WEBM with your chosen frame rate and quality.

Technically, the Wan2VideoEditApi node takes three essential inputs: the decoded video frames, the reference image tensor(s), and your textual directions (prompt and optional constraints). It uses the Wan2.7 backbone to align reference identity/style with the target footage while maintaining temporal coherence, so edits remain stable over time rather than flickering frame to frame. This makes the workflow especially useful for swapping a character across an entire shot or re-dressing a scene without rotoscoping. The minimalist node set—LoadVideo → LoadImage → Wan2VideoEditApi → SaveVideo—keeps the pipeline simple while still offering strong control through prompts, reference choice, and edit strength settings exposed by the API node.

API

Use this workflow from code

Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.

GET https://comfy.org/workflows/download/894c44a995a2.json
Fetching workflow JSON…

Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

# Install (beta)
pip install comfy-sdk        # Python
npm i @comfyorg/sdk          # TypeScript

# Run "Wan2.7: Video Edit" (Python)
from comfy_sdk import Comfy

client = Comfy(api_key="comfyui-...")

# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("api_wan2_7_video_edit_api.json")

asset = client.assets.from_file("input.png")
wf.set_input("3", "image", asset)  # LoadImage

job = client.run(wf)
for output in job.get_outputs("5"):  # SaveVideo
    output.to_file(output.name)

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key

FAQ

Frequently Asked Questions

View all workflows
Character
Cinematic
Image to Video
Lip Sync
Multiple Angles
Portrait
Style Reference
Style Transfer
Text to Video
Video Generation
Video
Showing 30 of 30 templates