Nodes/RyanOnTheInside/Mask to Audio Mask (ACE 1.0) βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
ComfyUI Node

Mask to Audio Mask (ACE 1.0) βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜

Collapse a spatial mask onto an audio latent's timeline

By ryanontheinsideΒ·Created 2 years agoΒ·Updated 5 months agoΒ· 852
Mask to Audio Mask (ACE 1.0) βš‘πŸ…‘πŸ…žπŸ…£πŸ…˜
  • audio_latents
  • spatial_mask
  • MASK
β—„frame_summaryaverageβ–Ί

This node bridges two things that don't normally speak the same language: an image-space mask and an audio latent. You give it a mask (drawn or generated per frame, the way you would for any image-editing mask) plus a set of audio_latents, and it collapses that spatial mask down into a mask shaped to fit the audio's own timeline - one value per frame of audio, rather than per pixel of image. That's what lets you use a spatial mask to control where in time an audio-generation step pays attention, instead of where in an image.

The "ACE" in the name points to ACE-Step, an audio generation model with its own latent format - and this node is version-pinned to it. The 1.0 in the title matters: there's a sibling node, MaskToAudioMask15, built for ACE 1.5's latent shape instead. They aren't interchangeable; pick the one that matches whichever ACE checkpoint you're actually running, since the two versions' latent shapes differ and wiring in the wrong one will just error on a shape mismatch rather than silently working.

How it works

frame_summary decides how each frame's 2D mask gets boiled down into the single number needed for that frame's slot on the audio timeline: average takes the mean value across the mask, max and min take the extremes, and center_pixel just reads the value at the mask's center point. Which one you want depends on what the mask represents - average if you drew a loose region and want its overall coverage, center_pixel if you care about one specific point and the rest of the mask is just context.

The inputs and output

  • audio_latents (required, LATENT) - the audio latent whose timeline the output mask gets shaped to match.
  • spatial_mask (required, MASK) - the per-frame image-space mask being collapsed down.
  • frame_summary (required, enum: average/max/min/center_pixel) - how each frame's mask gets reduced to one value.

Output is a single MASK - but note it's now shaped to the audio latent's timeline, not the original image dimensions, so treat it as an audio-conditioning mask rather than something to composite back over your source image.

How to install it

The pack's README came back empty for install specifics, so use the standard path:

ComfyUI Manager: search "RyanOnTheInside", install, restart.

Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/ryanontheinside/ComfyUI_RyanOnTheInside

Restart ComfyUI afterward. This node specifically requires you to already have an ACE-Step audio latent pipeline set up elsewhere in your graph - it doesn't generate audio latents itself, it only reshapes a mask to match them.

Troubleshooting

The version mismatch is the thing most likely to bite: if you're working with an ACE 1.5 checkpoint and grabbed this (the 1.0 node) by mistake, expect a shape error rather than a subtly wrong result - swap to MaskToAudioMask15. Beyond that, if the output mask seems to lose detail you cared about, reconsider frame_summary - collapsing a 2D mask down to one number per frame is inherently lossy, and average in particular can wash out a small but important masked region; max will preserve it better if what matters is "is any part of this frame masked," not "how much."

Categoryconditioning/audio

Inputs (3)

NameTypeDefaultDescription
audio_latentsLATENTβ€”
spatial_maskMASKβ€”
frame_summaryCOMBOaverage4 options: average, max, min, center_pixel

Outputs (1)

NameTypeDescription
MASKMASKβ€”