ComfyUI Node

Generate

Generate is the AudioX sampler — and the node with the confusing sample_size

By Yuan-ManX·Created about a year ago·Updated about a year ago· 12
Generate
  • model
  • conditioning
  • sample_size
  • audio
steps250
cfg_scale7.00
sigma_min0.30
sigma_max500.00
sampler_typedpmpp-3m-sde
devicecuda

This is the engine room. Generate takes the loaded model and the CONDITIONING bundle from Condition, runs the actual diffusion denoising loop over audio latents, decodes them back through the model's autoencoder, and hands you an AUDIO tensor ready for SaveAudioXAudio. If you've used a KSampler, the shape of this node will feel familiar - steps, CFG, sigma range, sampler type - because the underlying code is k-diffusion with a v-diffusion denoising objective.

Mechanically it's generate_diffusion_cond: create noise of length sample_size (divided by the autoencoder's downsampling ratio because this is latent diffusion), encode your conditions, then denoise with classifier-free guidance at your cfg_scale, applying CFG rescaling so you don't blow out the dynamics at high guidance. The sampler choice is a plain string matched against k-diffusion methods - valid values from the code are k-heun, k-lms, k-dpmpp-2s-ancestral, k-dpm-2, k-dpm-fast, k-dpm-adaptive, dpmpp-2m-sde, and the default dpmpp-3m-sde.

The inputs that actually matter

  • model (MODEL) and conditioning (CONDITIONING) - wire from LoadAudioXModel and Condition. Non-negotiable.
  • sample_size (typed SampleRate) - here's the trap. This input sizes the output length in samples, but the pack mislabeled its type as SampleRate, so ComfyUI wants to wire it from the loader's sample_rate output (44100). Do that and you get about one second of audio per generation. The model's real native length is 485100 samples (~11 s) - you have to force that number in, either by feeding the loader's sample_size output anyway or by editing the node. It's the single most confusing thing in this pack, and it will silently make every clip feel broken.
  • steps (INT, default 250) - the denoising steps. 250 is on the slow end; for quick tests 50–100 is fine, though quality drops.
  • cfg_scale (FLOAT, default 7.0) - classifier-free guidance. Crank it for prompt adherence, drop it for cleaner audio.
  • sigma_min (0.3) / sigma_max (500) - the noise schedule endpoints. Defaults are sensible; leave them until you're chasing artifacts.
  • sampler_type (STRING, default dpmpp-3m-sde) - the sampler name from the list above.
  • device (STRING, default "cuda") - literally a string. The node's own code comments out the auto-detect, so on a CPU-only box you must type cpu here or it fails at the first tensor op.

Installing AudioX

Install via ComfyUI Manager (search "ComfyUI-AudioX") or cd ComfyUI/custom_nodes && git clone https://github.com/Yuan-ManX/ComfyUI-AudioX.git, then pip install -r requirements.txt and conda install -c conda-forge ffmpeg libsndfile, then restart. The requirements are heavy (pinned pandas==2.0.2, descript-audio-codec, laion-clap, wandb) - a managed ComfyUI install may want its own venv. The model auto-downloads from Hugging Face on first LoadAudioXModel run.

Known rough edges

No seed input - the sampler picks a random seed internally, so you can't reproduce a good take, which is genuinely annoying for dialing in prompts. And since the community's takes on AudioX quality are mixed (in the video-to-audio space MMAudio is still the default recommendation for a lot of people), budget a few runs before you judge it. The defaults are decent starting points: 250 steps, CFG 7, dpmpp-3m-sde. Just fix that sample_size first.

CategoryAudioX

Inputs (9)

NameTypeDefaultDescription
modelMODEL
conditioningCONDITIONING
sample_sizeSampleRate
stepsINT250
cfg_scaleFLOAT7.00
sigma_minFLOAT0.30
sigma_maxFLOAT500.00
sampler_typeSTRINGdpmpp-3m-sde
deviceSTRINGcuda

Outputs (1)

NameTypeDescription
audioAUDIO