Nodes/ComfyUI-IndexTTS2/IndexTTS2 Emotion From Text
ComfyUI Node

IndexTTS2 Emotion From Text

Type a feeling, get an emotion vector — a local Qwen model does the translating

By snicolast·Created 12 months ago·Updated 11 months ago· 212
IndexTTS2 Emotion From Text
    • EMOTION_VECTOR
    • STRING
    text

    The Emotion Vector node makes you dial in emotion by hand, eight sliders at a time. This node is the lazier, arguably nicer version: type "a tired person reading bad news" and a local Qwen model turns that into the same 8-value emotion vector automatically - plus a human-readable summary of what it decided. It sits between the two emotion sources in the pack: you don't need a second audio clip, and you don't need to guess slider positions.

    How it works

    Under the hood it loads QwenEmotion, a small Qwen 0.6B fine-tune the IndexTTS2 project ships for exactly this purpose. The model reads your text, returns a per-emotion score for the same eight dimensions (happy, angry, sad, afraid, disgusted, melancholic, surprised, calm), and the node packages them into an EMOTION_VECTOR, clamped so no single value exceeds 1.4 and the total stays at or under 1.5. It also returns a STRING showing the detected vector, e.g. Detected emotion vector (sum=1.10): happy=0.05, sad=0.55, ... - that output is worth actually reading, because it tells you what the model thinks your words mean, which may not match what you meant.

    The inputs and outputs

    Just one required input: text (multiline), the emotion description. Outputs are the EMOTION_VECTOR - wire it to emotion_vector on IndexTTS2 Simple or Advanced - and the STRING summary. That's it. It's a dead-simple node whose only real cost is setup.

    Install and the extra model

    This is the one node in the pack with a hidden dependency. It needs modelscope (already in the pack's requirements.txt) and a local copy of the QwenEmotion model at checkpoints/qwen0.6bemo4-merge inside the pack's directory. The model isn't part of the main IndexTTS-2 HuggingFace download - it comes from ModelScope and has to land in that exact folder. If you install the pack and this node errors on first use, that path is the first thing to check, because the main TTS model can be present and this one can still be missing.

    Common issues

    • ImportError: modelscope is required - the pack's requirements didn't finish installing, or you're in the wrong Python environment. Install it and restart.
    • FileNotFoundError: QwenEmotion model not found - the model isn't in checkpoints/qwen0.6bemo4-merge. This is the setup step most people skip.
    • Sum cap errors - if the model's read of your text pushes the vector over 1.5, the node refuses. Shorten or rephrase the description, or patch the result with the Emotion Vector node.

    It's a niche helper, but for anyone generating a lot of TTS lines it's the difference between guessing at sliders and describing a mood. The model's summaries have personality too - it sometimes reads your "sad" text as melancholic instead, and that's worth knowing before you wire it into a long batch.

    CategoryAudio/IndexTTS

    Inputs (1)

    NameTypeDefaultDescription
    textSTRING

    Outputs (2)

    NameTypeDescription
    EMOTION_VECTOREMOTION_VECTOR
    STRINGSTRING