Qwen Image Edit 2509
高階圖像編輯,支援多圖像輸入、改進的一致性和 ControlNet 整合。
下載工作流程在 Cloud 中試用 API 文件
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
從您的程式碼呼叫此模型
以下請求使用與 Playground 相同的已準備節點圖和設定。每次提交都可能啟動付費執行;若提交結果不明,請勿自動重試提交。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
- 您的檔案
- 由程式碼透過其 URL 上傳
需要付費 Cloud 方案與點數。
下載 API JSONAPI 文件 ↗
# Python 3.10+: pip install comfy-sdk==0.4.0
import os
from comfy_sdk import Comfy
api_key = os.environ.get("COMFY_API_KEY", "").strip()
if not api_key: raise RuntimeError("Set COMFY_API_KEY")
os.environ.setdefault("COMFY_BASE_URL", "https://cloud.comfy.org")
client = Comfy(api_key=api_key)
workflow = client.workflows.from_json({
"60": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"433:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"78": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"435": {
"class_type": "PrimitiveStringMultiline",
"inputs": {
"value": "Bring this street corner to life at blue hour without changing the architecture. Switch on warm tungsten light behind about half of the windows on every floor, unevenly, as if people are home. On the ground floor, add a small café: a dark green canvas awning over the two arched windows nearest the corner, three round marble bistro tables with wicker chairs on the pavement, and a soft glow spilling out from inside. Add two wrought-iron street lamps at the corner and light them. Make the puddle reflect all of these new lights accurately, with gentle ripples. Keep the facade, the stonework, the cobblestones, the sky and the camera angle exactly as they are. No people, no signs, no text."
},
"_meta": {
"title": "Prompt"
}
},
"433:110": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"433:38",
0
],
"image1": [
"433:117",
0
],
"prompt": "",
"vae": [
"433:39",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
},
"433:111": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"433:38",
0
],
"image1": [
"433:117",
0
],
"prompt": [
"435",
0
],
"vae": [
"433:39",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
},
"433:117": {
"class_type": "FluxKontextImageScale",
"inputs": {
"image": [
"78",
0
]
},
"_meta": {
"title": "FluxKontextImageScale"
}
},
"433:3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"433:88",
0
],
"model": [
"433:75",
0
],
"negative": [
"433:110",
0
],
"positive": [
"433:111",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 0,
"steps": 4
},
"_meta": {
"title": "KSampler"
}
},
"433:37": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_edit_2509_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"433:38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"433:39": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"433:66": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"433:89",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"433:75": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"433:66",
0
],
"pre_cfg": False,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"433:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"433:3",
0
],
"vae": [
"433:39",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"433:88": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"433:117",
0
],
"vae": [
"433:39",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"433:89": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors",
"model": [
"433:37",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
}
})
workflow.set_input("78", "image", client.assets.from_url("https://comfy.org/catalog-media/0f1f46e0-d02b-456b-ae66-06bf63073046/817953d3-5ba6-45ae-9d14-3ba026231125"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)
for output in job.get_outputs("60"):
output.to_file(output.name)試試範例
關於此工作流程
「Qwen Image Edit 2509」工作流程專為進階圖像編輯設計,支援多圖處理並透過 ControlNet 整合提升一致性。此流程運用 Qwen-Image 模型,具備強大圖像處理能力。結合 SaveImage、LoadImage 及 ControlNet 專用節點,讓使用者能精確修改圖片。流程可維持多張圖片間的一致性,特別適合批次處理需統一風格的任務。此外,ControlNet 的整合讓編輯更可控、更細緻,確保所有圖片都能精確套用所需變更。
問答
ControlNet 提供更細緻的編輯控制,能在多張圖片間實現精確且一致的修改。
可以,Qwen-Image 模型針對高解析度圖像優化,適合細緻編輯。
可以,流程支援多圖編輯,可對不同類型圖片批次套用一致編輯。
請於 ControlNet 節點設定所需參數,即可確保所有圖片套用一致編輯效果。