This workflow demonstrates image-to-image editing with Qwen-Image-2.1 by feeding two reference images into a single checkpoint that handles both generation and editing. The first image (image_1) is your base subject, and the second image (image_2) is the visual guide for what you want to change—such as clothing, style, or material. A ResolutionSelector node controls canvas size: by default it preserves image_1’s aspect ratio at approximately resolution×resolution (default 1024, rounded to a multiple of 32). Qwen-Image-2.1 supports native 2K (2048×2048) output, or you can set resolution to 0 to keep the original pixel dimensions (again rounded to a multiple of 32).
Technically, the LoadImage nodes feed both references into the Qwen-Image-2.1 checkpoint node (bc1c967a-7f6a-4be9-a372-dad16e4f28e3), which fuses them to produce an edited image anchored to the content of image_1 and guided by the appearance, style, or cutout mask in image_2. This makes it well-suited for character-consistent edits, product cutout compositing with real transparency (when your guide image has an alpha channel), and style-transfer passes at high resolution. The ImageCompare node shows before/after frames side-by-side for quick review, and SaveImageAdvanced lets you export clean PNGs to preserve transparency. MarkdownNote and Note nodes in the graph provide inline tips, and the Qwen edit block is organized as a Subgraph for easy navigation.
API
Usa este flujo de trabajo desde código
Cada flujo de trabajo de Comfy es un grafo JSON. El siguiente payload es este flujo de trabajo, exactamente como lo ejecuta ComfyUI: descárgalo desde la URL, guárdalo en control de versiones o cárgalo en ComfyUI y ejecútalo nodo por nodo.
Ejecuta desde TypeScript o Python con el Comfy SDK. El mismo código funciona en Comfy Cloud o en un ComfyUI propio: solo cambia la URL base.
// 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");El SDK utiliza un flujo de trabajo en formato API: abre este flujo de trabajo en ComfyUI y usa Archivo → Exportar flujo de trabajo (API).
El acceso a la API de Comfy Cloud requiere un plan con clave API.
















