[Partner Nodes] feat(sync.so): add support for "sync-3" model#14928
Conversation
Signed-off-by: bigcat88 <bigcat88@icloud.com>
21a653d to
5c39700
Compare
📝 WalkthroughWalkthroughAdds sync.so lip-sync and talking-image ComfyUI nodes. The nodes validate media inputs, upload video or image and audio assets, submit generation requests, poll for completion, and download generated videos. The talking-image node supports optional image downscaling and speaker-coordinate rescaling. A sync.so extension registers both nodes and exposes an async ComfyUI entrypoint. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 4
🤖 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_sync_so.py`:
- Around line 165-166: Update both affected node flows to start the independent
video/image upload and audio upload operations concurrently, then await both
results together while preserving their existing arguments and URL assignments.
Apply the change around the upload calls in both locations, including the paths
using upload_video_to_comfyapi or upload_image_to_comfyapi alongside
upload_audio_to_comfyapi.
- Around line 168-202: Extract the duplicated submit, poll, status validation,
output URL validation, and download flow from SyncLipSyncNode.execute and
SyncTalkingImageNode.execute into a shared _run_sync_generation helper. Have
both execute methods construct their input items and options, then delegate to
the helper with the model name; preserve the existing error handling and include
both PENDING and PROCESSING in queued_statuses.
- Around line 145-152: In the dimension validation flow around
video.get_dimensions(), narrow the broad exception handler to catch only
ValueError. Preserve the width/height fallback for videos without a stream,
while allowing decode or open failures to propagate and preventing broken
uploads from bypassing the 4K guard.
- Line 153: Update the validate_audio_duration call in the sync.so generation
flow to use max_duration=300 instead of 600, matching the /v2/generate server
limit.
🪄 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: ASSERTIVE
Plan: Pro Plus
Run ID: 9e218273-686d-4289-8539-fe64ff5f052b
⛔ Files ignored due to path filters (1)
comfy_api_nodes/apis/sync_so.pyis excluded by!comfy_api_nodes/apis/**
📒 Files selected for processing (1)
comfy_api_nodes/nodes_sync_so.py
📜 Review details
⏰ Context from checks skipped due to timeout. (14)
- GitHub Check: test (ubuntu-latest)
- GitHub Check: test (macos-latest)
- GitHub Check: test (windows-latest)
- GitHub Check: Run Pylint
- GitHub Check: test (macos-latest)
- GitHub Check: test (windows-2022)
- GitHub Check: test (ubuntu-latest)
- GitHub Check: test
- GitHub Check: Build Test (3.13)
- GitHub Check: Build Test (3.12)
- GitHub Check: Build Test (3.14)
- GitHub Check: Build Test (3.11)
- GitHub Check: Build Test (3.10)
- GitHub Check: Run Pylint
🧰 Additional context used
📓 Path-based instructions (3)
**/*.py
📄 CodeRabbit inference engine (AGENTS.md)
**/*.py: Keep imports at module scope; avoid inline imports unless they are already part of an established optional-backend probe or are needed to avoid an import cycle.
Do not add unnecessarytry/exceptblocks; use them for optional dependency, platform, or backend capability detection only when the program has a useful fallback, and prefer specific exception types when changing new code.
If a library version is pinned inrequirements.txt, do not add code to ComfyUI to handle older versions of that library.
Remove any workarounds for PyTorch versions that ComfyUI no longer officially supports; deprecated workarounds include catching an exception and rerunning the same op with the input cast to float unless the code comments name the exact supported PyTorch versions.
Let unsupported model formats, invalid quantization metadata, and bad states fail with clear errors instead of silently producing lower quality output.
Match the existing local style in the file you edit; long lines, simple helper functions, module-level state, and direct tensor operations are acceptable when they make the code easier to follow.
Keep comments sparse and useful; strip comments that restate the code or describe obvious behavior, and keep short TODOs only when they name the concrete missing follow-up.
Treat dtype, device placement, VRAM usage, and offloading behavior as core correctness concerns; check CPU, CUDA, ROCm, MPS, DirectML, XPU, NPU, and low-VRAM implications when touching shared execution or loading code.
Prefer native ComfyUI formats and existing quantization/offload helpers over adding parallel code paths; usecomfy.quant_ops,comfy.model_management,comfy.memory_management,comfy.pinned_memory,comfy_aimdo, andcomfy-kitchenhelpers where they already solve the problem.
Use optimized comfy-kitchen ops in places where they improve performance without changing the expected dtype, device, memory, or interface behavior.
All models should use the optimized atte...
Files:
comfy_api_nodes/nodes_sync_so.py
**
⚙️ CodeRabbit configuration file
**: IMPORTANT: Only comment on issues directly introduced by this PR's code changes.
Treat AGENTS.md as mandatory repository policy, not optional style guidance.
Flag PR changes that violate AGENTS.md even when the code is otherwise functional.
In particular, enforce architecture boundaries, dtype/device/memory rules,
interface contracts, import style, no unnecessary try/except blocks, no inline
imports, no outbound internet paths in core ComfyUI, and narrow scoped fixes.
Prefer direct findings over suggestions when a rule is violated. Only ignore
AGENTS.md when it clearly conflicts with a newer explicit maintainer instruction
in the PR.
Do NOT flag pre-existing issues in code that was merely moved, re-indented,
de-indented, or reformatted without logic changes. If code appears in the diff
only due to whitespace or structural reformatting (e.g., removing awith:block),
treat it as unchanged. Contributors should not feel obligated to address
pre-existing issues outside the scope of their contribution.
Files:
comfy_api_nodes/nodes_sync_so.py
comfy_api_nodes/**
⚙️ CodeRabbit configuration file
comfy_api_nodes/**: Third-party API integration nodes. Focus on:
- No hardcoded API keys or secrets
- Proper error handling for API failures (timeouts, rate limits, auth errors)
- Correct Pydantic model usage
- Security of user data passed to external APIs
Files:
comfy_api_nodes/nodes_sync_so.py
🧠 Learnings (3)
📚 Learning: 2026-02-21T14:01:41.482Z
Learnt from: pythongosssss
Repo: Comfy-Org/ComfyUI PR: 12555
File: comfy_extras/nodes_glsl.py:719-724
Timestamp: 2026-02-21T14:01:41.482Z
Learning: In PyOpenGL, bare Python scalars can be accepted for 1-element array parameters by NumberHandler. This means you can pass an int/float directly to OpenGL texture deletion (e.g., glDeleteTextures(tex)) without wrapping in a list. Verify function-specific expectations and ensure types match what the OpenGL call expects; use explicit lists only when the API requires an array.
Applied to files:
comfy_api_nodes/nodes_sync_so.py
📚 Learning: 2026-04-18T16:55:46.724Z
Learnt from: bigcat88
Repo: Comfy-Org/ComfyUI PR: 13465
File: comfy_api_nodes/nodes_bytedance.py:1496-1506
Timestamp: 2026-04-18T16:55:46.724Z
Learning: In `comfy_api_nodes` Python async node implementations (e.g., `async def execute`), synchronous CPU/IO-heavy helpers (such as video/audio trim/resize and base64/MP3 conversion) may be called directly without offloading to a thread executor (e.g., `asyncio.to_thread`). Treat this as an existing, broader refactor concern rather than a new PR regression: if the PR does not introduce additional synchronous blocking calls, reviewers should not flag it as a new issue. However, if the PR adds new synchronous CPU/IO work inside `async def execute`, prefer offloading with `asyncio.to_thread` (or an equivalent background executor) to avoid blocking the event loop.
Applied to files:
comfy_api_nodes/nodes_sync_so.py
📚 Learning: 2026-05-07T17:59:26.050Z
Learnt from: bigcat88
Repo: Comfy-Org/ComfyUI PR: 13753
File: comfy_api_nodes/nodes_gemini.py:1148-1157
Timestamp: 2026-05-07T17:59:26.050Z
Learning: In ComfyUI node implementations under `comfy_api_nodes/`, when building JSONata expressions that use `IO.PriceBadge` for `$lookup` against a price map keyed in lowercase, do not add an explicit `$lowercase()` around widget values (e.g., combo options like "1K", "2K", "4K"). The ComfyUI frontend automatically lowercases widget values before evaluating the JSONata expression, so the lookup keys will already match the lowercase map entries.
Applied to files:
comfy_api_nodes/nodes_sync_so.py
🔇 Additional comments (6)
comfy_api_nodes/nodes_sync_so.py (6)
1-24: LGTM!
29-135: LGTM!
207-303: LGTM!
381-391: LGTM!
318-331: 🎯 Functional CorrectnessNo axis swap here.
get_image_dimensions()returns(height, width)for this image layout, so the downscaledspeaker_x/speaker_yremap innodes_sync_so.pyfollows the helper contract.> Likely an incorrect or invalid review comment.
184-193: 🩺 Stability & Availability
PROCESSINGdoes not need to be added toqueued_statuses.poll_op_rawkeeps polling any non-terminal status, andqueued_statusesonly affects the queued/processing UI and timing behavior.> Likely an incorrect or invalid review comment.
PR adds support for the latest
sync.somodel: https://sync.so/docs/models/sync-3API Node PR Checklist
Scope
Pricing & Billing
If Need pricing update:
QA
Comms