Nodes/AutoExpress/AutoExpress Expression LoRAs
ComfyUI Node

AutoExpress Expression LoRAs

The node that downloads the LoRA and then waits to be wired

By deepratna-awale·Created 3 years ago·Updated about 2 hours ago· 27
AutoExpress Expression LoRAs
  • model
  • clip
  • model
  • clip
  • lora_trigger
◄ckpt_name▾►
◄prompt_styleauto►
◄architectureauto►
◄download_missingtrue►
◄intensity-1.00►
◄civitai_api_key►

What it actually does

AutoExpress's main trick is repainting a face with Impact Pack's FaceDetailer - detect, crop, resample the face at full resolution, paste it back - with an expression prompt instead of your normal one. A prompt alone gets you a smile. A prompt plus a LoRA trained on emotional faces gets you a smile that reads as an expression instead of a mouth drawn slightly wrong. This node is the "plus a LoRA" part.

It has two jobs, and the second is the one people miss. One: work out your checkpoint's architecture, then fetch and apply the matching expression LoRA. Two: emit the trigger words that LoRA needs, because a LoRA at weight 0.6 with no trigger in the prompt is mostly a small tax on your sampling time.

It's optional in the pack's own workflows. I'd still use it - the difference is visible, especially on Illustrious-family models where the pack ships two LoRAs, not one.

The mechanism

You feed it the model and clip you already loaded. It reads ckpt_name for clues (Pony merges and Illustrious finetunes look identical to plain SDXL from the weights alone), and it reads the loaded MODEL for the actual base - SD1.5, SDXL, Flux, whatever the config class says. Then it picks from a small table:

  • Pony - the Facial Expressions Pony LoRA at 0.6.
  • Illustrious / NoobAI - the Illustrious expressions LoRA at 0.6 and Face Enhancer Illustrious at 0.5. The expressions LoRA is deliberately skipped for anger, because it smudges the mouth.
  • SDXL - the XL v3 expressions LoRA.
  • SD1.5 - the SD1.5 expressions LoRA.
  • Flux - Expression Helper 2.0.

Weights get multiplied by an intensity scale: 0 at intensity 0, exactly as listed at 0.5, 1.5× at intensity 1. At 0 the LoRA is dropped entirely rather than applied at zero, which is why "turn the LoRAs off" and "set intensity to 0" are the same thing here.

If download_missing is on, it looks for a Civitai key, checks what's already in your LoRA folder, and downloads anything missing into your first models/loras path, verifying sha256 and recognising renamed files by their kohya hashes. Anything it still can't find is skipped with a warning - the graph keeps running, it just runs without that LoRA.

Inputs and outputs

The four you set:

  • ckpt_name - pick the same checkpoint you loaded. Its filename is what tells Pony and Illustrious apart from SDXL; get it wrong and the wrong LoRA gets applied.
  • prompt_style - leave on auto and it's derived from ckpt_name. Override it when your checkpoint has a name the regexes don't recognise (a custom merge called myGirl_v3.safetensors is just an anonymous SDXL as far as this node is concerned).
  • architecture - auto reads the loaded model, which is more reliable than the filename. Override it if you're doing something clever with a mismatched loader.
  • download_missing - on by default. Turn it off once everything's local.

And two extras: intensity (the same 0–1 slider as everywhere else in the pack, -1 for the family default) and civitai_api_key - leave it empty and it reuses the key from ComfyUI LoRA Manager, or CIVITAI_API_KEY / CIVITAI_API_TOKEN from your environment.

Three outputs: model and clip with the LoRAs applied - into the FaceDetailer, and into both CLIP Text Encode nodes for the positive and negative - and lora_trigger, a string. That one goes into the Expression Prompts node's lora_trigger input. Do not skip it. It's the difference between a LoRA that's shaping your expressions and a LoRA that's along for the ride.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/deepratna-awale/AutoExpress

Or search AutoExpress in ComfyUI Manager, or comfy node install autoexpress. Restart ComfyUI.

The face-inpainting route needs Impact Pack and Impact Subpack - FaceDetailer is in the base pack, but UltralyticsDetectorProvider moved out to Subpack as of v8.0 and isn't installed automatically. The example workflows all use face_yolov8m.pt from Subpack as the detector.

LoRAs are the other download: roughly 435 MB per expressions LoRA, 217 MB for the face enhancer. Civitai needs an API key for those downloads - no key, no LoRA, and a warning in the console rather than a crash.

Common problems

Nothing happens to the face. Check the lora_trigger wire first, then check ckpt_name. This is by far the most common failure with this node and it produces no error at all.

"Expression LoRA … is not installed, skipping." Either download_missing is off, no key was found, or the files went somewhere the node isn't looking. It writes to your first configured LoRA path - with extra_model_paths.yaml and several LoRA folders, "first" may not be the one you expected.

That's about it. It's two wires and a filename, and then it just works - this is the part of AutoExpress that needs the least babysitting.

CategoryAutoExpress

Inputs (8)

NameTypeDefaultDescription
modelMODEL—
clipCLIP—
ckpt_nameCOMBOThe checkpoint you loaded. Its name tells Pony and Illustrious apart from plain SDXL; the base (SD 1.5, SDXL, Flux) is read from the model.
prompt_styleCOMBOautoModel family the prompts are written for. 'auto' picks it from ckpt_name.
architectureCOMBOauto6 options: auto, flux, illustrious, pony, sd15, sdxl
download_missingBOOLEANtrue—
intensityoptFLOAT-1.00-1–1How strong the expression is, 0 (barely) to 1 (exaggerated). -1 uses the model family's default: 0.5 for anime and furry models, much lower for realistic ones, where strong expressions look uncanny.
civitai_api_keyoptSTRINGNeeded by Civitai for downloads. Leave empty to reuse the key from ComfyUI LoRA Manager or the CIVITAI_API_KEY / CIVITAI_API_TOKEN environment variable.

Outputs (3)

NameTypeDescription
modelMODELModel with the expression LoRAs applied.
clipCLIPCLIP with the expression LoRAs applied.
lora_triggerSTRINGTrigger words. Connect to AutoExpress Expression Prompts.