ComfyUI Node

😊 Emotion Analyzer

A friendly lie β€” the 'analysis' is a random number seeded by image brightness

By kanibusΒ·Created about a year agoΒ·Updated about a year agoΒ· 5
😊 Emotion Analyzer
  • image
  • face_landmarks
  • emotion_scores
  • emotion_visualization
  • dominant_emotion
  • confidence
β—„sensitivity1.00β–Ί
β—„enable_micro_expressionsfalseβ–Ί
β—„smoothing0.30β–Ί
β—„wan_versionautoβ–Ί
β—„enable_t2i_adaptertrueβ–Ί
β—„cache_resultstrueβ–Ί

I'm going to save you some time: EmotionAnalyzer does not analyze emotions. This is the node in the kanibus/kanibus pack (a Claude-generated repo, last commit Aug 2025) where the gap between the marketing and the code is widest - and that's saying something for a pack that sells fake depth as "AI Depth Control."

Open nodes/emotion_analyzer.py and the function's own comment says it plainly: "Generate WAN-optimized emotion scores (replace with actual model)." Then it calls np.random.rand(len(self.basic_emotions)) - a uniform random draw - seeded by a hash of the image's mean brightness. In other words, the "scores" are random numbers that vary deterministically with how bright the image is, not with any facial expression. A smiling face and a screaming face with the same average brightness get the same "analysis."

What it actually produces

It builds a dict of emotion scores from that random draw, picks the max as dominant_emotion, draws a bar chart of the scores onto the image, and returns it all as:

  • emotion_scores (EMOTION_SCORES) - the dict
  • emotion_visualization (IMAGE) - the bar-chart overlay
  • dominant_emotion (STRING) - the argmax of the random scores
  • confidence (FLOAT) - which is just the top random score

enable_micro_expressions adds more random entries scaled by 0.5. sensitivity scales the random scores in wan_2.2 mode. None of it touches your subject's face. The only "input that matters" is face_landmarks (it accepts a LANDMARKS_468 object and then never reads it - same for the smoothing knob).

Installing

cd ComfyUI/custom_nodes
git clone https://github.com/kanibus/kanibus
cd kanibus    # lowercase - README's "cd Kanibus" fails on case-sensitive systems
pip install -r requirements.txt   # or requirements_minimal.txt if it clashes
python install.py

Restart ComfyUI, find it under Kanibus. No model downloads - there's no model. The README's "5.6GB of required ControlNet models" mandate doesn't apply.

What to do instead

Real emotion-from-face in this space is thin anyway - it's a niche, experimental area, and even serious systems lean on blink/expression priors rather than true affect. If you genuinely want facial-expression signal, the honest approach in this pack is NeuralPupilTracker (real blink detection via Eye Aspect Ratio and pupil dilation estimate) plus LandmarkPro468 (real landmark data you can compute expression metrics from yourself). If you want labels, look for a real affect-recognition model, not a seeded random draw.

Troubleshooting

  • Dominant emotion changes between images with similar brightness - that's the "deterministic-random" behavior; rerunning identical inputs gives identical outputs (same seed), but any brightness change reshuffles everything.
  • It always says something reasonable (happy, neutral, sad…) - because the labels are picked from a fixed list weighted toward neutral-ish outcomes. It will never crash, and it will never be right.

Bottom line: this node is a placeholder shipped as a feature. If a workflow you downloaded uses it, rip it out and don't look back. The real value in this pack is the tracking nodes - this one is theater.

CategoryKanibus

Inputs (8)

NameTypeDefaultDescription
imageIMAGEβ€”
sensitivityFLOAT1.000.1–3β€”
face_landmarksoptLANDMARKS_468β€”
enable_micro_expressionsoptBOOLEANfalseβ€”
smoothingoptFLOAT0.300–1β€”
wan_versionoptCOMBOauto3 options: wan_2.1, wan_2.2, auto
enable_t2i_adapteroptBOOLEANtrueβ€”
cache_resultsoptBOOLEANtrueβ€”

Outputs (4)

NameTypeDescription
emotion_scoresEMOTION_SCORESβ€”
emotion_visualizationIMAGEβ€”
dominant_emotionSTRINGβ€”
confidenceFLOATβ€”