插畫轉寫實
輸入插畫,產生超寫實版本,使用Qwen Image Edit 2509。
下載工作流程在 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({
"14": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"18": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"17:12",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"17:1": {
"class_type": "CLIPLoader",
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"device": "default",
"type": "qwen_image"
},
"_meta": {
"title": "Load CLIP"
}
},
"17:10": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"14",
0
],
"vae": [
"17:2",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"17:11": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"17:10",
0
],
"model": [
"17:7",
0
],
"negative": [
"17:9",
0
],
"positive": [
"17:8",
0
],
"sampler_name": "euler",
"scheduler": "beta",
"seed": 539595976310948,
"steps": 8
},
"_meta": {
"title": "KSampler"
}
},
"17:12": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"17:11",
0
],
"vae": [
"17:2",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"17:2": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"17:3": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2509-Anything2RealAlpha.safetensors",
"model": [
"17:4",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"17:4": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "qwen_image_edit_2509_fp8_e4m3fn.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"17:5": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "Qwen-Image-Edit-2509-Lightning-8steps-V1.0-bf16.safetensors",
"model": [
"17:3",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"17:6": {
"class_type": "ModelSamplingAuraFlow",
"inputs": {
"model": [
"17:5",
0
],
"sampling": "flow",
"shift": 3
},
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"17:7": {
"class_type": "CFGNorm",
"inputs": {
"model": [
"17:6",
0
],
"pre_cfg": False,
"strength": 1
},
"_meta": {
"title": "CFGNorm"
}
},
"17:8": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"17:1",
0
],
"image1": [
"14",
0
],
"prompt": "Change image 1 to a realistic photograph. Keep the composition, the high camera angle, the poses and every element of the scene: the masked rider in a dusty canvas duster and brass goggles hunched over a leather saddle, the huge horned dinosaur with scarred green and ochre scales sprinting across the pale canyon floor, the plumes of white dust and the tiers of limestone cliffs. Make it look like a real telephoto shot taken at noon: true-to-life skin, leather and scale textures, natural hard sunlight with real shadows, believable dust in the air, photographic depth and detail, no painted outlines or brush texture.",
"vae": [
"17:2",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
},
"17:9": {
"class_type": "TextEncodeQwenImageEditPlus",
"inputs": {
"clip": [
"17:1",
0
],
"image1": [
"14",
0
],
"prompt": "",
"vae": [
"17:2",
0
]
},
"_meta": {
"title": "Text Encode Qwen Image Edit Plus"
}
}
})
workflow.set_input("14", "image", client.assets.from_url("https://comfy.org/catalog-media/89207d5e-f0a3-4da3-8237-a6156192e21c/6e0ee1e9-043e-49a8-bc86-ef66b328e963"))
# 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("18"):
output.to_file(output.name)試試範例
關於此工作流程
ComfyUI 中的「Illustration to Realism」工作流程用進階 AI 模型把插畫轉成寫實圖片。此工作流程使用 Qwen Image Edit 2509 模型,並結合 Anything2Real LoRA,將插畫輸入轉換為高品質寫實輸出。流程從 LoadImage 節點開始,讓你輸入插畫。核心轉換由 5d31be54-7e20-4abe-81d7-f9e278fe0801 節點完成,套用 Qwen Image Edit 模型把插畫轉成寫實圖片。最後用 SaveImage 節點儲存輸出,方便後續使用或分享。
此工作流程適合想探索概念插畫寫實呈現的藝術家與設計師。整合 Qwen Image Edit 模型後,轉換結果在視覺上更貼近寫實,同時保留原插畫的精神。工作流程也包含 MarkdownNote 節點,方便你記錄轉換過程的註解或迭代變更。整體而言,這是一個在插畫與寫實之間快速轉換的高效率方法。
問答
高解析度且細節清楚的插畫效果最佳,模型能更準確套用寫實紋理與光影。
可以,調整 5d31be54-7e20-4abe-81d7-f9e278fe0801 節點的參數即可控制寫實效果強度。
目前流程以單張圖像處理為主。若需批次處理,可在 ComfyUI 設定迴圈或自動化腳本。
一般硬體即可運行,但若有足夠 VRAM 的顯示卡,處理速度與效能會更佳。