Extensions/AutoExpress
ComfyUI Extension

AutoExpress

Nodes for generating a character's facial expressions: expression prompt lists per model family (Danbooru, e621, Pony, Illustrious, SDXL, natural language) for Impact Pack FaceDetailer, expression LoRA loading, saving by expression name, and a labelled sprite sheet.

By deepratna-awale·Created 3 years ago·Updated about 23 hours ago· 32
deepratna-awale/AutoExpress
Nodes6
On cloudLocal install
CategoryAutoExpress
Stars32
Updatedabout 23 hours ago
Readme
<h1 align="center"><img src="autoexpress/static/ico/favicon-rounded.png" alt="" width="28"> AutoExpress</h1> <p align="center"><b>One character image in, a full set of 28 facial expressions out.</b></p> <p align="center"> <a href="LICENSE"><img src="https://img.shields.io/github/license/deepratna-awale/AutoExpress" alt="MIT license"></a> <a href="https://github.com/deepratna-awale/AutoExpress/releases"><img src="https://img.shields.io/github/v/release/deepratna-awale/AutoExpress" alt="Latest release"></a> <a href="https://registry.comfy.org/nodes/autoexpress"><img src="https://img.shields.io/badge/Comfy%20Registry-autoexpress-blue" alt="Comfy Registry"></a> <img src="https://img.shields.io/badge/python-3.10%2B-blue" alt="Python 3.10+"> </p>

AutoExpress repaints a character's face with 28 different emotions and keeps everything else the same: pose, outfit, background and art style. It's made for expression sprites, such as SillyTavern character cards and visual novels.

<p align="center"> <img src=".github/readme/hero.jpg" alt="One input image and the joy, anger, sadness, surprise and embarrassment expressions AutoExpress made from it" width="100%"> </p>

Features

  • Runs where you already generate images. It works as an extension for AUTOMATIC1111, Forge, reForge and SD.Next, as custom nodes for ComfyUI (and SwarmUI), and as a node for InvokeAI. There's also a standalone app that drives any of those over their API, locally or on a remote GPU.
  • Sprites straight into SillyTavern. The SillyTavern extension makes a character's expression sprites from its avatar and puts them in Character Expressions as they finish.
  • Prompts tuned per model family. Separate expression prompts for Danbooru-tag anime models, Pony, Illustrious/NoobAI, SDXL and natural-language models such as Flux. Auto picks the family from the checkpoint name.
  • Expression LoRAs. It downloads and applies the right expression LoRA for the checkpoint, reusing a Civitai key you already have set up.
  • Login for protected WebUIs. Username and password, a token or extra headers (such as Cloudflare Access) for a WebUI behind a login. They stay on the AutoExpress server and never reach the page or the log.
  • Retry one expression. Make a single expression again with a new seed, or with its own prompt, intensity and settings, and save those with the character for every later run.
  • Two ways to edit. Face inpainting uses ADetailer or FaceDetailer. Instruction editing uses Qwen-Image-Edit on ComfyUI, which also works on photos.
  • Animated sprites. Every expression can become a seamless looping animation that keeps playing for as long as it's shown (Wan 2.2 image to video on ComfyUI), transparent if you like, with an idle animation written from the character card. Examples.
  • Live2D models from pictures. A ready-to-play puppet for the SillyTavern Live2D extension, and a layered PSD to rig a full Live2D model in Cubism Editor. The puppet blinks, breathes, turns its head with depth, follows the cursor and plays the 28 expressions, gliding from one to the next, and reacts to touch (a boop on the nose, a pat on the head). Its mouth has separate teeth and tongue for 15 TTS visemes. Its hair, skirts and ribbons sway, and the bust and hips jiggle. You can drag hair, clothes and soft parts with the mouse or poke them. Layers are split at 2048 px and cleaned up: skin is solid and the hair colour is painted under the bangs.
  • Swappable clothing for Live2D puppets. Optional, and only for drawn adult characters. The body, the inner wear and the outer clothes become separate layers, and outfit switches change between them. The undress chain builds them from the picture itself: a vision model tags the clothes, each garment comes off in its own edit with every other pixel kept, and the puppet stays in the picture's pose.
  • One intensity slider sets how far each expression is pushed.
  • Ready for sprites. Files are named after their expression, and each run can save a labelled sprite sheet.

Examples

Each sheet shows one input image and eight of its expressions, at 1024×1024. Click a sheet to see it full size.

<table> <tr> <th>NoobAI-XL (Illustrious)</th> <th>Pony V6 XL</th> <th>Animagine XL 4 (Danbooru)</th> </tr> <tr> <td width="33%"><a href=".github/readme/sheet_noobai.jpg"><img src=".github/readme/sheet_noobai.jpg" alt="NoobAI-XL expression sheet"></a></td> <td width="33%"><a href=".github/readme/sheet_pony.jpg"><img src=".github/readme/sheet_pony.jpg" alt="Pony V6 XL expression sheet"></a></td> <td width="33%"><a href=".github/readme/sheet_animagine.jpg"><img src=".github/readme/sheet_animagine.jpg" alt="Animagine XL 4 expression sheet"></a></td> </tr> </table>

