Nodes/comfyui-magic-hour/Magic Hour: AI Headshot Generator
ComfyUI Node

Magic Hour: AI Headshot Generator

Magic Hour: AI Headshot Generator

By magichourhq·Created about 17 hours ago·Updated about 16 hours ago· 0
Magic Hour: AI Headshot Generator
  • image
  • image
  • image_paths
  • credits_charged
◄prompt►

No slider drama, no model list, no window maths. One image in, a professional headshot out. It's the least interesting node in this pack and possibly the one with the highest ratio of "actually used it" to "wrote about it".

Why it exists

LinkedIn photos. Author bios. A consistent avatar across six platforms. The job is: take the mediocre selfie someone has and return something that looks like it was shot by a person with a light and a backdrop. Doing that locally is a chain - face detailer, relight, background replacement, then a colour grade - and getting it to look professional rather than AI-generated is the hard part. The KB's photorealism doc is a long argument about exactly that gap.

Here it's one call. That's the whole pitch, and for this specific task it's a fair one.

How it works

image gets converted to a temp PNG and uploaded. If you've typed anything into the optional prompt, it goes along inside the style block; leave it blank and the request is a plain headshot conversion with the tool's own defaults. The result is downloaded into ComfyUI/output/magic_hour/ and returned.

prompt being optional-but-sent-only-when-non-empty is worth understanding: an empty string is skipped, not sent as an empty style. So the distinction between "no prompt" and "a prompt" is a real branch in the request, and blank is the sensible default. Use the prompt when you want something specific - "corporate, grey backdrop, soft key light" or "outdoor, late afternoon" - rather than to describe the person, which the input image already does.

And the standing rule for every image input in this pack: only the first image in a batch is used. Upload eight selfies in one batch and you'll get one headshot.

Inputs and outputs

  • image (required) - the source portrait. Front-on, decent resolution, eyes visible. A photo where the subject is squinting into the sun gives the tool nothing to work with.
  • prompt (optional, multiline) - style direction for the output.

Outputs are the pack's standard image trio: image (an IMAGE batch you can Preview, Save, or push through an upscale), image_paths (STRING, the saved file path(s) - newline-joined when more than one file lands), and credits_charged (INT, the per-run cost).

That credits_charged number is the thing to check on your first run, because the sensible workflow with this node is batch: one person, six variants, pick the best. Six paid calls is fine; sixty is a budget conversation.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/magichourhq/comfyui-magic-hour
pip install -r comfyui-magic-hour/requirements.txt

Restart ComfyUI; the nodes appear under Magic Hour. Dependencies: magic-hour>=0.87.1, full stop - no checkpoint download, no ControlNet, no relight LoRA. ComfyUI Manager users can search "Magic Hour".

export MAGIC_HOUR_API_KEY=your_key_here

before launching, or write the bare key into comfyui-magic-hour/api_key.txt. The pack's author keeps keys out of widgets deliberately, since widget values are stored in the workflow JSON and shared along with it.

The honest caveats

Likeness drift. These tools produce a professional photo of someone who looks a lot like you. Widen the mouth slightly, change the jaw a touch, and it stops reading as you to people who know you. If exact likeness matters - an ID photo, a profile people will match against reality - use a local identity-locked pipeline where you control the reference weight, or accept the drift.

Smoothing. Professional headshot models are trained on retouched photos, so the output has retouching baked in. Skin texture, pores, stray hairs - gone. It looks like a good photo and slightly unlike a real face. Turn off any further detail-enhancement downstream or you'll compound it.

It's the most obviously gendered-by-training node in the pack. Corporate headshot datasets skew a particular way; if your subject isn't in that distribution, the "professional" result can be a strange one. Look at the output before you send it to anyone.

Uploading a face. This is a photo of a person going to a third party. For your own face, fine. For someone else's, get permission - and if they're a minor, don't.

Boring node. Boring is good here. It does a well-defined job, it costs little per call, and it doesn't ask you to understand anything about the pack's internals to use it.

CategoryMagic Hour

Inputs (2)

NameTypeDefaultDescription
imageIMAGE—
promptoptSTRING—

Outputs (3)

NameTypeDescription
imageIMAGE—
image_pathsSTRING—
credits_chargedINT—