Flux.2 [Klein] 9B Distilled: Image Edit - After
Flux.2 [Klein] 9B Distilled: Image Edit - Before

The Flux.2 [Klein] 9B Distilled: Image Edit workflow leverages the power of the Flux.2 Klein model to provide high-quality image editing capabilities at impressive speeds. This workflow is designed to enable real-time image generation and editing, making it ideal for applications that require quick turnaround without compromising on quality. The core of this workflow is the Flux.2 Klein model, a distilled version of the original Flux model, which offers outstanding performance by reducing computational load while maintaining the model's efficacy. Key nodes in this workflow include the SaveImage and LoadImage nodes, which handle the input and output of images, and the MarkdownNote node, which provides documentation and guidance within the workflow itself.

Technically, the workflow operates by taking an input image, processing it through the Flux.2 Klein model using a series of nodes that manage data flow and model inference, and finally outputting an edited image. The 7b34ab90-36f9-45ba-a665-71d418f0df18 node is crucial for interfacing with the model, ensuring that the image data is correctly formatted and processed. This setup makes the workflow highly efficient, allowing users to achieve sub-second image editing, which is particularly beneficial for real-time applications such as live video feeds or interactive design tools.

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.

image_flux2_klein_image_edit_9b_distilled.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.2 [Klein] 9B Distilled: Image Edit" (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("image_flux2_klein_image_edit_9b_distilled_api.json");

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

const job = await client.run(wf);
await job.getOutputs("9")[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