Flux.1 深度 Lora
使用Flux LoRA深度資訊引導產生圖像。
下載工作流程在 Cloud 中試用 API 文件
關於
使用Flux LoRA深度資訊引導產生圖像。
您提供的內容
- 正在讀取工作流程
在 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({
"3": {
"class_type": "KSampler",
"inputs": {
"cfg": 1,
"denoise": 1,
"latent_image": [
"35",
2
],
"model": [
"37",
0
],
"negative": [
"35",
1
],
"positive": [
"35",
0
],
"sampler_name": "euler",
"scheduler": "normal",
"seed": 229472716717627,
"steps": 20
},
"_meta": {
"title": "KSampler"
}
},
"7": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"34",
0
],
"text": ""
},
"_meta": {
"title": "CLIP Text Encode (Negative Prompt)"
}
},
"8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"3",
0
],
"vae": [
"32",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"8",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"17": {
"class_type": "LoadImage",
"inputs": {
"image": "flux_depth_lora_example_input_image.png"
},
"_meta": {
"title": "Load Image"
}
},
"23": {
"class_type": "CLIPTextEncode",
"inputs": {
"clip": [
"34",
0
],
"text": "A cute ghost-shaped desktop ornament, softly glowing with a warm light, placed on a tidy, cozy home table, creating a gentle and sweet atmosphere."
},
"_meta": {
"title": "CLIP Text Encode (Positive Prompt)"
}
},
"26": {
"class_type": "FluxGuidance",
"inputs": {
"conditioning": [
"23",
0
],
"guidance": 10
},
"_meta": {
"title": "FluxGuidance"
}
},
"31": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "flux1-dev-fp8.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"32": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "ae.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"34": {
"class_type": "DualCLIPLoader",
"inputs": {
"clip_name1": "clip_l.safetensors",
"clip_name2": "t5xxl_fp16.safetensors",
"device": "default",
"type": "flux"
},
"_meta": {
"title": "Load CLIP (Dual)"
}
},
"35": {
"class_type": "InstructPixToPixConditioning",
"inputs": {
"negative": [
"7",
0
],
"pixels": [
"41:99",
0
],
"positive": [
"26",
0
],
"vae": [
"32",
0
]
},
"_meta": {
"title": "InstructPixToPixConditioning"
}
},
"37": {
"class_type": "LoraLoaderModelOnly",
"inputs": {
"lora_name": "flux1-depth-dev-lora.safetensors",
"model": [
"31",
0
],
"strength_model": 1
},
"_meta": {
"title": "Load LoRA"
}
},
"43": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"41:99",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"41:100": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"41:101": {
"class_type": "SetFirstSigma",
"inputs": {
"sigma": 10000,
"sigmas": [
"41:95",
0
]
},
"_meta": {
"title": "SetFirstSigma"
}
},
"41:87": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "lotus-depth-d-v1-1.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"41:89": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "vae-ft-mse-840000-ema-pruned.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"41:92": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"41:94",
0
],
"latent_image": [
"41:97",
0
],
"noise": [
"41:93",
0
],
"sampler": [
"41:100",
0
],
"sigmas": [
"41:101",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"41:93": {
"class_type": "DisableNoise",
"inputs": {},
"_meta": {
"title": "DisableNoise"
}
},
"41:94": {
"class_type": "BasicGuider",
"inputs": {
"conditioning": [
"41:96",
0
],
"model": [
"41:87",
0
]
},
"_meta": {
"title": "Basic Guider"
}
},
"41:95": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"41:87",
0
],
"scheduler": "normal",
"steps": 1
},
"_meta": {
"title": "BasicScheduler"
}
},
"41:96": {
"class_type": "LotusConditioning",
"inputs": {},
"_meta": {
"title": "LotusConditioning"
}
},
"41:97": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"17",
0
],
"vae": [
"41:89",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"41:98": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"41:92",
0
],
"vae": [
"41:89",
0
]
},
"_meta": {
"title": "VAE Decode"
}
},
"41:99": {
"class_type": "ImageInvert",
"inputs": {
"image": [
"41:98",
0
]
},
"_meta": {
"title": "Invert Image Colors"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)相關工作流程
- Flux.2 Dev, Flux
Create a product mockup
- Flux, Flux.2
BFL FLUX.2 [max]: 物體替換
- CChroma, Flux
Chroma: 文生圖
- Flux
FLUX 3 Image Klein Distilled: Image Edit
- Flux
FLUX 3 Image Klein Distilled: Text to Image
- Flux
FLUX 3 Image Klein: Image Edit
- Flux
FLUX 3 Image Klein: Text to Image
- Flux
FLUX 3 影片:文字轉影片
- Flux
FLUX 3 影片:文字轉影片
- Flux.1 Kontext, Flux
Flux Kontext Dev 圖像編輯
- Flux
FLUX 虛擬試穿
- Flux, Flux.1
Flux.1 [專業版]:文生圖