Photos work too. This set was made from a generated portrait with the instruction edit mode (Qwen-Image-Edit-2511) at the default intensity. Only the edited face is pasted back onto the original photo.

<p align="center"> <a href=".github/readme/sheet_portrait.jpg"><img src=".github/readme/sheet_portrait.jpg" alt="A realistic portrait and its anger, sadness and surprise expressions" width="100%"></a> </p>

Animated sprites

Turn on Animate and every expression also comes out as a looping animated WebP. Each clip starts and ends on the same still, so it plays on forever without a visible jump: the character keeps breathing, blinking and moving a little for as long as the sprite is on screen. In SillyTavern the sprite of the current emotion just keeps playing beside the chat until the next message changes it.

<table> <tr> <td width="25%" align="center"><img src=".github/readme/animated/neutral.webp" alt="Looping idle animation: breathing, blinking and a slow sway"><br><sub>neutral (idle, from the character card)</sub></td> <td width="25%" align="center"><img src=".github/readme/animated/pride.webp" alt="Looping pride animation: a confident smile with peace signs"><br><sub>pride</sub></td> <td width="25%" align="center"><img src=".github/readme/animated/curiosity.webp" alt="Looping curiosity animation: leaning in with a small head tilt"><br><sub>curiosity</sub></td> <td width="25%" align="center"><img src=".github/readme/animated/anger.webp" alt="Looping anger animation: a frown and clenched fists"><br><sub>anger</sub></td> </tr> </table>

The clips are made with Wan 2.2 image to video on ComfyUI and saved with a transparent background. The character reacts but never talks, so the loops read as an emotion display rather than speech. See Animated sprites for how it works and more examples.

Installation

Pick the setup you already use. They all share the same expression prompts and generation logic. Inside a WebUI, AutoExpress runs in-process, so the WebUI doesn't need --api.

| You use | Install | Guide | | --- | --- | --- | | AUTOMATIC1111, Forge, reForge, SD.Next | Extensions → Available, search for AutoExpress. Needs ADetailer. | docs/a1111.md | | ComfyUI (and SwarmUI) | ComfyUI Manager, or comfy node install autoexpress. Needs Impact Pack and Subpack. | docs/comfyui.md | | InvokeAI | Nodes → Git Repository URL with this repo's URL | docs/invokeai.md | | Standalone app (drives any of the above) | Release zip or docker run -p 5000:5000 ghcr.io/deepratna-awale/autoexpress | docs/standalone.md | | SillyTavern | Extensions → Install extension with this repo's URL. Needs the standalone app running. | docs/sillytavern.md |

Fooocus has no extension system, so it isn't supported.

Quick start

  1. Install AutoExpress for your WebUI (see above), then open the AutoExpress tab, a ready-made ComfyUI workflow from example_workflows/, or the standalone app at http://127.0.0.1:5000.
  2. Drop in a character image. The prompt, checkpoint, sampler and seed are read from its metadata when it has any.
  3. Leave Prompt Style on Auto, pick the expressions you want, and press Generate.
  4. The results are saved as joy.png, anger.png and so on, ready to use as SillyTavern sprites. The SillyTavern extension does this step for you.
<table> <tr> <td width="50%"><a href="docs/a1111.md"><img src=".github/readme/a1111_tab.jpg" alt="The AutoExpress tab in AUTOMATIC1111"></a><br><sub>AutoExpress tab in AUTOMATIC1111</sub></td> <td width="50%"><a href="docs/comfyui.md"><img src=".github/readme/comfyui_graph.jpg" alt="AutoExpress nodes in ComfyUI"></a><br><sub>AutoExpress nodes in ComfyUI</sub></td> </tr> <tr> <td colspan="2"><a href="docs/standalone.md"><img src=".github/readme/nextjs_ui.jpg" alt="The standalone AutoExpress web interface"></a><br><sub>Standalone web interface</sub></td> </tr> <tr> <td width="50%"><a href="docs/standalone.md#retrying-one-expression"><img src=".github/readme/ui_retry.jpg" alt="Retrying one expression with its own prompt and settings"></a><br><sub>Retry one expression with its own prompt and settings</sub></td> <td width="50%"><a href="docs/live2d.md#making-a-kit"><img src=".github/readme/ui_live2d.jpg" alt="The Live2D model kit dialog"></a><br><sub>Live2D model kit</sub></td> </tr> </table>

Expressions

| | | | | | --- | --- | --- | --- | | Admiration | Amusement | Anger | Annoyance | | Approval | Caring | Confusion | Curiosity | | Desire | Disappointment | Disapproval | Disgust | | Embarrassment | Excitement | Fear | Gratitude | | Grief | Joy | Love | Nervousness | | Neutral | Optimism | Pride | Realization | | Relief | Remorse | Sadness | Surprise |

You can generate all of them, or only the ones you pick.

Documentation

The full documentation is in docs/:

Contributing

Contributions are welcome. See CONTRIBUTING.md to set up a dev environment and run the tests, and read the Code of Conduct. Report security issues as described in SECURITY.md. Changes are listed in the changelog. AI coding agents and assistants: see AGENTS.md for setup, the backends each feature needs, GPU deployment and the HTTP API.

Acknowledgements

License

MIT