Turn a selfie into studio headshots — on your own GPU, for free.
People pay $40+ to apps that do this in the cloud with your face. headshot
does it locally: it generates a professional portrait and swaps your real face
onto it (via ReActor), so the
result actually looks like you — not a stranger who kinda resembles you.
headshot me.jpg # corporate look (default)
headshot me.jpg --style linkedin # pick a vibe
headshot me.jpg --style outdoor --count 4
headshot --list-styles # see them allOutput lands in ./headshots/.
| Style | Look |
|---|---|
corporate |
Dark suit, grey studio backdrop, soft key light |
linkedin |
Smart-casual blazer, blurred office, friendly + confident |
outdoor |
Natural daylight, blurred park, golden hour, warm |
creative |
Moody editorial, dramatic rim light, magazine cover |
bw |
Classic black & white, Rembrandt lighting, timeless |
A running ComfyUI with:
- the ReActor face-swap node, and
- the
inswapper_128.onnxmodel (+ a face-restore model likeGFPGANv1.4.pth).
No ComfyUI yet? → ai-workstation.
ReActor node → ComfyUI-ReActor.
headshot itself only needs Python 3 (standard library).
git clone https://github.com/CastilloworksAi/headshot.git
cd headshot
./setup.sh # link `headshot`, check ComfyUI + ReActor
headshot --check # confirm everything's wired
headshot me.jpg --style linkedinyour selfie ─────────────────────────────┐ (source face)
▼
prompt → checkpoint → KSampler → VAE → [ReActor face swap] → SaveImage → ./headshots/
(generates a clean studio portrait "base") ▲
puts your real face on the base
Because the base is freshly generated, you get clean studio lighting and wardrobe; because ReActor swaps your actual face on top, it stays you.
- Use a clear, front-facing selfie with even lighting — that's the face it copies.
--count 4gives you variations (it nudges the seed each time); keep the best.- Different
--stylevalues reuse the same face, so you can build a whole set.
| Flag | Default | Meaning |
|---|---|---|
--style |
corporate |
one of the styles above |
--count |
1 |
how many variations to make |
--model |
juggernautXL_v9.safetensors |
base checkpoint |
--steps |
28 |
sampler steps |
--seed |
random | reproduce a result |
--size |
832x1216 |
portrait WxH |
--out |
./headshots |
output folder |
--dry-run |
— | print the graph, generate nothing |
--check |
— | verify ComfyUI + ReActor |
--list-styles |
— | print styles |
bash tests/test.shNo GPU/ComfyUI/model needed: it checks syntax, that the generate→swap graph is
valid and wired correctly (selfie → ReActor source, base → ReActor input), that
all styles exist, and that --dry-run injects the right style + selfie. CI also
runs shellcheck.
The face swap itself runs on your GPU through ComfyUI, so it can't run on a GPU-less CI box.
headshot --checkthen a real selfie confirms it live.
Only swap faces you have the right to use — your own, or someone who agreed. Don't make images of real people without their consent.
MIT — see LICENSE.