{
"id": "3A739ED5-6CC8-449F-AB3E-D2E6259542DD",
"kind": "workflow",
"name": "LinkedIn Headshot Studio",
"author": {
"address": "0x8031Db61A225F7ACB669FADb9102B6938aEF8AaF",
"signature": "17d5be1567e67040e236d5a193bacfc89158847874da2abdd93fa05b05b2a5930838d0ae235f83406dd41c193212e93ff017b3851bf0d55325118460b68e2e8c1c"
},
"format": "osaurus.template",
"summary": "Privately turn a casual photo of you into polished, professional LinkedIn headshots. Everything runs on your Mac with Qwen-Image 2.1, so your photo never leaves your Mac or goes to the cloud. The default (one Modern office look at Quick quality) takes about 1.5 minutes; more looks and higher quality take longer.",
"version": 7,
"workflow": {
"edges": [
{
"to": "collect",
"from": "make_headshots"
},
{
"to": "bring_photo",
"from": "plan_looks"
},
{
"to": "make_headshots",
"from": "bring_photo"
}
],
"nodes": [
{
"id": "plan_looks",
"code": {
"source": "async function run(input, ctx) {\n const attireMap = {\n 'Keep my current outfit': 'keep the same clothing as in the photo, neatened and wrinkle-free',\n 'Business suit': 'wearing a well-tailored dark business suit with a crisp shirt',\n 'Smart casual (blazer, open collar)': 'wearing a smart tailored blazer over an open-collar shirt',\n 'Casual professional (knit or shirt)': 'wearing a neat, well-fitted knit sweater or button-up shirt'\n };\n const attire = attireMap[input.attire] || attireMap['Smart casual (blazer, open collar)'];\n const notes = (input.notes || '').trim();\n const portrait = input.shape === 'Portrait (4:5)';\n const framing = portrait ? 'Head-and-shoulders portrait framing with a little room above the head' : 'Head-and-shoulders framing, centred';\n const base = 'Transform this photo into a high-end professional LinkedIn headshot of the same person. Preserve their exact face, identity, facial features, skin tone, hairstyle, age and expression; do not change who they are. ' + framing + ', looking at the camera with a confident, friendly expression. ' + attire + '. Sharp focus on the eyes, natural skin texture, shot on a full-frame camera with an 85mm portrait lens, photorealistic.' + (notes ? ' Also: ' + notes + '.' : '');\n const all = [\n { name: 'Modern office', scene: 'Bright modern office background softly blurred (shallow depth of field, bokeh), natural window light from the side.' },\n { name: 'Studio grey', scene: 'Clean seamless light-grey studio backdrop, soft even key light with gentle fill, classic corporate portrait.' },\n { name: 'Outdoor natural light', scene: 'Outdoors in soft late-afternoon natural light, softly blurred green and city background, warm and approachable.' },\n { name: 'Charcoal executive', scene: 'Dark charcoal studio backdrop with subtle gradient, dramatic but flattering Rembrandt lighting, executive portrait.' }\n ];\n let n = parseInt(input.look_count, 10);\n if (!(n >= 1)) n = 1;\n n = Math.min(4, n);\n const stepsMap = { 'Quick': 15, 'Standard': 30, 'Best': 50 };\n const src = String(input.photo || '');\n const m = src.match(/\\.([A-Za-z0-9]{2,5})$/);\n const ext = m ? m[1].toLowerCase() : 'jpg';\n return {\n looks: all.slice(0, n).map(l => ({ name: l.name, prompt: base + ' ' + l.scene })),\n steps: stepsMap[input.quality] || 15,\n width: portrait ? 896 : 1024,\n height: portrait ? 1120 : 1024,\n model_family: 'qwen-image-2.1',\n photo_name: 'source-photo.' + ext\n };\n}",
"network": [],
"secrets": [],
"timeout": 30
},
"kind": "code",
"name": "Choose the looks",
"input": {
"notes": "{{input.notes}}",
"photo": "{{input.photo}}",
"shape": "{{input.shape}}",
"attire": "{{input.attire}}",
"quality": "{{input.quality}}",
"look_count": "{{input.look_count}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"timeout": 120,
"output_schema": {
"type": "object",
"required": [
"looks",
"steps",
"width",
"height",
"model_family",
"photo_name"
],
"properties": {
"looks": {
"type": "array",
"items": {
"type": "object",
"required": [
"name",
"prompt"
],
"properties": {
"name": {
"type": "string"
},
"prompt": {
"type": "string"
}
}
}
},
"steps": {
"type": "integer"
},
"width": {
"type": "integer"
},
"height": {
"type": "integer"
},
"photo_name": {
"type": "string"
},
"model_family": {
"type": "string"
}
}
}
},
{
"id": "make_headshots",
"map": {
"step": {
"kind": "media",
"name": "Headshot",
"input": {},
"media": {
"model": {
"family": "qwen-image-2.1",
"locality": "local"
},
"steps": "{{nodes.plan_looks.output.steps}}",
"width": "{{nodes.plan_looks.output.width}}",
"action": "edit",
"format": "png",
"height": "{{nodes.plan_looks.output.height}}",
"prompt": "{{item.prompt}} Keep it photorealistic and natural: no change to the person's identity or facial features, no distortion, no cartoon or painted look, no plastic-smooth skin, no text, watermark or logo.",
"sources": [
"{{nodes.bring_photo.output.destination}}"
],
"seed_mode": "random"
},
"timeout": 1800,
"output_schema": {}
},
"items": "{{nodes.plan_looks.output.looks}}",
"concurrency": 1,
"on_item_error": "skip"
},
"kind": "map",
"name": "Make the headshots",
"input": {},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"timeout": 3600,
"output_schema": {}
},
{
"id": "collect",
"code": {
"source": "async function run(input, ctx) {\n const headshots = [], looks = [];\n (input.results || []).forEach((r, i) => {\n const img = r && r.images && r.images[0];\n if (img && img.path) { headshots.push(img.path); looks.push(input.looks[i].name); }\n });\n const failed = input.failed || [];\n failed.forEach(f => ctx.log('Look ' + ((f.index || 0) + 1) + ' failed: ' + (f.error && f.error.message ? f.error.message : f.error)));\n if (!headshots.length) {\n const reasons = [...new Set(failed.map(f => (f.error && f.error.message) ? f.error.message : String(f.error || '')).filter(Boolean))];\n throw new Error('No headshots were produced' + (reasons.length ? ': ' + reasons.join('; ') : '. Try a clearer, front-facing photo.'));\n }\n return { headshots, looks, notes: String(input.run_notes || '').trim() };\n}",
"network": [],
"secrets": [],
"timeout": 30
},
"kind": "code",
"name": "Gather the results",
"input": {
"looks": "{{nodes.plan_looks.output.looks}}",
"failed": "{{nodes.make_headshots.output.failed}}",
"results": "{{nodes.make_headshots.output.items}}",
"run_notes": "{{input.run_notes}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"timeout": 120,
"output_schema": {
"type": "object",
"required": [
"headshots",
"looks",
"notes"
],
"properties": {
"looks": {
"type": "array",
"items": {
"type": "string"
}
},
"notes": {
"type": "string"
},
"headshots": {
"type": "array",
"items": {
"type": "string"
}
}
}
}
},
{
"id": "bring_photo",
"kind": "tool",
"name": "Bring in your photo",
"tool": {
"name": "file_copy"
},
"input": {
"source": "{{input.photo}}",
"overwrite": true,
"destination": "{{run.workspace}}/in/{{nodes.plan_looks.output.photo_name}}"
},
"retry": {
"max_attempts": 1,
"backoff_seconds": 1
},
"intent": "Copy the chosen photo into the run's folder so the image model can read it",
"timeout": 900,
"output_schema": {}
}
],
"output": {
"looks": "{{nodes.collect.output.looks}}",
"notes": "{{nodes.collect.output.notes}}",
"headshots": "{{nodes.collect.output.headshots}}",
"source_photo": "{{nodes.bring_photo.output.destination}}"
},
"secrets": [],
"examples": [
{
"name": "Business suit headshot",
"input": {
"photo": "~/Downloads/tytus headshot.jpg",
"attire": "Business suit"
}
},
{
"name": "Quick portrait, one look",
"input": {
"photo": "~/Downloads/tytus headshot.jpg",
"shape": "Portrait (4:5)",
"attire": "Smart casual (blazer, open collar)",
"quality": "Quick",
"look_count": 1
}
},
{
"name": "Own outfit with a note, two looks",
"input": {
"notes": "warmer smile",
"photo": "~/Downloads/tytus headshot.jpg",
"shape": "Square (LinkedIn)",
"attire": "Keep my current outfit",
"quality": "Quick",
"look_count": 2
}
},
{
"name": "Default settings with a credit",
"input": {
"photo": "~/Downloads/tytus headshot.jpg",
"run_notes": "Test photo from Unsplash."
}
}
],
"model_slots": [],
"input_schema": {
"type": "object",
"x-order": [
"photo",
"attire",
"notes",
"quality",
"look_count",
"shape",
"run_notes"
],
"required": [
"photo"
],
"properties": {
"notes": {
"type": "string",
"title": "Extra touches (optional)",
"description": "Changes to the picture, e.g. 'navy blazer', 'keep my glasses', 'warmer smile'."
},
"photo": {
"type": "string",
"title": "Your photo",
"format": "file",
"description": "A clear, front-facing photo of your face and shoulders (good light helps)."
},
"shape": {
"enum": [
"Square (LinkedIn)",
"Portrait (4:5)"
],
"type": "string",
"title": "Shape",
"default": "Square (LinkedIn)",
"description": "Square suits LinkedIn; portrait (4:5) suits other profile sites and CVs."
},
"attire": {
"enum": [
"Keep my current outfit",
"Business suit",
"Smart casual (blazer, open collar)",
"Casual professional (knit or shirt)"
],
"type": "string",
"title": "Outfit",
"default": "Smart casual (blazer, open collar)",
"description": "What you'd like to be wearing in the headshots."
},
"quality": {
"enum": [
"Quick",
"Standard",
"Best"
],
"type": "string",
"title": "Quality",
"default": "Quick",
"description": "Quick is about 1.5 min per headshot, Standard about 3, Best about 5."
},
"run_notes": {
"type": "string",
"title": "Notes for this run (optional)",
"description": "Not used to make the picture. Shown with the results: photo credits, or what you're trying this time."
},
"look_count": {
"type": "integer",
"title": "Number of looks",
"default": 1,
"maximum": 4,
"minimum": 1,
"description": "How many styles to make (1 to 4), in this order: modern office, studio grey, outdoor, charcoal executive."
}
},
"additionalProperties": false
},
"output_schema": {
"type": "object",
"required": [
"source_photo",
"headshots",
"looks",
"notes"
],
"properties": {
"looks": {
"type": "array",
"items": {
"type": "string"
},
"title": "Looks made"
},
"notes": {
"type": "string",
"title": "Notes for this run"
},
"headshots": {
"type": "array",
"items": {
"type": "string"
},
"title": "Headshots"
},
"source_photo": {
"type": "string",
"title": "Your original photo",
"format": "file"
}
},
"additionalProperties": false
},
"requirement_notes": {}
},
"changelog": "Faster defaults (one Modern office look at Quick quality), shows your original photo with the results, adds a \"Notes for this run\" field, and removes duplicate headshot file entries that showed a warning.",
"created_at": "2026-11-12T09:43:52Z",
"content_hash": "sha256:44e282061eba15fc36f61dab97f7422aa72ea9a2e0be01197587b2f9596990ad",
"requirements": {
"notes": {},
"tools": [
"file_copy"
],
"models": [],
"network": [],
"plugins": [],
"secrets": [],
"knowledge": [],
"mcp_servers": [],
"permissions": [],
"media_models": [
{
"model": {
"family": "qwen-image-2.1",
"locality": "local"
},
"action": "edit"
}
]
},
"format_version": 3,
"available_to_orchestrator": true
}