Lotus深度
在 ComfyUI 中執行 Lotus Depth,實現零樣本、高效的單目深度估計,並保持高細節保留。
下載工作流程在 Cloud 中試用 API 文件
關於
「Lotus Depth」工作流程於 ComfyUI 提供高效單眼深度預測,適合需高細節保留的圖像處理。流程採用 Stability 模型(SD1.5),可零樣本預測(無需特定資料集訓練)。先用 LoadImage 載入圖像,再經一組節點(含 c7d32155-757f-4e5d-a139-7e438da96f2f)執行深度預測演算法,最終用 SaveImage 儲存,確保細節完整。
此流程特別適合需高保真單張圖像深度感知的應用,如 VR 或進階 3D 建模。Stability 模型兼顧運算效率與輸出品質,適合開發者與藝術家在有限資源下取得可靠深度圖。
您提供的內容
- 正在讀取工作流程
在 ComfyUI 中執行。 此工作流程無法在此頁面上執行。請在已載入所有內容的 Comfy Cloud 中開啟,或下載到您自己的 ComfyUI。
在 Cloud 中試用範例
工作流程內部
節點圖的唯讀預覽。請在 Comfy Cloud 中開啟,或下載後編輯節點。
Loading the graph
Open full-size workflow preview需要自訂節點
- 正在讀取工作流程
從程式碼使用此工作流程
可行時會根據工作流程圖和輸入內容產生;否則會顯示儲存的範例。執行可能產生費用的程式碼前,請檢查認證資訊和端點。
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({
"9": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "Lotus_depth",
"images": [
"74:22",
0
]
},
"_meta": {
"title": "output"
}
},
"12": {
"class_type": "LoadImage",
"inputs": {
"image": "image_lotus_depth_v1_1_input_image.png"
},
"_meta": {
"title": "input"
}
},
"74:10": {
"class_type": "UNETLoader",
"inputs": {
"unet_name": "lotus-depth-d-v1-1.safetensors",
"weight_dtype": "default"
},
"_meta": {
"title": "Load Diffusion Model"
}
},
"74:14": {
"class_type": "VAELoader",
"inputs": {
"vae_name": "vae-ft-mse-840000-ema-pruned.safetensors"
},
"_meta": {
"title": "Load VAE"
}
},
"74:16": {
"class_type": "SamplerCustomAdvanced",
"inputs": {
"guider": [
"74:19",
0
],
"latent_image": [
"74:23",
0
],
"noise": [
"74:18",
0
],
"sampler": [
"74:21",
0
],
"sigmas": [
"74:28",
0
]
},
"_meta": {
"title": "SamplerCustomAdvanced"
}
},
"74:18": {
"class_type": "DisableNoise",
"inputs": {},
"_meta": {
"title": "DisableNoise"
}
},
"74:19": {
"class_type": "BasicGuider",
"inputs": {
"conditioning": [
"74:68",
0
],
"model": [
"74:10",
0
]
},
"_meta": {
"title": "Basic Guider"
}
},
"74:20": {
"class_type": "BasicScheduler",
"inputs": {
"denoise": 1,
"model": [
"74:10",
0
],
"scheduler": "normal",
"steps": 1
},
"_meta": {
"title": "BasicScheduler"
}
},
"74:21": {
"class_type": "KSamplerSelect",
"inputs": {
"sampler_name": "euler"
},
"_meta": {
"title": "KSamplerSelect"
}
},
"74:22": {
"class_type": "ImageInvert",
"inputs": {
"image": [
"74:8",
0
]
},
"_meta": {
"title": "Invert Image Colors"
}
},
"74:23": {
"class_type": "VAEEncode",
"inputs": {
"pixels": [
"12",
0
],
"vae": [
"74:14",
0
]
},
"_meta": {
"title": "VAE Encode"
}
},
"74:28": {
"class_type": "SetFirstSigma",
"inputs": {
"sigma": 999.0000000000002,
"sigmas": [
"74:20",
0
]
},
"_meta": {
"title": "SetFirstSigma"
}
},
"74:68": {
"class_type": "LotusConditioning",
"inputs": {},
"_meta": {
"title": "LotusConditioning"
}
},
"74:8": {
"class_type": "VAEDecode",
"inputs": {
"samples": [
"74:16",
0
],
"vae": [
"74:14",
0
]
},
"_meta": {
"title": "VAE Decode"
}
}
})
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)問答
可高效零樣本預測深度,保留細節,無需特定訓練資料。
不需特殊硬體,但有 GPU 可大幅加速處理。
流程已優化,但即時應用仍需視圖像複雜度與硬體效能進一步調整。
可以。可於自訂節點內調整參數,依需求微調預測效果。