Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

2 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

headshot 📸

ci license: MIT

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 all

Output lands in ./headshots/.


Styles

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

Requirements

A running ComfyUI with:

  • the ReActor face-swap node, and
  • the inswapper_128.onnx model (+ a face-restore model like GFPGANv1.4.pth).

No ComfyUI yet? → ai-workstation. ReActor node → ComfyUI-ReActor. headshot itself only needs Python 3 (standard library).

Quick start

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 linkedin

How it works

your 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.

Tips for good results

  • Use a clear, front-facing selfie with even lighting — that's the face it copies.
  • --count 4 gives you variations (it nudges the seed each time); keep the best.
  • Different --style values reuse the same face, so you can build a whole set.

Usage

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

Development

bash tests/test.sh

No 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 --check then a real selfie confirms it live.

A note on consent

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.

License

MIT — see LICENSE.

About

Turn a selfie into studio headshots on your own GPU, for free. Generates a pro portrait and swaps your real face onto it via ReActor.

Resources

Stars

1 star

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages