Skip to content

[API Nodes] add new nodes for WAN2.7#13264

Merged
comfyanonymous merged 1 commit intomasterfrom
feat/api-nodes/wan2.7
Apr 3, 2026
Merged

[API Nodes] add new nodes for WAN2.7#13264
comfyanonymous merged 1 commit intomasterfrom
feat/api-nodes/wan2.7

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

@bigcat88 bigcat88 commented Apr 3, 2026

API Node PR Checklist

Scope

  • Is API Node Change

Pricing & Billing

  • Need pricing update
  • No pricing update

If Need pricing update:

  • Metronome rate cards updated
  • Auto‑billing tests updated and passing

QA

  • QA done
  • QA not required

Comms

  • Informed Kosinkadink

Signed-off-by: bigcat88 <bigcat88@icloud.com>
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 3, 2026

📝 Walkthrough

Walkthrough

The pull request refactors comfy_api_nodes/nodes_wan.py by consolidating locally-defined Pydantic models into external imports from comfy_api_nodes.apis.wan. Five new video workflow nodes are introduced for WAN 2.7: Wan2TextToVideoApi, Wan2ImageToVideoApi, Wan2VideoContinuationApi, Wan2VideoEditApi, and Wan2ReferenceVideoApi. Each new node implements task creation, polling, and output download operations. Input preprocessing is enhanced with text validation, media uploading capabilities (audio, image, video), audio duration validation, and runtime reference constraints for certain nodes. The model input default in WanTextToImageApi is also removed.

🚥 Pre-merge checks | ✅ 2 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately and specifically describes the main change: adding new WAN 2.7 API nodes to the codebase.
Description check ✅ Passed The PR description includes a checklist indicating this is an API Node change for WAN 2.7 with pricing updates and QA completion, which aligns with the changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick comments (1)
comfy_api_nodes/nodes_wan.py (1)

1256-1267: Remove unused prompt and negative_prompt parameters.

These parameters are never used in the method body—the actual values are retrieved from model["prompt"] and model["negative_prompt"] (lines 1292-1293). Other WAN 2.7 nodes don't have these top-level parameters.

♻️ Suggested fix
     `@classmethod`
     async def execute(
         cls,
         model: dict,
         first_clip: Input.Video,
-        prompt: str = "",
-        negative_prompt: str = "",
         last_frame: Input.Image | None = None,
         seed: int = 0,
         prompt_extend: bool = True,
         watermark: bool = False,
     ):
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@comfy_api_nodes/nodes_wan.py` around lines 1256 - 1267, The execute method on
the WAN node class has unused top-level parameters prompt and negative_prompt;
remove these parameters from the async def execute(...) signature so the method
relies only on model["prompt"] and model["negative_prompt"] (leave the lines
that read model["prompt"] and model["negative_prompt"] intact). Update the
function signature in the class method (remove prompt: str = "" and
negative_prompt: str = ""), and adjust any call sites/tests that pass those
positional/keyword args to now omit them; ensure imports/type hints still
validate after the signature change.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Nitpick comments:
In `@comfy_api_nodes/nodes_wan.py`:
- Around line 1256-1267: The execute method on the WAN node class has unused
top-level parameters prompt and negative_prompt; remove these parameters from
the async def execute(...) signature so the method relies only on
model["prompt"] and model["negative_prompt"] (leave the lines that read
model["prompt"] and model["negative_prompt"] intact). Update the function
signature in the class method (remove prompt: str = "" and negative_prompt: str
= ""), and adjust any call sites/tests that pass those positional/keyword args
to now omit them; ensure imports/type hints still validate after the signature
change.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: fd482071-b10d-4e8f-bda0-133c026ab2d0

📥 Commits

Reviewing files that changed from the base of the PR and between 76b75f3 and d93cad0.

⛔ Files ignored due to path filters (1)
  • comfy_api_nodes/apis/wan.py is excluded by !comfy_api_nodes/apis/**
📒 Files selected for processing (1)
  • comfy_api_nodes/nodes_wan.py

@comfyanonymous comfyanonymous merged commit 5de94e7 into master Apr 3, 2026
17 checks passed
comfyanonymous pushed a commit that referenced this pull request Apr 3, 2026
Signed-off-by: bigcat88 <bigcat88@icloud.com>
@bigcat88 bigcat88 deleted the feat/api-nodes/wan2.7 branch April 3, 2026 07:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants