Flux.2 [Klein] 4B:圖片編輯

The 'Flux.2 [Klein] 4B: Image Edit' workflow is designed to provide users with a robust and efficient method for image editing using the Flux.2 Klein model. This workflow leverages the model's impressive quality-to-size ratio, making it particularly suitable for local deployment and fine-tuning on limited hardware resources. The workflow integrates several key nodes, including LoadImage for importing images, SaveImage for exporting results, and custom nodes like 7b34ab90-36f9-45ba-a665-71d418f0df18 and 65c22b29-59aa-496b-89c6-55a603658670, which handle specific image processing tasks. Additionally, the MarkdownNote node is used to provide inline documentation and guidance within the workflow, enhancing user understanding and ease of use.

Technically, the workflow operates by first loading an image using the LoadImage node, which is then processed through a series of transformations and edits defined by the custom nodes. These nodes are configured to apply specific editing techniques, leveraging the capabilities of the Flux.2 Klein model to maintain high-quality outputs. The final image is saved using the SaveImage node, ensuring that the edited image is stored efficiently. This workflow is particularly useful for users who need to perform high-quality image edits without the need for extensive computational resources, making it an excellent choice for both hobbyists and professionals looking to optimize their image editing processes.

API

從程式碼使用此工作流

每個 Comfy 工作流都是一個 JSON 圖。下方的 payload 就是此工作流,與 ComfyUI 執行時完全相同 — 你可以從此 URL 取得、放入版本控制,或在 ComfyUI 載入並逐節點執行。

image_flux2_klein_image_edit_4b_base.json
正在取得工作流 JSON…

使用 Comfy SDK 以 TypeScript 或 Python 執行。相同程式碼可用於 Comfy Cloud 或你自架的 ComfyUI — 只需更改 base URL。

// Install (beta)
npm i @comfyorg/sdk

// Run "Flux.2 [Klein] 4B:圖片編輯" (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_4b_base_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

SDK 需使用 API 格式的工作流:請在 ComfyUI 開啟此工作流,並使用 檔案 → 匯出工作流(API)。

Comfy Cloud API 存取需有 API 金鑰的方案。

常見問題

常見問題

查看所有工作流
Showing 30 of 30 templates