ComfyUI Node

mimetic-a0 Sampler

50 Euler steps, and a negative prompt that isn't there

By hiroki-abe-58·Created 22 days ago·Updated 22 days ago· 0
mimetic-a0 Sampler
  • model
  • positive
  • latent
◄seconds8.00►
◄batch_size1►
◄seed0►
◄steps50►
◄cfg6.0►
◄apg_scale1.00►
◄noiseofficial►

This is the node that makes the audio, and it's unusual among ComfyUI samplers in that most of its defaults aren't preferences - they're a reproduction of one specific recipe, and the author checked the reproduction against the official code hard enough to publish the numbers.

Once you know what the recipe is, the settings stop looking arbitrary.

How it samples

The model is a rectified-flow transformer over latents of 64 channels. The Sampler draws starting noise, builds a sigma schedule, and runs Euler across it. The schedule isn't the usual linear one: it's spaced evenly in log-SNR between −6.2 and 2.0, matching the shift object the model's config asks for, with the two ends pinned to exactly 1 and 0.

Two details are easy to miss. First, it samples a latent 6 seconds longer than the audio you asked for - the official code passes duration_padding_sec=6.0 and masks the padding, and the extra room measurably helps the model finish phrases. That holds up to about 10 seconds; ask for 12 and the 16-second window leaves no headroom at all. Decode trims the tail back off.

Second, precision: while it samples (and while Decode runs), the pack turns off TF32 and the cuDNN benchmark flag, then restores your settings. PyTorch's default runs cuDNN convolutions in TF32, and on its own that moves a 50-step take enough to be audible against the reference. You don't have to do anything - just don't be surprised when this node behaves differently from the rest of the graph.

The inputs

model comes from the mimetic-a0 Loader, and it checks - wire a MODEL from anywhere else and you get connect the model output of a mimetic-a0 Loader rather than a crash halfway through.

positive is a CONDITIONING from CLIP Text Encode, which needs Load CLIP with t5_base.safetensors and type stable_audio. Not a negative prompt. There is no negative input, and that's deliberate: the unconditional branch is a zeroed prompt with the same length numbers, which is what the official code does. If you're hunting for the negative slot, stop hunting - cfg is your only lever.

seconds is the take length, 0.1 to 16, and it should come from the mimetic-a0 Prompt node's seconds output, not be typed by hand. The model conditions on this number. Typing 8 while your prompt says "4 bars" at 90 BPM gets you a take that's the wrong length for its own tempo.

batch_size is takes per run, 1 to 16 - the command line's -n. seed is a full 64-bit seed with the usual control-after-generate widget. steps defaults to 50 and cfg to 6, both what the model was tested with. Leave them there - dropping to 20 steps to save time isn't a known-good compromise here, it's just less sampling.

apg_scale is the interesting one and defaults to 1. At 1, guidance is adaptive projected: the component of the guidance vector that runs parallel to the conditional prediction gets projected out, so CFG sharpens without dragging the whole latent in a direction. At 0 you get plain CFG, the way an image model does it. In between is a blend. The default is the official behaviour - only touch it if a prompt is coming out over-cooked.

noise is the reproducibility lever. official draws the starting noise on the sampling device, exactly as the reference implementation does: same seed, same take, on the same kind of device. cpu draws it on the CPU, which is the same on every machine - use it when you want a take to be reproducible across your GPU box and your laptop, or across AMD and NVIDIA.

The single output is latent, which goes into Decode. It carries two extra bits: the type marked as audio, and the length in seconds, so Decode knows where to cut.

Using it well

Results vary by seed more than you'd expect from a loop generator, so batch four takes and keep one. It's cheap: the author measured a 10.7-second take at 1.6 seconds on an RTX 5090 through the queue, 3.2 on a cold start with the model loading, peaking around 3.8 GB of VRAM with the fp32 weights and T5 loaded. CPU works, slowly.

One caveat if you switched the Loader to fp16: the official code keeps sampler state in fp16 and ComfyUI keeps it in fp32, so a seed gives you a different take than the fp32 file would. Not worse - just not the same take, and not the one the README's verification compared.

Install

Manager, the Registry id mimetic-a0-music, or:

cd ComfyUI/custom_nodes
git clone https://github.com/hiroki-abe-58/ComfyUI-MimeticA0
python custom_nodes/ComfyUI-MimeticA0/tools/download_model.py --models-dir models

No extra Python packages - the pack's dependency list is empty, which is rare enough in ComfyUI audio tooling to be worth saying twice. Restart, then load workflows/gui/four_takes.json to see a four-take batch wired up properly.

Categoryaudio/mimetic_a0

Inputs (9)

NameTypeDefaultDescription
modelMODEL—
positiveCONDITIONINGCLIPTextEncode with the T5-base text encoder (CLIPLoader type stable_audio)
secondsFLOAT8.000.1–16at most 16 s
batch_sizeINT11–16takes; one batch of noise, as -n in the command line
seedINT00–18446744073709550000—
stepsINT501–50050 is what the model was tested with
cfgFLOAT6.01–206 is what the model was tested with; 1 turns guidance off
apg_scaleFLOAT1.000–11: adaptive projected guidance (the official default), 0: plain CFG, in between: a blend
noiseCOMBOofficialofficial: drawn on the sampling device like the official code (same seed, same take on the same kind of device). cpu: drawn on the CPU, the same on every machine

Outputs (1)

NameTypeDescription
latentLATENT—