Flux.1 Kontext Pro - After
Flux.1 Kontext Pro - Before

The 'Flux.1 Kontext Pro' workflow is designed for advanced image editing using the Flux and Flux.1 Kontext models. This workflow leverages several key nodes, including the FluxKontextProImageNode for applying sophisticated image transformations, and the ImageStitch node for combining multiple images seamlessly. At its core, this workflow allows users to modify images with precision, whether it's changing colors, altering styles, or merging different visual elements. This is achieved through a user-friendly interface that integrates API functionality, making it accessible for both local and web-based applications. Technically, the workflow operates by loading images through the LoadImage node, applying transformations with the FluxKontextProImageNode, and saving the results using the SaveImage node. The MarkdownNote node provides documentation and guidance within the workflow, ensuring users understand each step. The integration of these nodes allows for a streamlined process that is both powerful and easy to use, making it an excellent tool for creative professionals and hobbyists alike.

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.

api_bfl_flux_1_kontext_pro_image.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 "Flux.1 Kontext Pro" (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });

// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("api_bfl_flux_1_kontext_pro_image_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("84", "image", asset); // LoadImage

const job = await client.run(wf);
await job.getOutputs("85")[0].toFile("output.png"); // SaveImage

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