Skip to content

[Partner Nodes] add SeeDance 2.0 nodes#13364

Merged
Kosinkadink merged 2 commits intomasterfrom
feat/api-nodes/seedance2
Apr 13, 2026
Merged

[Partner Nodes] add SeeDance 2.0 nodes#13364
Kosinkadink merged 2 commits intomasterfrom
feat/api-nodes/seedance2

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

@bigcat88 bigcat88 commented Apr 11, 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

@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Apr 11, 2026

📝 Walkthrough

Walkthrough

This pull request adds Seedance 2.0 support to the ByteDance integration: new Seedance2 model mappings and a task-status endpoint, Seedance2 pricing and reference-video pixel-limit configuration, and helper functions for pixel validation and price extraction. It extends media upload utilities with audio/image/video upload functions and new Seedance2 content types. The video task flow was reworked (updated process_video_task), and three new nodes were added: ByteDance2TextToVideoNode, ByteDance2FirstLastFrameNode, and ByteDance2ReferenceNode. The reference node enforces reference media presence, duration limits, pixel validation, and uploads media before task creation. A minor exception message formatting change was made.

🚥 Pre-merge checks | ✅ 1 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 11.76% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Description check ❓ Inconclusive The PR description is largely a checklist template without meaningful details about the changeset, though it references API Node updates, pricing changes, and QA completion. Provide a clear description of the SeeDance 2.0 node implementation, what features were added, and why. Reference the checklist items actually completed rather than just listing the template.
✅ Passed checks (1 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding SeeDance 2.0 nodes to the Partner Nodes module.

✏️ 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.

Signed-off-by: bigcat88 <bigcat88@icloud.com>
@bigcat88 bigcat88 force-pushed the feat/api-nodes/seedance2 branch from c7eae40 to 0452210 Compare April 11, 2026 18:24
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.

Actionable comments posted: 4

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@comfy_api_nodes/nodes_bytedance.py`:
- Around line 101-105: The extractor function may access
response.usage.total_tokens when usage exists but total_tokens is missing;
update extractor to guard that field by checking response.usage is not None and
that response.usage.total_tokens is present and numeric (e.g., using
hasattr/getattr or an explicit None check and isinstance/issubclass for
int/float) before performing the math; if total_tokens is missing or not a
number, return None, otherwise compute and return response.usage.total_tokens *
1.43 * rate / 1_000.0.
- Around line 1491-1493: The duration calculation using dur =
int(audio["waveform"].shape[-1]) / int(audio["sample_rate"]) can raise
ZeroDivisionError or type errors for malformed metadata; before dividing,
validate that audio["sample_rate"] exists, is an int (or numeric) and > 0, and
that audio["waveform"] has a valid shape with a numeric last-dimension length;
if any check fails, raise a ValueError (include the reference index i and the
offending value) explaining the issue (e.g., "invalid or zero sample_rate" or
"invalid waveform shape") so callers get a clear validation error instead of a
crash.
- Around line 1476-1484: The current try/except around video.get_duration()
swallows all exceptions (except ValueError) which bypasses duration checks and
can allow invalid downstream requests; in the block with video.get_duration(),
replace the broad "except Exception: pass" with explicit handling: catch known
parse/attribute errors (e.g., TypeError, AttributeError) and either log the
failure including the reference index `i` and the problematic `video`, then
raise a ValueError (or re-raise the original exception) so minimum-duration
enforcement and `total_video_duration` updates cannot be bypassed; ensure the
handlers reference `dur`, `total_video_duration`, `video.get_duration`, and `i`
so failures are surfaced rather than silently ignored.
- Around line 77-80: The try/except around video.get_dimensions() is swallowing
all exceptions and allowing invalid videos to proceed; update the error handling
in the block that calls video.get_dimensions() so you catch and handle specific
exceptions (e.g., ValueError, IOError) instead of a blanket Exception, log the
error with context (including video identifier) and then return a clear
failure/raise the exception to stop upload/task creation; reference the
video.get_dimensions() call and the surrounding guard that currently returns on
exception and ensure it either returns an explicit error result or re-raises
after logging so invalid metadata cannot bypass validation.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: b91285f4-2a48-4490-9092-f762ce3b61ef

📥 Commits

Reviewing files that changed from the base of the PR and between c7eae40 and 0452210.

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

Comment thread comfy_api_nodes/nodes_bytedance.py
Comment thread comfy_api_nodes/nodes_bytedance.py
Comment thread comfy_api_nodes/nodes_bytedance.py
Comment thread comfy_api_nodes/nodes_bytedance.py
@Kosinkadink Kosinkadink merged commit ee2db74 into master Apr 13, 2026
17 checks passed
@bigcat88 bigcat88 deleted the feat/api-nodes/seedance2 branch April 14, 2026 06:25
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