Image Editing (New)
使用 Qwen-Image-Edit(最新的 OSS 模型)編輯你的圖片
下載工作流程在 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": [
"115:8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"78": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"115:110": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"115:38",
0
],
"image1": [
"115:93",
0
],
"prompt": "",
"vae": [
"115:39",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
},
"115:111": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"115:38",
0
],
"image1": [
"115:93",
0
],
"prompt": "Turn this rainy afternoon into a clear winter night. Outside the tall windows, the rain becomes falling snow over a dark blue sky, with snow resting on the branches of the trees beyond the glass. Inside, switch on warm light: a low glow from a floor lamp beside the daybed and soft candlelight on the concrete coffee table next to the steaming mug, so the room turns amber and cosy against the cold blue outside. Keep the man, his pose, clothes and expression exactly as they are, and keep the daybed, the rust wool throw, the terracotta lounge chair, the potted ficus and the large textured painting in the same places. Add gentle reflections of the lamps in the window glass. Photographic, natural, no text.",
"vae": [
"115:39",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
},
"115:112": {
"class_type": "EmptySD3LatentImage",
"inputs": {
"batch_size": 1,
"height": 1440,
"width": 2560
},
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"115:116": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"115:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"115:3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"115:88",
0
],
"model": [
"115:75",
0
],
"negative": [
"115:110",
0
],
"positive": [
"115:111",
0
],
"sampler_name": "euler",
"scheduler": "simple",
"seed": 1118877715456453,
"steps": 4
},
"_meta": {
"title": "KSampler"
}
},
"115:37": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_edit_2509_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"115:38": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"115:39": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"115:66": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"115:89",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"115:75": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"115:66",
0
],
"pre_cfg": False,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"115:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"115:3",
0
],
"vae": [
"115:39",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"115:88": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"115:93",
0
],
"vae": [
"115:39",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"115:89": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2509-Lightning-4steps-V1.0-bf16.safetensors",
"model": [
"115:37",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"115:93": {
"class_type": "ImageScaleToTotalPixels",
"inputs": {
"image": [
"78",
0
],
"megapixels": 1,
"resolution_steps": 1,
"upscale_method": "lanczos"
},
"_meta": {
"title": "Scale Image to Total Pixels"
}
}
})
workflow.set_input("78", "image", client.assets.from_url("https://comfy.org/catalog-media/001c7adc-df38-40ac-9120-951669cc3813/9dd6448a-64d9-434f-a373-d64eb77bd272"))
# 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 模型在影像編輯領域帶來重大突破,運用先進開源技術,提供前所未有的靈活性與精準度。不同於以往需多步驟與手動調整的模型,Qwen-Image-Edit 透過尖端演算法,能理解並執行複雜編輯。此模型特別擅長背景更換、物件替換與角色服裝變更,讓使用者享有流暢的編輯體驗。
Qwen-Image-Edit 最大特色是能在執行細緻編輯時維持高畫質。傳統模型在大幅修改時常難以保留原圖品質,但 Qwen-Image-Edit 採用精密技術,確保最終輸出仍具原始視覺完整性。這讓專業人士與愛好者都能在影像編輯專案中兼顧精準與品質。
問答
Qwen-Image-Edit 提供更進階的演算法,能在保持畫質的同時提升精準度,讓複雜編輯更容易完成。
可以。Qwen-Image-Edit 設計上支援高解析度圖片,即使進行大量編輯也能保留品質。
適合。模型的直覺式介面與自動化流程,讓不同程度的使用者都能上手,從新手到專業人士皆可使用。
可進行多種編輯,包括更換背景、替換物件、修改服裝等。
相關工作流程
- Qwen-Image-Edit
Change a material
- Qwen-Image-Edit
See your subject from a new angle
- Qwen-Image-Edit
Match lighting from a reference
- Qwen-Image-Edit, Wan2.2
1個圖像輸入分割堆疊 - Qwen多角度 + Wan 2.2
- Flux.2 Dev, Flux.2 Klein, GPT-Image-1.5, Grok, Nano Banana Pro, Qwen-Image-Edit, Seedream
1個輸入與多個編輯模型對比
- Qwen-Image-Edit
Qwen Image Edit 2511 - 材質替換
- Qwen-Image-Edit
Qwen Image Edit 插畫版 v 1.0
- Qwen-Image-Edit
Qwen圖像編輯
- Qwen-Image-Edit
SYSTMS ACTION:QWEN IMAGE EDIT 2511
- Qwen-Image-Edit
一鍵多角度場景
- Qwen-Image-Edit
一鍵多角度角色
- Qwen-Image-Edit
人像重光