![]()
![]()
A community implementation for ComfyUI is available here: - ComfyUI-PixelSmile-Conditioning-Interpolation
Thanks to @judian17 for making this possible.
Quick start for PixelSmile inference.
Clone the repository and enter the project directory:
git clone https://github.com/Ammmob/PixelSmile.git
cd PixelSmile
Create and activate a clean conda environment:
conda create -n pixelsmile python=3.10
conda activate pixelsmile
Install the inference dependencies:
pip install -r requirements.txt
⚠️ Important! Patch the current diffusers installation for the Qwen image edit bug:
bash scripts/patch_qwen_diffusers.sh
If you want to train PixelSmile, install the additional training dependencies on top of the inference environment:
pip install -r requirements-train.txt
We recommend downloading all models to ./weights
PixelSmile uses Qwen-Image-Edit-2511 as the base model, you can download from Hugging Face.
| Model | Version | Data Type | Download |
|---|---|---|---|
| PixelSmile-preview | Preview | Human | Hugging Face |
✨ A more stable version is coming soon, with improved human expression editing performance and support for anime expression editing.
Training requires additional pretrained weights and auxiliary models.
| Model | Data Type | Download |
|---|---|---|
| clip-vit-large-patch14 | Human | Hugging Face |
| DanbooruCLIP | Anime | Hugging Face |
We use ArcFace for identity embedding during training.
./weights/antelopev2).glintr100.onnx to glintr100.pth using onnx2torch.# Inference models: Qwen base model + PixelSmile LoRA
bash scripts/download_infer_models.sh
# Training CLIP models: clip-vit-large-patch14 (human) + DanbooruCLIP (anime)
bash scripts/download_train_clip_models.sh
# Training InsightFace models: download antelopev2 and convert glintr100.onnx -> glintr100.pth
bash scripts/download_train_insightface.sh
The command below is an example for inference, model paths use our default directory: ./weights.
python pixelsmile/infer.py \
--image-path /path/to/input.jpg \
--output-dir /path/to/output \
--model-path ./weights/Qwen-Image-Edit-2511 \
--lora-path ./weights/PixelSmile-preview.safetensors \
--expression happy \
--data-type human \
--scales 0 0.5 1.0 1.5 \
--seed 42
This repository includes the training entry script at pixelsmile/train.py.
Use pixelsmile/configs/example.yaml as reference and configure your training file at pixelsmile/configs/config.yaml.
example.yaml already uses our default model directory layout under ./weights/....model.pretrained_path: ./weights/Qwen-Image-Edit-2511model.insightface_detector_path: ./weights/antelopev2/scrfd_10g_bnkps.onnxmodel.insightface_recognition_path: ./weights/antelopev2/glintr100.pth
Configure CLIP path by data type.
model.clip_path: ./weights/clip-vit-large-patch14Anime data: model.clip_path: ./weights/DanbooruCLIP
Configure dataset fields.
dataset.pathdataset.data_typeSingle GPU:
python pixelsmile/train.py --config pixelsmile/configs/config.yaml
Multi-GPU (recommended via accelerate):
accelerate launch pixelsmile/train.py --config pixelsmile/configs/config.yaml
Training outputs are saved under exps/<timestamp>/ (ckpts, logs, configs).
Before full training, start with a tiny run by temporarily setting:
dataset.max_samples: 8training.num_epochs: 1training.batch_size: 1training.gradient_accumulation_steps: 1If the smoke test works, switch back to your full training config.
If you find PixelSmile useful in your research or applications, please consider citing our work.
@article{hua2026pixelsmile,
title={PixelSmile: Toward Fine-Grained Facial Expression Editing},
author={Hua, Jiabin and Xu, Hengyuan and Li, Aojie and Cheng, Wei and Yu, Gang and Ma, Xingjun and Jiang, Yu-Gang},
journal={arXiv preprint arXiv:2603.25728},
year={2026}
}
$ claude mcp add PixelSmile \
-- python -m otcore.mcp_server <graph>