Nodes/Nova Audio Player/Nova ACE Preprocess ๐Ÿงฎ
ComfyUI Node

Nova ACE Preprocess ๐Ÿงฎ

The step where ACE-Step training usually dies

By NovaFemmeยทCreated 20 days agoยทUpdated 2 days agoยท 0
Nova ACE Preprocess ๐Ÿงฎ
    • tensor_dir
    • processed
    • failed
    • console
    โ—„dataset_jsonโ–บ
    โ—„output_dirโ–บ
    โ—„checkpoint_dirโ–บ
    โ—„variantxl_sftโ–บ
    โ—„max_duration240โ–บ
    โ—„deviceautoโ–บ
    โ—„precisionautoโ–บ
    โ—„acestep_repo_pathโ–บ

    Ask around about training an ACE-Step LoRA and you'll hear the same two things: "there's no ComfyUI workflow for building the dataset," and "it OOMs during preprocessing." That second one is the real gate. Encode every track into tensors and you need the VAE, the text encoder and the DIT encoder all loaded in some order - and if they all sit in VRAM at once, a 12GB card falls over.

    Nova ACE Preprocess ๐Ÿงฎ runs ACE-Step's own two-pass tensor generation over a Nova dataset, with the models loaded and unloaded around each pass so peak VRAM is one model rather than three. That's the mechanism, and it's why this node can do on a 12GB card what a naive script can't.

    What actually happens

    Pass one is VAE plus text encoder: your audio becomes latents, your caption and lyrics become embeddings. Pass two is the DIT encoder. Out come .pt tensors, one per track, and those are what the trainer trains on - not your FLACs. The text encoder here is a Qwen3-Embedding-0.6B in the checkpoint tree, which is the modern shape of this: you cache the embeddings once and never load the encoder again.

    Expect roughly 25โ€“30 seconds for a handful of tracks. It's dominated by model loading, not by audio.

    The inputs that matter

    • dataset_json - the path from the Builder. Its audio_path fields are what locate the audio, so don't move the files afterwards.
    • output_dir - where the .pt tensors go. Keep this different from your training output folder; mixing them makes both awkward to clear.
    • checkpoint_dir - a HuggingFace-layout folder tree. This is the one that catches people: ComfyUI's single-file .safetensors will not work. You need the variant folder (with its config.json, the remote-code .py files and model.safetensors), plus vae/, Qwen3-Embedding-0.6B/ and silence_latent.pt.
    • variant - xl_sft, xl_turbo, xl_base, sft, turbo or base. Must match the model you'll train against. More on that below.
    • max_duration - this truncates, and nothing in the log tells you which track lost its ending. Set it above your longest track. Check the durations the Dataset Builder printed.
    • device and precision - auto and bf16 are the right answers. On AMD ROCm, cuda is the correct device value; that's just what PyTorch calls the GPU.
    • acestep_repo_path (optional) - path to an ACE-Step 1.5 clone, prepended to sys.path for the import. Leave it empty only if the package is genuinely installed.

    Outputs: tensor_dir (point the Trainer at this), processed, failed, and console.

    Install

    Via ComfyUI Manager, search Nova Audio Player. Or clone it:

    cd ComfyUI/custom_nodes
    git clone https://github.com/NovaFemme/ComfyUI-NovaAudioPlayer.git
    

    Then the part people miss: this node needs packages ComfyUI doesn't ship. If you installed through Manager, install.py already ran the setup script for them. If you cloned by hand, run it yourself:

    <venv>/bin/python -m pip install --no-deps \
        vector_quantize_pytorch einx frozendict torch-einops-utils tensorboard
    

    The --no-deps is deliberate - it stops pip deciding your ROCm or CPU torch build is wrong and replacing it. On ROCm, Intel or CPU-only PyTorch you also need the CPU build of torchcodec, or audio decoding breaks everywhere:

    <venv>/bin/python -m pip install --no-deps --reinstall \
        --index-url https://download.pytorch.org/whl/cpu torchcodec
    

    The pack has a script that works all of this out for you (training/nova_ace_setup.py) and an in-ComfyUI version, Nova ACE Setup Check ๐Ÿฉบ. Run the check first.

    Two traps, both silent

    Existing .pt files are skipped. That's what makes a cancelled run resumable - and it also means that if you change your tags, your trigger word or max_duration and re-run, you'll silently keep the old tensors. Delete the tensor folder whenever anything upstream changes.

    variant must be identical on Preprocess, the Trainer and the Setup Check. The tensors are encoded against specific weights. Feed them to a trainer pointed at a different variant and nothing errors - the run completes, the loss falls, the adapter is worthless. There's no check that can catch it after the fact, because both halves are individually valid. Change the variant, delete the tensors, start again.

    Categoryโ–ถ๏ธ Nova Audio/๐ŸŽ“ LoRA Training

    Inputs (8)

    NameTypeDefaultDescription
    dataset_jsonSTRINGDataset JSON path. Its audio_path fields locate the audio.
    output_dirSTRINGWhere the .pt tensors go. Existing tensors are skipped, so a cancelled run resumes.
    checkpoint_dirSTRINGMust contain the variant folder, vae/, Qwen3-Embedding-0.6B/ and silence_latent.pt. ComfyUI's single-file safetensors will NOT work.
    variantCOMBOxl_sftWhich checkpoint to encode against. Match the model you will train.
    max_durationFLOAT24010โ€“3600Audio longer than this is truncated. Longer means more VRAM.
    deviceCOMBOautoauto detects your GPU. On ROCm, cuda is the right choice โ€” that is what torch calls it.
    precisionCOMBOautobf16 matches the bf16 checkpoints and is the safe pick on RDNA.
    acestep_repo_pathoptSTRINGPath to an ACE-Step clone, prepended to sys.path for the import. Leave empty if the package is installed.

    Outputs (4)

    NameTypeDescription
    tensor_dirSTRINGDirectory holding the .pt tensors โ€” point the trainer at this.
    processedINTSamples successfully written.
    failedINTSamples that failed.
    consoleSTRINGRun log โ€” wire into Nova Console.