1.3 Starter - Product Photography
Learn how to create a product photography with image inputs, enter a subgraph, unbypass a node and get to know partner nodes using Nano Banana Pro.
概要
This ComfyUI workflow, titled '1.3 Starter - Product Photography,' is designed to streamline the process of creating high-quality product photography using AI-generated images. The workflow leverages the Nano Banana Pro model, a specialized AI model known for its ability to produce detailed and realistic product images.
The workflow begins with the 'LoadImage' node, allowing you to input existing images that serve as a base or reference for the AI to work from. Within the workflow, you'll encounter a subgraph, which you can enter by clicking the top-right icon. This subgraph contains essential nodes like 'comfyui-kjnodes' and 'comfyui_essentials' that facilitate the transformation and enhancement of the input images.
Technically, the workflow is structured to guide users through the process of unbypassing nodes, which is crucial for activating specific functionalities within the subgraph. The integration of the 'SaveImage' node ensures that the final output is easily saved and accessible. The 'MarkdownNote' node is used to provide inline documentation and guidance, making the workflow user-friendly even for beginners. This setup is particularly useful for e-commerce businesses and photographers looking to automate and enhance their product photography processes, ensuring consistent quality and style across their image assets.
入力するもの
- ワークフローを読み込み中
ComfyUI で実行できます。 このワークフローはこのページでは実行できません。すべてが読み込まれた状態でComfy Cloudで開くか、ご自身のComfyUI用にダウンロードしてください。
Cloudで試すワークフローの内部
ノードグラフの読み取り専用プレビューです。ノードを編集するには、Comfy Cloudで開くかダウンロードしてください。
Loading the graph
Open full-size workflow preview- 作成者
- ComfyUI
カスタムノードが必要です
- ワークフローを読み込み中
コードからこのワークフローを使用する
可能な場合はワークフローグラフと入力から生成されます。それ以外の場合は保存された例が表示されます。料金が発生する場合があるため、コードを実行する前に認証情報とエンドポイントを確認してください。
What you need
- Runs on
- Comfy Cloud
- キー
- COMFY_API_KEY
- ファイル
- コードによって URL からアップロードされます
有料の Cloud プランとクレジットが必要です。
# 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({
"2": {
"class_type": "SaveImage",
"inputs": {
"filename_prefix": "comfyui-relight-product",
"images": [
"46:40:20",
0
]
},
"_meta": {
"title": "Save Image"
}
},
"3": {
"class_type": "LoadImage",
"inputs": {
"image": "gsc3_landscape.png"
},
"_meta": {
"title": "Load Image"
}
},
"7": {
"class_type": "LoadImage",
"inputs": {
"image": "UPLOADED_image_FILENAME"
},
"_meta": {
"title": "Load Image"
}
},
"46:40:10": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"46:40:16",
0
],
"image": [
"7",
0
],
"width": [
"46:40:15",
0
],
"x": [
"46:40:24",
0
],
"y": [
"46:40:12",
0
]
},
"_meta": {
"title": "3"
}
},
"46:40:11": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"46:40:16",
0
],
"image": [
"7",
0
],
"width": [
"46:40:15",
0
],
"x": [
"46:40:13",
0
],
"y": [
"46:40:12",
0
]
},
"_meta": {
"title": "4"
}
},
"46:40:12": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"46:40:16",
0
],
"b": [
"46:40:14",
0
],
"value": "a + (b/2)"
},
"_meta": {
"title": "Row 2 - Y val"
}
},
"46:40:13": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"46:40:15",
0
],
"b": [
"46:40:14",
0
],
"value": "a + (b/2)"
},
"_meta": {
"title": "Col 2 - X val"
}
},
"46:40:14": {
"class_type": "SimpleMath+",
"inputs": {
"a": 0,
"b": 0,
"value": "a"
},
"_meta": {
"title": "🔧 Simple Math"
}
},
"46:40:15": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"46:40:17",
0
],
"b": [
"46:40:14",
0
],
"value": "(a-2*b) / 2"
},
"_meta": {
"title": "WIDTH"
}
},
"46:40:16": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"46:40:17",
1
],
"b": [
"46:40:14",
0
],
"value": "(a-2*b) / 2"
},
"_meta": {
"title": "HEIGHT"
}
},
"46:40:17": {
"class_type": "GetImageSize",
"inputs": {
"image": [
"7",
0
]
},
"_meta": {
"title": "Get Image Size"
}
},
"46:40:19": {
"class_type": "ImageBatchMulti",
"inputs": {
"image_1": [
"46:40:8",
0
],
"image_2": [
"46:40:9",
0
],
"image_3": [
"46:40:10",
0
],
"image_4": [
"46:40:11",
0
],
"inputcount": 4
},
"_meta": {
"title": "Image Batch Multi"
}
},
"46:40:20": {
"class_type": "ImageResizeKJv2",
"inputs": {
"crop_position": "center",
"device": "cpu",
"divisible_by": 2,
"height": [
"46:40:22",
0
],
"image": [
"46:40:19",
0
],
"keep_proportion": "stretch",
"pad_color": "0, 0, 0",
"upscale_method": "lanczos",
"width": [
"46:40:23",
0
]
},
"_meta": {
"title": "Resize Images"
}
},
"46:40:22": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"46:40:17",
1
],
"b": 0,
"value": "(a) / 2"
},
"_meta": {
"title": "HEIGHT / 2"
}
},
"46:40:23": {
"class_type": "SimpleMath+",
"inputs": {
"a": [
"46:40:17",
0
],
"b": 0,
"value": "(a) / 2"
},
"_meta": {
"title": "WIDTH / 2"
}
},
"46:40:24": {
"class_type": "SimpleMath+",
"inputs": {
"a": 0,
"b": [
"46:40:14",
0
],
"value": "b/2"
},
"_meta": {
"title": "Col 1 - X val"
}
},
"46:40:4": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"46:40:8",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"46:40:5": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"46:40:9",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"46:40:6": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"46:40:10",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"46:40:7": {
"class_type": "PreviewImage",
"inputs": {
"images": [
"46:40:11",
0
]
},
"_meta": {
"title": "Preview Image"
}
},
"46:40:8": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"46:40:16",
0
],
"image": [
"7",
0
],
"width": [
"46:40:15",
0
],
"x": [
"46:40:24",
0
],
"y": [
"46:40:24",
0
]
},
"_meta": {
"title": "1"
}
},
"46:40:9": {
"class_type": "ImageCrop",
"inputs": {
"height": [
"46:40:16",
0
],
"image": [
"7",
0
],
"width": [
"46:40:15",
0
],
"x": [
"46:40:13",
0
],
"y": 0
},
"_meta": {
"title": "2"
}
}
})
# Replace each example.com URL with a public URL of your file.
workflow.set_input("7", "image", client.assets.from_url("https://example.com/replace-with-a-url/image"))
# run() also passes api_key to the partner nodes in this workflow.
job = client.run(workflow, api_key=api_key)よくある質問
The subgraph contains specialized nodes that enhance and transform input images, allowing for more detailed and realistic product photography outputs.
To unbypass a node, enter the subgraph and click on the node you wish to activate, ensuring its functions are included in the image processing.
While this workflow is optimized for the Nano Banana Pro model, you can experiment with other models, but results may vary in quality and style.
For best results, use high-quality images that clearly depict the product, as these will serve as the foundation for the AI-generated enhancements.