Nodes/ComfyUI-ThinkSound_Wrapper/🎡 ThinkSound Model Loader
ComfyUI Node

🎡 ThinkSound Model Loader

ThinkSound's model loader is picky about precision β€” here's what it's actually doing

By ShmuelRonenΒ·Created about a year agoΒ·Updated about a year agoΒ· 22
🎡 ThinkSound Model Loader
    • thinksound_model
    β—„thinksound_modelβ–Ύβ–Ί
    β—„precisionfp32β–Ί
    β—„offload_deviceautoβ–Ί

    Every ThinkSound workflow in ComfyUI starts with the same node: the ThinkSound Model Loader drags the main diffusion checkpoint into the graph so the Sampler can actually generate anything. ThinkSound is FunAudioLLM's open-source model that turns text - and optionally silent video - into audio, using a Chain-of-Thought description to decide what the scene should sound like. This loader is the boring, necessary front door: point it at a .ckpt, and it hands the Sampler a ready-to-run thinksound_model. If it loads, the rest of the workflow is smooth sailing. If it doesn't, you're staring at a wall of tensor errors.

    What it does under the hood

    The node is a thin wrapper over the original ThinkSound code, but the loading logic is worth knowing because it's where people get burned. It finds a thinksound.json model config (there's a built-in fallback if it can't), builds the diffusion model from that config, then loads your checkpoint's weights with strict=False and a state-dict key fixer that strips or adds model./diffusion. prefixes so the weights actually line up. The point: this isn't a one-click torch.load. If the checkpoint keys don't match, the node warns about missing/unexpected keys and tries to load whatever's compatible rather than dying. That's unusually forgiving for a wrapper.

    The two inputs you actually touch

    • thinksound_model - a .ckpt from ComfyUI/models/thinksound/. The README's Google Drive bundle has thinksound_light.ckpt, which is the sensible starting point; the full thinksound.ckpt from the FunAudioLLM Hugging Face repo is a big, slow upgrade that wants 24GB+ VRAM. The dropdown is populated from that one folder, so if it's empty the files aren't where ComfyUI expects.
    • precision - fp32 (default) or fp16. This is the trap. ThinkSound is built around fp32, and the README explicitly warns that forcing fp16 causes Input type (float) and bias type (struct c10::Half) errors. The dropdown exists because the code supports it, but on a CUDA machine fp16 paths are the wrong choice here - leave it on fp32 and don't "optimize" it.
    • offload_device - auto (default) or cpu, i.e. where the model sits when it's not generating. auto picks the sensible offload target, which is what you want on a 12GB card.

    It outputs one thing: thinksound_model, wired to the Sampler's thinksound_model input.

    Install and models

    Install via ComfyUI Manager (search "ThinkSound") or cd ComfyUI/custom_nodes && git clone https://github.com/ShmuelRonen/ComfyUI-ThinkSound_Wrapper, then pip install -r requirements.txt. That step is not optional - the pinned audio stack (alias-free-torch==0.0.6, descript-audio-codec==1.0.0, vector-quantize-pytorch==1.9.14) is what makes the model load at all. Restart ComfyUI and you should see βœ… SUCCESS-style lines in the console. The models themselves are a manual download: the Google Drive pack unzips into ComfyUI/models/thinksound/.

    When it goes wrong

    If you get "ThinkSound source code not installed," the vendored thinksound/ folder inside the pack is missing - re-clone, don't hunt for a separate download. "Tensors must have same number of dimensions" is the classic sign you're on an old version or forced fp16; pull latest (git pull origin main) and keep precision on fp32. And if loading succeeds but generation silently ignores your prompts, the loader isn't the problem - go check the Feature Utils Loader and your CoT description instead.

    CategoryThinkSound

    Inputs (3)

    NameTypeDefaultDescription
    thinksound_modelCOMBOThinkSound main model (.ckpt files from 'ComfyUI/models/thinksound' folder)
    precisionCOMBOfp32Model precision (fp32 recommended for stability)
    offload_deviceCOMBOautoDevice to offload model when not in use

    Outputs (1)

    NameTypeDescription
    thinksound_modelTHINKSOUND_MODELβ€”