Nodes/ComfyUI-Roboflow/Label Emotions
ComfyUI Node

Label Emotions

Emotion labels on every face, from a hosted model — no weights ever hit your disk

By DareFail·Created 2 years ago·Updated 2 years ago· 34
Label Emotions
  • input_image1
  • output_image1
workspace_name
workflow_idrecognize-emotions
api_key
input_image1_keyimage
output_image1_keyannotated_image

The demo-iest node in the pack, and honestly the one the README leads with. Label Emotions detects human faces in an image and hands back the same image with a box around each face and an emotion label attached - except the detection runs on Roboflow's hosted "Recognize Emotions" workflow, so zero models download to your machine. Want to know whether your render reads as happy, angry, or surprised? That's one node, one wire, and one API key away.

Mechanically it's the same machinery as the pack's Custom Workflow node, just pre-wired. The node defaults workflow_id to recognize-emotions, sends your image under the key image, and expects the response to contain a key named annotated_image. It POSTs to https://detect.roboflow.com/infer/workflows/{workspace_name}/{workflow_id} with your API key and a base64 JPEG, then decodes the returned annotated image back into a ComfyUI tensor.

The inputs that matter:

  • workspace_name and api_key - the only two you must fill in yourself. Your workspace slug from app.roboflow.com plus a free API key from roboflow.com.
  • workflow_id - defaults to recognize-emotions, which is right as long as you use the template as-is.
  • input_image1 - wire your Load Image output here.
  • input_image1_key ("image") and output_image1_key ("annotated_image") - the defaults match the template; only touch them if you built a custom workflow of your own.

The single output, output_image1, is the annotated image. Route it into a Preview Image or Save Image node and you're done - the pack's own tutorial does exactly that.

One prerequisite people miss: the Recognize Emotions template has to actually exist and be deployed in your Roboflow workspace. In app.roboflow.com: Create Workflow → Start from a Template → Recognize Emotions, then click Deploy Workflow in the top right. The node doesn't deploy anything for you - it only talks to a workflow that's already live. And if you copied the template, its id may carry a generated suffix, so copy the real workflow_id from the deploy page's Python snippet rather than trusting the default.

Install is the pack-wide story: search ComfyUI-Roboflow in ComfyUI Manager, or:

cd ComfyUI/custom_nodes
git clone https://github.com/DareFail/ComfyUI-Roboflow

Restart ComfyUI and the node appears under Roboflow. No model downloads, no extra pip packages - pyproject declares zero dependencies and the code uses only requests, numpy, Pillow and torch, all bundled with ComfyUI. Your only external requirement is that free Roboflow API key.

Same caveats as the pack's other nodes: there's no HTTP-status check, so a failed call returns an empty image and your graph keeps running as if nothing happened; your image is re-encoded as JPEG on the way out (alpha dropped); and it's a hosted round trip, so it needs internet and consumes API credits. Set accuracy expectations too - this is a small hosted face classifier, fine for a fun demo or a rough vibe check, not something to run a safety pipeline on. The pack has been dormant since September 2024, and emotion labeling is the toy example of what Roboflow workflows can do. When you outgrow it, the Custom Workflow - 1 Image node in the same pack does exactly this with any workflow you build.

CategoryRoboflow

Inputs (6)

NameTypeDefaultDescription
workspace_nameSTRING
workflow_idSTRINGrecognize-emotions
api_keySTRING
input_image1IMAGE
input_image1_keySTRINGimage
output_image1_keySTRINGannotated_image

Outputs (1)

NameTypeDescription
output_image1IMAGE