ComfyUI Node

HeartMuLa Loader

The ~20 GB friend at the front of the music graph

By Crono141·Created 3 months ago·Updated 3 months ago· 0
HeartMuLa Loader
    • model
    base_pathHeartMuLa
    model_versionHeartMuLa-oss-3B-happy-new-year
    torch_compilefalse
    compile_backendinductor
    compile_modedefault

    This is the node that decides whether your machine can do HeartMuLa at all. The HeartMuLa Loader (class JKHeartMuLaModelLoader) loads the 3B music-generation LLM - the thing that turns lyrics and tags into audio tokens. Nothing else in the pack runs without it, and unlike Stable Diffusion checkpoints, this thing is not small. Community reports put a no-optimization run around 19–20 GB VRAM on a 3090, so treat this as the "do I have the hardware" gate before you build anything else.

    It's a fork-of-a-fork situation worth knowing about. This pack (Crono141/ComfyUI-JK-HeartMuLa) is a fork of BobRandomNumber/ComfyUI-HeartMuLa that bolts on MuQ-MuLan reference-audio style transfer. The loader here is essentially unchanged from upstream - same class, rebranded with a JKHeartMuLa* id so it can sit next to other HeartMuLa packs without colliding.

    What it does

    Point it at the model folder, pick a version, get a HEARTMULA_MODEL out. Under the hood it loads HeartMuLaModel.from_pretrained from heartlib, in bfloat16 if your card supports it, fp32 otherwise. The two inputs that actually matter for a beginner:

    • base_path - folder under ComfyUI/models/. Default HeartMuLa, which is where the README tells you to put everything. There's a 📁 button on the node that browses folders instead of typing.
    • model_version - dropdown of the three released models: the default HeartMuLa-oss-3B-happy-new-year (the one you want), HeartMuLa-RL-oss-3B-20260123 (an RL-tuned variant), and the older HeartMuLa-oss-3B.

    The remaining three inputs (torch_compile, compile_backend, compile_mode) are performance tuning. Leave them off until the thing works - torch_compile is off by default and that's the right call.

    Weights: you download these yourself

    Nothing auto-downloads here. From your ComfyUI root:

    cd models
    git lfs install
    git clone https://huggingface.co/HeartMuLa/HeartMuLaGen HeartMuLa
    cd HeartMuLa
    git clone https://huggingface.co/HeartMuLa/HeartMuLa-oss-3B-happy-new-year
    

    The loader will throw a FileNotFoundError naming the exact folder if you've missed a step, so the error is actually helpful.

    The torch_compile rabbit hole

    torch.compile JIT-compiles the model into fused kernels. First run is slower (it compiles), later runs faster - and it's wrapped in suppress_errors, so a broken toolchain silently falls back to eager rather than crashing. The trap is compile_mode: reduce-overhead and max-autotune enable CUDA graphs, whose memory-pool check isn't supported by the cudaMallocAsync allocator ComfyUI uses by default. You'll get RuntimeError: cudaMallocAsync does not yet support checkPoolLiveAllocations. The fix is launching ComfyUI with:

    python main.py --disable-cuda-malloc
    

    or just keeping inductor + default, which is the reliable combo and what the README recommends.

    Install

    cd ComfyUI/custom_nodes
    git clone https://github.com/Crono141/ComfyUI-JK-HeartMuLa.git
    cd ComfyUI-JK-HeartMuLa
    pip install -r requirements.txt
    

    Restart ComfyUI and it appears under JK-HeartMuLa. You need a recent ComfyUI - the whole pack is built on the V3 node API. Wire the model output into a HeartMuLa Music Generator, and don't skip the Codec Loader on the decoder side; they're separate models loaded separately.

    One honest warning: the model obeys tags weakly at default settings - more on that in the generator's article - and each generation is a bit of a lottery draw. If you're expecting Suno-in-a-box, recalibrate. If you want local, free, controllable music with genuinely good vocals, this is the current open-weights state of the art.

    CategoryJK-HeartMuLa

    Inputs (5)

    NameTypeDefaultDescription
    base_pathSTRINGHeartMuLa
    model_versionCOMBOHeartMuLa-oss-3B-happy-new-year3 options: HeartMuLa-oss-3B-happy-new-year, HeartMuLa-RL-oss-3B-20260123, HeartMuLa-oss-3B
    torch_compileBOOLEANfalse
    compile_backendCOMBOinductor3 options: inductor, cudagraphs, eager
    compile_modeCOMBOdefault3 options: default, reduce-overhead, max-autotune

    Outputs (1)

    NameTypeDescription
    modelHEARTMULA_MODEL