Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

kijai
Copy link
Contributor

@kijai kijai commented Sep 17, 2025

This adds some basic audio tensor manipulation nodes. I tried to choose unique names based on the node database.

TrimAudioDuration

  • Selects a range from the audio based on start index and duration in seconds.

SplitAudioChannels

  • Splits stereo audio to it's left and right channels

AudioConcat

  • Concatenates two audio inputs into one

AudioMerge

  • Merges two audio inputs into one stream

AudioAdjustVolume

  • Adjusts audio volume by decibels

EmptyAudio

  • Generates empty audio tensor, useful for InfiniteTalk etc. as encoded silence can be used to limit mouth movement
image

- TrimAudioDuration
- SplitAudioChannels
- AudioConcat
- AudioMerge
- AudioAdjustVolume
waveform = audio["waveform"]
sample_rate = audio["sample_rate"]

gain = 10 ** (volume / 20)
Copy link
Contributor

Choose a reason for hiding this comment

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

I'm pretty sure audio is supposed to be values between -1..1 so it would be really easy to create invalid samples this way. You could clip/clamp it but then it would be easy to destroy the audio with massive clipping. You could limit the gain from scaling the samples past the valid range with something like gain = min(gain, 1 / (samples.abs().max().item() + 1e-012)).

@Kosinkadink Kosinkadink added the Core Core team dependency label Sep 17, 2025
@comfyanonymous comfyanonymous merged commit fd79d32 into comfyanonymous:master Sep 24, 2025
9 checks passed
phdenzel added a commit to phdenzel/ComfyUI that referenced this pull request Sep 26, 2025
* 'master' of github.com:phdenzel/comfyUI:
  Make LatentCompositeMasked work with basic video latents. (comfyanonymous#10023)
  Fix memory leak by properly detaching model finalizer (comfyanonymous#9979)
  Fix issue with .view() in HuMo. (comfyanonymous#10014)
  Add new audio nodes (comfyanonymous#9908)
  Rodin3D - add [Rodin3D Gen-2 generate] api-node (comfyanonymous#9994)
Thor-ATX pushed a commit to asteriafilmco/ComfyUI that referenced this pull request Sep 26, 2025
…e-update

* commit '2b7f9a8196304badb5fe58e5c734e4b182ad0fdf': (91 commits)
  Fix the failing unit test. (comfyanonymous#10037)
  Make LatentCompositeMasked work with basic video latents. (comfyanonymous#10023)
  Fix memory leak by properly detaching model finalizer (comfyanonymous#9979)
  Fix issue with .view() in HuMo. (comfyanonymous#10014)
  Add new audio nodes (comfyanonymous#9908)
  Rodin3D - add [Rodin3D Gen-2 generate] api-node (comfyanonymous#9994)
  ComfyUI version 0.3.60
  feat(api-nodes): add wan t2i, t2v, i2v nodes (comfyanonymous#9996)
  update template to 0.1.86 (comfyanonymous#9998)
  Fix bug with WanAnimateToVideo. (comfyanonymous#9990)
  Fix bug with WanAnimateToVideo node. (comfyanonymous#9988)
  add offset param (comfyanonymous#9977)
  Support for qwen edit plus model. Use the new TextEncodeQwenImageEditPlus. (comfyanonymous#9986)
  Set some wan nodes as no longer experimental. (comfyanonymous#9976)
  Lower wan memory estimation value a bit. (comfyanonymous#9964)
  Fix LoRA Trainer bugs with FP8 models. (comfyanonymous#9854)
  [Reviving comfyanonymous#5709] Add strength input to Differential Diffusion (comfyanonymous#9957)
  Add inputs for character replacement to the WanAnimateToVideo node. (comfyanonymous#9960)
  Update WanAnimateToVideo to more easily extend videos. (comfyanonymous#9959)
  fix(seedream4): add flag to ignore error on partial success (comfyanonymous#9952)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Core Core team dependency
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants