Nodes/FLOAT Optimized/FLOAT Encode Emotion to latent we (Ad)
ComfyUI Node

FLOAT Encode Emotion to latent we (Ad)

Giving the face feelings

By set-soft·Created about a year ago·Updated about a year ago· 33
FLOAT Encode Emotion to latent we (Ad)
  • processed_audio_features
  • float_pipe
  • we_latent
  • float_pipe
emotionnone

Your talking head has two conditioning levers: what's said, and how it's said. The audio latent (wa) handles what; FLOAT Encode Emotion to latent we (Ad) handles how - it produces we_latent, the emotion conditioning that tells the motion model whether this is an angry rant or a gentle surprise. Two modes, one node, and both are dead simple to use.

Mode 1 - you pick the emotion. The emotion dropdown gives you none, angry, disgust, fear, happy, neutral, sad, surprise. Choose one and the node builds a one-hot encoded emotion vector - essentially a flag that says "make the expression lean this way." This is the override: great for forcing a mood onto neutral audio, or for testing how a single emotion changes the whole performance.

Mode 2 - the model reads the room. Leave emotion at none and the node runs the preprocessed audio features through FLOAT's speech-emotion-recognition model (a Wav2Vec 2.0 fine-tune) and predicts the emotion from the voice itself. This is the default behavior, and it's the one that makes the "just feed it a clip and let it act" workflow work.

Inputs and outputs

  • processed_audio_features - from FLOAT Encode Audio to latent wa. Important: it wants the processed features (the ones before the main Wav2Vec pass), not the final wa_latent. Wire the right output or the emotion encoder won't know what to do.
  • float_pipe - carries the internal emotion encoder.
  • emotion - the dropdown above.

Outputs: we_latent (feeds FLOAT Sample Motion Sequence rd alongside wa_latent and r_s_latent) and a float_pipe passthrough.

The emotion signal is then scaled by e_cfg_scale at sampling time - the Advanced sampler's default is 1.0, and raising it makes the target emotion express itself more strongly. If you've forced happy and the result still looks flat, that's the knob to pull, not the emotion dropdown.

Honest limitations

The emotion model was trained on English, so it'll read English speech far better than anything else, and its palette is those eight categories - no subtler valence. That's a real constraint on "how the face feels," and it's worth remembering before you promise a director-style range of expression. There's also a newer, experimental sibling in this pack, FLOAT Extract Emotion (Dynamic), that segments the audio and lets emotion change over time - one static we_latent per clip is this node's thing, which is exactly right for most clips.

Install is the pack standard: ComfyUI Manager search "ComfyUI-FLOAT_Optimized", or git clone https://github.com/set-soft/ComfyUI-FLOAT_Optimized into custom_nodes, pip install -r requirements.txt, restart, first-run model download. And the standing reminder: the whole FLOAT model is CC BY-NC-SA 4.0 - non-commercial.

CategoryFLOAT/Advanced

Inputs (3)

NameTypeDefaultDescription
processed_audio_featuresTORCH_TENSOR
float_pipeFLOAT_PIPE
emotionCOMBOnone8 options: none, angry, disgust, fear, happy, neutral, +2

Outputs (2)

NameTypeDescription
we_latentTORCH_TENSOR
float_pipeFLOAT_PIPE