Paul de Lavallaz 823e6b72f1 Fix VALIDATE_INPUTS — remove buggy per-field validator
ComfyUI calls VALIDATE_INPUTS once per declared input field, passing
that field's value as the first positional arg. Our validator only
checked `url`, so when called with `timeout_sec=120` it tried
`isinstance(120, str)` → False → returned "url vacío" for the
timeout_sec field too. That's why the screenshot shows the same
error twice.

Two fixes:
- Remove VALIDATE_INPUTS entirely. The real validation (non-empty URL)
  already happens inside load() at execution time.
- Mark `url` as forceInput=True so it can only be wired (no manual
  default text), avoiding the "default value is empty" UI warning.
2026-04-18 04:28:13 -03:00

comfyui-url-to-audio

ComfyUI custom node that loads AUDIO from a public URL.

Why

Some ComfyDeploy server images ship a broken torchcodec (missing libnppicc.so.13), which makes the default LoadAudioFromURL / ComfyUIDeployExternalAudio flows crash with:

TypeError: 'NoneType' object is not subscriptable

This node bypasses torchcodec entirely. It downloads the file via requests, detects the format (mp3 / wav / m4a / ogg / flac / aac / opus), then tries 3 backends in order until one succeeds:

  1. torchaudio (disk file)
  2. soundfile (in-memory bytes)
  3. ffmpeg → wav (hard fallback)

Node

Name Display Category
URL_To_Audio URL → Audio 🔗ComfyDeploy

Inputs

Field Type Notes
url STRING Public URL of the audio file
timeout_sec INT (optional) HTTP timeout, default 90

Output

Name Type
audio AUDIO

The AUDIO dict format is the standard ComfyUI one:

{"waveform": torch.Tensor [batch=1, channels, samples], "sample_rate": int}

Wiring example (Kling+Sync workflow)

Replace the broken audio loader with:

ExternalText (input_id="audio_url")  ─→  URL → Audio  ─→  FalLipsyncV3.audio

From your client, send the audio URL as a string instead of uploading the WAV file:

{
    "deployment_id": "...",
    "inputs": {
        "input_image": image_url,
        "audio_url": "https://your-cdn.com/voice.mp3",
        "motion": "...",
        ...
    }
}

Install (ComfyDeploy)

Add this repo URL to your ComfyDeploy machine's custom nodes list, or in a self-hosted ComfyUI:

cd ComfyUI/custom_nodes
git clone https://github.com/PauldeLavallaz/comfyui-url-to-audio
pip install requests soundfile

License

MIT

S
Description
No description provided
Readme
32 KiB
Languages
Python 100%