Make audio processing nodes handle None -inputs#13879
Conversation
📝 WalkthroughWalkthroughThis PR adds consistent None-input handling across audio processing nodes in 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ 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. Comment |
There was a problem hiding this comment.
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_extras/nodes_audio.py`:
- Line 418: The change allowing start_frame to be clamped to audio_length is
causing invalid ranges (start_frame can equal audio_length and thus start_frame
>= end_frame); restore the previous upper bound by clamping start_frame to
audio_length - 1 instead of audio_length (keep the lower bound at 0) so
start_frame remains a valid last index, and ensure end_frame logic (the code
that raises ValueError on lines ~423-424) will no longer be triggered for an
intended final-segment trim; update the min(...) call that sets start_frame
accordingly.
🪄 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: 685548f9-6887-451d-ba4d-5a011802e62b
📒 Files selected for processing (1)
comfy_extras/nodes_audio.py

GetVideoComponentsreturnsNoneif video doesn't have audio, theCreateVideohandles it graciously, while none of the audio processing nodes do. This PR allows None input to flow through.