Skip to content

[Partner Nodes] fix: add runtime check for SeeDance2 image inputs#14152

Merged
Kosinkadink merged 1 commit into
masterfrom
fix/api-nodes/bytedance
May 28, 2026
Merged

[Partner Nodes] fix: add runtime check for SeeDance2 image inputs#14152
Kosinkadink merged 1 commit into
masterfrom
fix/api-nodes/bytedance

Conversation

@bigcat88
Copy link
Copy Markdown
Contributor

@bigcat88 bigcat88 commented May 28, 2026

PR adds runtime input validation for the Seedance 2.0 first-last-frame and reference nodes - so users no longer hit opaque server-side InvalidParameter errors at upload.
ReferenceNode's existing auto_downscale widget continues to control reference-video downscaling only and now defaults to True

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 May 28, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds input validation and downscaling for Seedance image processing in two ByteDance nodes. It imports a downscaling utility, introduces a _prepare_seedance_image() helper that enforces aspect ratio and dimension constraints by downscaling images to a 6000-pixel max side, then applies this preprocessing to ByteDance2FirstLastFrameNode and ByteDance2ReferenceNode before their respective asset operations. The auto_downscale default for the reference node changes from False to True.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and specifically describes the main change: adding runtime validation for SeeDance2 image inputs to prevent server-side errors.
Description check ✅ Passed The description is directly related to the changeset, explaining the runtime validation additions for SeeDance nodes and the auto_downscale default change.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@comfy_api_nodes/nodes_bytedance.py`:
- Around line 1793-1797: The synchronous call to _prepare_seedance_image inside
the async def execute is blocking the event loop; change those direct calls (the
ones for first_frame and last_frame and the per-key calls against
reference_images[key]) to run in a threadpool by awaiting
asyncio.to_thread(_prepare_seedance_image, ...) or using loop.run_in_executor,
and for multiple reference images use asyncio.gather over to_thread tasks so all
image preparations run off the event loop; update the execute function to await
these offloaded tasks where first_frame, last_frame and reference_images are
assigned.
🪄 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: 1e0040cd-7c12-4dfd-8561-ff888694fc1f

📥 Commits

Reviewing files that changed from the base of the PR and between be06873 and e69e4a5.

📒 Files selected for processing (1)
  • comfy_api_nodes/nodes_bytedance.py

Comment thread comfy_api_nodes/nodes_bytedance.py
@Kosinkadink Kosinkadink merged commit 4af9a47 into master May 28, 2026
17 checks passed
@bigcat88 bigcat88 deleted the fix/api-nodes/bytedance branch May 28, 2026 08:04
j0n4t pushed a commit to j0n4t/ComfyUI that referenced this pull request May 28, 2026
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