ComfyUI Node Runs on cloud

ExpData

Build an expression from raw numbers instead of sliders

By PowerHouseMan·Created 2 years ago·Updated 2 years ago· 2,667
ExpData
  • add_exp
  • exp
code10
value10.0
code20
value20.0
code30
value30.0
code40
value40.0
code50
value50.0

Expression Editor gives you named sliders - blink, smile, rotate_yaw - with a live preview, which is the friendlier way to build an expression for almost everyone. ExpData is the other way: raw numbered "code" and "value" pairs, no preview, no labels. If you're not sure why you'd want that, you probably don't need this node - reach for Expression Editor instead. ExpData exists for the case where you're generating expressions programmatically rather than posing them by hand.

What it's for

Picture driving facial animation from something other than a person dragging sliders: a spreadsheet of keyframe values, numbers computed elsewhere in your graph, or a script generating a sequence of expressions. ExpData is how you construct the pack's EXP_DATA object from raw values in that situation - it's a pure data-construction node, not an interactive editor. Notably it's not an output node (unlike most of the rest of this pack), which fits: it doesn't render a preview or write a file, it just produces data for something else to consume.

Inputs and outputs

Five code/value pairs: code1 through code5 (integers, default 0) each paired with value1 through value5 (floats, ranging -100 to 100 in steps of 0.1). Each pair addresses one axis of the same underlying expression vector that Expression Editor's named sliders control - just by a numeric index instead of a label. The optional add_exp input takes an existing EXP_DATA blob to merge with or build on top of, which is how you combine more than five codes: chain multiple ExpData nodes together, each contributing another five. The output, exp (EXP_DATA), feeds into Expression Editor's add_exp input, SaveExpData, or another ExpData / PrintExpData node downstream.

The honest gap

Here's the part worth saying plainly: neither the pack's README nor the node itself documents what each numeric code corresponds to. There's no lookup table shipped anywhere in the pack saying "code 3 is eyebrow" or similar. If you actually need this node, you're working from the pack's source (nodes.py) or reverse-engineering the mapping against Expression Editor's own sliders - not from published documentation. That's not a knowledge-base gap on our end, it's a real gap in the pack itself, so don't go looking for docs that don't exist.

Installing it

Same as the rest of the pack - registered with ComfyUI Manager under ComfyUI-AdvancedLivePortrait, or:

cd ComfyUI/custom_nodes
git clone https://github.com/PowerHouseMan/ComfyUI-AdvancedLivePortrait

Restart ComfyUI. No separate model or dependency is needed for this node specifically - it's pure Python data plumbing, no checkpoint involved.

Where people get stuck

Mostly: starting here at all. Unless you have a concrete reason to construct expression data numerically - an external data source, a script, a batch process - start with Expression Editor's sliders and live preview instead. You'll get to the expression you want faster and you'll actually be able to see what you're building.

If you are using it, the most common mistake is forgetting that unused code/value pairs still default to code=0, value=0 - which is itself a valid (if usually meaningless) entry. Leaving pairs at their defaults when you only meant to set two or three of the five can quietly zero out an axis you didn't intend to touch, especially once you're chaining several ExpData nodes via add_exp.

CategoryAdvancedLivePortrait

Inputs (11)

NameTypeDefaultDescription
code1INT0
value1FLOAT0.0-100–100
code2INT0
value2FLOAT0.0-100–100
code3INT0
value3FLOAT0.0-100–100
code4INT0
value4FLOAT0.0-100–100
code5INT0
value5FLOAT0.0-100–100
add_expoptEXP_DATA

Outputs (1)

NameTypeDescription
expEXP_DATA