This ComfyUI template demonstrates a high‑fidelity image editing pipeline that preserves the original subject, pose, lighting, and composition while making targeted changes. It’s built around a simple, reliable graph: LoadImage feeds a reference image into OpenAIGPTImageNodeV2 for natural‑language edits, and SaveImageAdvanced handles consistent output naming and metadata. The included sample asset (hairstyle_makeup_base_gpt_image25.png) lets you test the flow immediately.

Technically, OpenAIGPTImageNodeV2 calls an OpenAI GPT image model in image‑edit mode, using the source pixels as strong conditioning so that only requested elements (e.g., outfit, hairstyle, facial features, or camera angle) change. You guide the edit by writing a precise prompt that also states what must stay the same (for example: “Keep the same pose, lighting, background, and composition; only change the hairstyle to a short bob”). This makes the workflow excellent for sequential frames and subject‑consistent variations. SaveImageAdvanced then writes the results with versioned filenames so iterations are easy to track.

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.

f423e4de5251.json
Fetching workflow JSON…

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

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates