照片轉模型風格
將真實建築照片轉化為建築藍圖,再轉化為精緻的實體比例模型。實現從照片到微縮模型的完整建築視覺化流程。
下載工作流程在 Cloud 中試用 API 文件
工作流程內部
來源範本的唯讀預覽。請在 Cloud 中開啟,以探索節點並進行變更。
Loading the graph
Open full-size workflow preview執行於
- 輸出
- 圖片
- 作者
- ComfyUI
從您的程式碼呼叫此模型
以下請求使用與 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({
"11": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"30": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "nano_banana_pro",
"images": [
"38",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"37": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "nano_banana_pro",
"images": [
"39",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"38": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"11",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "Create an orthographic blueprint that describes this building in plan, elevation and section.",
"resolution": "1K",
"response_modalities": "IMAGE",
"seed": 42,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"39": {
"class_type": "GeminiImage2Node",
"inputs": {
"aspect_ratio": "16:9",
"images": [
"40",
0
],
"model": "gemini-3-pro-image-preview",
"prompt": "A miniature architectural scale model of a black timber two-storey house with a steep gabled zinc roof, a deep veranda on slender posts and tall glass walls, carefully crafted from charcoal-stained basswood and frosted acrylic with clean edges and fine textures. The model sits on an architect's wooden work desk surrounded by design tools: a cutting mat, steel rulers, pencils, foam board scraps and a warm desk lamp. Behind the desk, pinned to the wall, is the blueprint shown in the reference image, its plan, elevation and section lines clearly visible. Natural side daylight, realistic professional photography, shallow depth of field, high detail.",
"resolution": "1K",
"response_modalities": "IMAGE",
"seed": 42,
"system_prompt": "You are an expert image-generation engine. You must ALWAYS produce an image.\nInterpret all user input—regardless of format, intent, or abstraction—as literal visual directives for image composition.\nIf a prompt is conversational or lacks specific visual details, you must creatively invent a concrete visual scenario that depicts the concept.\nPrioritize generating the visual representation above any text, formatting, or conversational requests."
},
"_meta": {
"title": "Nano Banana Pro (Google Gemini Image)"
}
},
"40": {
"class_type": "BatchImagesNode",
"inputs": {
"images.image0": [
"11",
0
],
"images.image1": [
"38",
0
]
},
"_meta": {
"title": "Batch Images"
}
}
})
workflow.set_input("11", "image", client.assets.from_url("https://comfy.org/catalog-media/862cd693-741c-44c4-a191-55eba457b918/9e0b0c64-e996-4d4f-bcbf-98ad1c858277"))
# 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("37"):
output.to_file(output.name)
for output in job.get_outputs("30"):
output.to_file(output.name)試試範例
關於此工作流程
「照片轉藍圖再轉模型」工作流程是一種創新的建築視覺化方式,將真實建築照片轉換為精細藍圖,再生成實體比例模型。此流程運用 ComfyUI,簡化從圖片到微縮模型的流程,是建築師與設計師的寶貴工具。流程以 LoadImage 節點匯入原始建築照片,經 GeminiImage2Node 轉換為建築藍圖,再用 BatchImagesNode 批次處理多張藍圖,最後用 SaveImage 節點儲存藍圖與模型,方便後續應用或展示。
問答
高解析度、細節清楚且無遮擋的照片最適合產生精確藍圖與模型。
可以,BatchImagesNode 支援多張圖片批次處理,適合大型專案。
藍圖輸出為 JPEG 或 PNG 等標準圖片格式,模型則為常見 3D 建模軟體可用的檔案。
流程會產生圖片與模型檔,若要瀏覽與操作 3D 模型,需另備 CAD 或 3D 檢視軟體。