Flux.1 Kontext Max - After
Flux.1 Kontext Max - Before

The Flux.1 Kontext Max workflow is designed to facilitate advanced image editing through a structured process using ComfyUI. At its core, this workflow leverages the Flux.1 Kontext and Flux models to perform intricate edits on images, making it ideal for users who require precise control over image modifications. The workflow incorporates several key nodes, including LoadImage, SaveImage, and ImageStitch, to manage the input and output of images efficiently. The FluxKontextMaxImageNode is a pivotal component that applies the desired transformations to the images, allowing for both basic modifications and complex style transfers. This workflow is particularly useful for users who need to edit images with specific stylistic requirements or want to apply consistent changes across multiple images.

Technically, the workflow operates by first loading the image through the LoadImage node, which can be configured to handle multiple images simultaneously. The FluxKontextMaxImageNode then processes the images according to the specified instructions, such as changing colors or altering styles. Finally, the edited images are saved using the SaveImage node. This structured approach ensures that users can easily manage and execute their image editing tasks, making the workflow a valuable tool for both individual creators and businesses looking to automate their image editing processes.

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_max_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 Max" (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_max_image_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("90", "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