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
Использовать этот рабочий процесс из кода
Каждый рабочий процесс Comfy — это JSON-граф. Ниже представлен payload этого процесса, точно так же, как его запускает ComfyUI: получите его по ссылке, храните в системе контроля версий или загрузите в ComfyUI и выполняйте по узлам.
Запустите его на TypeScript или Python с помощью Comfy SDK. Один и тот же код работает с Comfy Cloud или вашим собственным ComfyUI — меняется только базовый URL.
// 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");SDK принимает рабочий процесс в API-формате: откройте этот процесс в ComfyUI и используйте Файл → Экспортировать рабочий процесс (API).
Доступ к API Comfy Cloud требует плана с API-ключом.


















