This ComfyUI workflow performs fast, high-quality face swaps on photos using a minimal, easy-to-tune graph. Two LoadImage nodes bring in your source face (the identity you want to transfer) and the target photo. A custom face-swap processor (node ID: 217f3726-59bc-4170-9ab1-c622bb578338) detects and aligns faces in the target, transfers the source identity onto the target while preserving expression, pose, and lighting, and outputs a composited image. An ImageCompare node lets you visually verify results against the original for quick A/B checks, and SaveImageAdvanced handles clean, repeatable exports.
Technically, the face-swap node encapsulates the core pipeline—face detection, alignment/warping, identity transfer, and blending—so you don’t need to manage separate detection or masking nodes. This makes the workflow compact and robust: you load images, optionally tweak the swap node’s settings (such as which detected face to replace or blend strength, depending on the implementation), preview with ImageCompare, and then save your output with consistent naming and format via SaveImageAdvanced. It’s particularly useful when you need reliable swaps from solid input photos without building a large, complex graph.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
// Install (beta)
npm i @comfyorg/sdk
// Run this workflow (TypeScript)
import { Comfy } from "@comfyorg/sdk";
const client = new Comfy({ apiKey: "comfyui-..." });
const wf = await client.workflows.fromFile("workflow_api.json");
const job = await client.run(wf);
await job.getOutputs("<output-node-id>")[0].toFile("output.png");The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).
Comfy Cloud API access requires a plan with an API key.
FAQ



















