Nodes/ComfyUI-ThinkSound_Wrapper/πŸ”§ ThinkSound Feature Utils Loader
ComfyUI Node

πŸ”§ ThinkSound Feature Utils Loader

VAE + Synchformer in one box

By ShmuelRonenΒ·Created about a year agoΒ·Updated about a year agoΒ· 22
πŸ”§ ThinkSound Feature Utils Loader
    • feature_utils
    β—„vae_modelβ–Ύβ–Ί
    β—„synchformer_modelβ–Ύβ–Ί
    β—„precisionfp32β–Ί
    β—„enable_offloadtrueβ–Ί

    If you've set up a ThinkSound workflow in ComfyUI, this is the node people tend to skip past on the way to the sampler - and then wonder why their audio has nothing to do with their prompt. ThinkSound is FunAudioLLM's text/video-to-audio model that reasons about what should happen before it makes sound (the "Chain-of-Thought" in the name). The ThinkSound Feature Utils Loader is the conditioning brain: it loads the two models that turn your words and your frames into features the diffusion model can condition on. You can't generate without it, and you'll usually leave it alone after it's wired in.

    What it actually loads

    The pack wraps the original ThinkSound code, and the guts of this node are a FeaturesUtils object built from two pieces:

    • A VAE - the audio autoencoder that maps audio to and from the latent space the diffusion model works in. This is the Descript-style codec (the wrapper uses the stable_audio_2_0_vae config). You only see its effects at decode time, but the whole pipeline depends on it.
    • Synchformer - the temporal model that reads motion from video frames so generated sound lines up with what's moving on screen. This is the "video-to-audio" half of ThinkSound.

    So when the README shows a basic workflow of Model Loader β†’ Sampler and Feature Utils Loader β†’ Sampler, this node is the second feed. It produces a single feature_utils output that plugs straight into the sampler's feature_utils input. Nothing else consumes it.

    The inputs that matter

    • vae_model - a .ckpt file from ComfyUI/models/thinksound/. In the current source this dropdown validates that the file exists, but the VAE itself is actually built from its JSON config with vae_ckpt=None; if you swap files here and hear no difference, that's why. Don't fight it.
    • synchformer_model - a .pth file (the download bundle ships synchformer_state_dict.pth). This one is genuinely loaded from the file you pick, so get this right.
    • precision - fp32 (default) or fp16. Leave it on fp32. The README is blunt that ThinkSound wants fp32 and forcing half precision throws tensor dimension errors.
    • enable_offload - on by default, and it's how the node stays alive on 8–12GB cards: the models get shoved to CPU when not in use.

    Getting the models in place

    First, get the pack itself - ComfyUI Manager (search "ThinkSound") or cd ComfyUI/custom_nodes && git clone https://github.com/ShmuelRonen/ComfyUI-ThinkSound_Wrapper - then pip install -r requirements.txt and restart ComfyUI. The requirements are genuinely heavy and pinned (alias-free-torch==0.0.6, descript-audio-codec==1.0.0, vector-quantize-pytorch==1.9.14). The classic failure is ImportError: No module named 'alias_free_torch', which just means those pins didn't land.

    Then the models, which do not auto-download. The README points you to a Google Drive bundle containing vae.ckpt and synchformer_state_dict.pth (plus thinksound_light.ckpt for the main model). Unzip it into ComfyUI/models/thinksound/ - the wrapper registers that folder, so files there show up in the dropdowns. The bigger thinksound.ckpt from Hugging Face is optional and wants 24GB+ VRAM; the light checkpoint is where you start.

    Troubleshooting

    The "ThinkSound source code not installed" error looks scary but just means the vendored thinksound/ folder inside the pack got lost or renamed - re-clone the repo and you're fine. If the dropdowns are empty, the models aren't in ComfyUI/models/thinksound/. And if generated audio ignores your prompt entirely, check that both loader nodes are feeding the sampler - the Sampler won't tell you politely.

    CategoryThinkSound

    Inputs (4)

    NameTypeDefaultDescription
    vae_modelCOMBOVAE model (.ckpt files from 'ComfyUI/models/thinksound' folder)
    synchformer_modelCOMBOSynchformer model (.pth files from 'ComfyUI/models/thinksound' folder)
    precisionCOMBOfp32Feature extraction precision (fp32 recommended)
    enable_offloadBOOLEANtrueEnable model offloading to save VRAM

    Outputs (1)

    NameTypeDescription
    feature_utilsTHINKSOUND_FEATUREUTILSβ€”