HiDream E1圖像編輯
使用HiDream E1編輯圖像 - 專業的自然語言圖像編輯模型。
下載工作流程在 Cloud 中試用 API 文件
關於
HiDream E1 圖片編輯工作流程用自然語言提示詞來進行專業級圖片編輯。此工作流程核心使用 HiDream 模型,能依使用者輸入來轉換圖片。流程首先透過 UNETLoader 與 VAELoader 等節點載入必要模型,這些節點對理解與生成影像資料很關鍵。CLIPTextEncode 節點負責解讀使用者提供的自然語言提示詞,並用來引導圖片編輯。工作流程也包含 KSamplerSelect 與 DualCFGGuider 等節點,透過調整取樣與引導參數來精煉生成結果。
此工作流程適合想用更直覺方式編輯圖片的人:只要用自然語言描述想修改的內容即可。例如,你可以要求模型在未來感場景中的角色加上 VR 眼鏡。工作流程會將圖片縮放到標準 768x768 解析度,以確保輸出品質一致。結合進階影像處理節點與友善的自然語言輸入,HiDream E1 圖片編輯工作流程提供順暢且可控的圖片編輯體驗。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用範例
工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
1 取得 API 金鑰 ↗
What you need
- Runs on
- Comfy Cloud
- 金鑰
- COMFY_API_KEY
需要付費 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({
"6": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"42",
0
],
"text": "Let the girl put on the VR glasses full of a sense of technology, just like the scenes in Ready Player One, with CG rendering and ultra-realism."
},
"_meta": {
"title": "Positive"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"42",
0
],
"text": "low quality, blurry, distorted"
},
"_meta": {
"title": "Negative"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"54",
0
],
"vae": [
"43",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"13": {
"class_type": "LoadImage",
"inputs": {
"image": "hidream_e1_full_input_image.jpg"
},
"_meta": {
"title": "Load Image"
}
},
"41": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "hidream_e1_full_bf16.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"42": {
"class_type": "QuadrupleCLIPLoader",
"inputs": {
"clip_name1": "clip_g_hidream.safetensors",
"clip_name2": "clip_l_hidream.safetensors",
"clip_name3": "t5xxl_fp8_e4m3fn_scaled.safetensors",
"clip_name4": "llama_3.1_8b_instruct_fp8_scaled.safetensors"
},
"_meta": {
"title": "Load CLIP (Quadruple)"
}
},
"43": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"44": {
"class_type": "ImageScale",
"inputs": {
"crop": "center",
"height": 768,
"image": [
"13",
0
],
"upscale_method": "bilinear",
"width": 768
},
"_meta": {
"title": "Upscale Image"
}
},
"46": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"47": {
"class_type": "RandomNoise",
"inputs": {
"noise_seed": 705826023365990
},
"_meta": {
"title": "RandomNoise"
}
},
"49": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"41",
0
],
"scheduler": "normal",
"steps": 28
},
"_meta": {
"title": "BasicScheduler"
}
},
"52": {
"class_type": "InstructPixToPixConditioning",
"inputs": {
"negative": [
"7",
0
],
"pixels": [
"44",
0
],
"positive": [
"6",
0
],
"vae": [
"43",
0
]
},
"_meta": {
"title": "InstructPixToPixConditioning"
}
},
"53": {
"class_type": "DualCFGGuider",
"inputs": {
"cfg_cond2_negative": 2,
"cfg_conds": 5,
"cond1": [
"52",
0
],
"cond2": [
"52",
1
],
"model": [
"41",
0
],
"negative": [
"7",
0
],
"style": "regular"
},
"_meta": {
"title": "Dual CFG Guider"
}
},
"54": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"53",
0
],
"latent_image": [
"52",
2
],
"noise": [
"47",
0
],
"sampler": [
"46",
0
],
"sigmas": [
"49",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
任何圖片都可編輯,但建議將圖片縮放至 768x768 像素以獲得最佳效果。
不需要。此流程設計直覺,讓你用自然語言提示即可完成編輯。
雖然可用自訂尺寸,但流程最佳化為 768x768,其他尺寸可能影響品質。
可用描述性提示詞指定變化,例如添加元素、改變風格或強化細節等。
相關工作流程
- HHiDream
HiDream E1.1圖像編輯
- HHiDream
HiDream I1完整版
- HHiDream
HiDream I1快速版
- HHiDream
HiDream I1開發版
- Nano Banana Pro, Gemini3 Pro Image Preview, Google
Create a character turnaround
- Qwen-Image-Edit
Change a material
- Qwen-Image-Edit
See your subject from a new angle
- Flux.2 Dev, Flux
Create a product mockup
- Nano Banana Pro
Try an outfit on a character
- Seedream
Put your product in a new scene
- SSeedVR2
Upscale and restore detail
- Nano Banana Pro
Sharpen a product photo