Skip to content

[Partner Nodes] feat(ByteDance): add support for Seed Audio 1.0#14731

Merged
bigcat88 merged 3 commits into
masterfrom
feat/api-nodes/seed-audio-1.0
Jul 3, 2026
Merged

[Partner Nodes] feat(ByteDance): add support for Seed Audio 1.0#14731
bigcat88 merged 3 commits into
masterfrom
feat/api-nodes/seed-audio-1.0

Conversation

@bigcat88

@bigcat88 bigcat88 commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

PR adds one universal node that generates speech, background music, sound effects, and multi-speaker dialogue from a single prompt with ByteDance Seed Audio 1.0

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

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown

Review Change Stack

📝 Walkthrough

Walkthrough

This PR adds a new ByteDanceSeedAudioNode to comfy_api_nodes/nodes_bytedance.py for ByteDance Seed Audio 1.0 text-to-speech. It introduces audio, image, and preset-voice reference modes, prompt and connection validation helpers, request construction and response decoding, and node registration. It also adds upscale_image_tensor_to_min_pixels in comfy_api_nodes/util/conversions.py and re-exports it from comfy_api_nodes/util/__init__.py.

Changes

Related issues: None identified.
Related PRs: None identified.
Suggested labels: enhancement, API nodes
Suggested reviewers: maintainers familiar with API node integrations

Sequence Diagram(s)

Included in the hidden review stack artifact above.

Poem
A rabbit hums a byte-sized tune, 🐰
Text turned to voice beneath the moon.

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
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.
Title check ✅ Passed The title clearly and concisely summarizes the main change: adding Seed Audio 1.0 support to ByteDance nodes.
Description check ✅ Passed The description is directly related to the PR and accurately describes the new Seed Audio 1.0 node.

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.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 1

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

2751-2756: 🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win

Offload the new audio/image conversions from execute.

MP3 encoding, image upscaling/PNG serialization, and response audio decoding can block the event loop for large clips. Move these conversions to a background executor.

Based on learnings, new synchronous CPU/IO-heavy helpers added inside async def execute in comfy_api_nodes/ should be offloaded with asyncio.to_thread or an equivalent executor.

Suggested offload shape
+import asyncio
 import base64
@@
-                mp3_bytes = audio_input_to_mp3(clip).getvalue()
+                mp3_bytes = await asyncio.to_thread(lambda: audio_input_to_mp3(clip).getvalue())
                 references.append(SeedAudioReference(audio_data=base64.b64encode(mp3_bytes).decode("utf-8")))
         elif mode == MODE_IMAGE:
-            image = upscale_image_tensor_to_min_pixels(image, 160_000)
-            references = [SeedAudioReference(image_data=tensor_to_base64_string(image, mime_type="image/png"))]
+            image = await asyncio.to_thread(upscale_image_tensor_to_min_pixels, image, 160_000)
+            image_data = await asyncio.to_thread(tensor_to_base64_string, image, mime_type="image/png")
+            references = [SeedAudioReference(image_data=image_data)]
@@
-        return IO.NodeOutput(audio_bytes_to_audio_input(base64.b64decode(response.audio)))
+        output_audio = await asyncio.to_thread(lambda: audio_bytes_to_audio_input(base64.b64decode(response.audio)))
+        return IO.NodeOutput(output_audio)

Also applies to: 2779-2779

🤖 Prompt for 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.

In `@comfy_api_nodes/nodes_bytedance.py` around lines 2751 - 2756, The new
synchronous media conversions inside execute are blocking the event loop;
offload the CPU/IO-heavy audio and image work to a background thread. Update the
audio branch in execute so validate_audio_duration/audio_input_to_mp3/base64
encoding runs via asyncio.to_thread or an equivalent executor, and do the same
for image upscaling and tensor_to_base64_string in the MODE_IMAGE path. Also
apply the same offloading pattern to the response audio decoding helper
referenced in the other flagged location so execute stays non-blocking.

Source: Learnings

🤖 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 2541-2544: The prompt tag validation around max_audio_tag() and
the preset voice-mode path is too permissive because `@Audio0` is treated the same
as “no tags,” and `@Audio1` can slip through even when tags should be unused.
Tighten the validation in the prompt/API preparation flow so any explicit
`@AudioN` is rejected when N is invalid or unsupported for the selected mode, and
make the check distinguish “no tag present” from “tag value 0”; update the
relevant validation in max_audio_tag() and the code that consumes it around the
audio request setup to fail before the API call.

---

Nitpick comments:
In `@comfy_api_nodes/nodes_bytedance.py`:
- Around line 2751-2756: The new synchronous media conversions inside execute
are blocking the event loop; offload the CPU/IO-heavy audio and image work to a
background thread. Update the audio branch in execute so
validate_audio_duration/audio_input_to_mp3/base64 encoding runs via
asyncio.to_thread or an equivalent executor, and do the same for image upscaling
and tensor_to_base64_string in the MODE_IMAGE path. Also apply the same
offloading pattern to the response audio decoding helper referenced in the other
flagged location so execute stays non-blocking.
🪄 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 Plus

Run ID: f8ed4574-713a-4806-94fd-240b5e19ef01

📥 Commits

Reviewing files that changed from the base of the PR and between 35c1470 and 63fcb85.

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

Comment thread comfy_api_nodes/nodes_bytedance.py
alexisrolland
alexisrolland previously approved these changes Jul 3, 2026
Signed-off-by: bigcat88 <bigcat88@icloud.com>
@bigcat88 bigcat88 requested a review from alexisrolland July 3, 2026 07:12
@bigcat88 bigcat88 merged commit 9764381 into master Jul 3, 2026
17 checks passed
@bigcat88 bigcat88 deleted the feat/api-nodes/seed-audio-1.0 branch July 3, 2026 11:00
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