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.
About
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.
What you provide
- Reading the workflow
Runs in ComfyUI. This workflow can't run on this page. Open it in Comfy Cloud with everything loaded, or download it for your own ComfyUI.
Try in CloudInside the workflow
A read-only preview of the node graph. Open it in Comfy Cloud or download it to edit the nodes.
Loading the graph
Open full-size workflow preview- Author
- ComfyUI
Requires custom nodes
- Reading the workflow
Use this workflow from code
Generated from the workflow graph and inputs when possible; stored examples are shown otherwise. Review credentials and endpoints before running code, which may incur charges.
What you need
- Runs on
- Comfy Cloud
- Key
- COMFY_API_KEY
- Your files
- Uploaded by the code from their urls
Needs a paid Cloud plan and credits.
# 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)Questions & answers
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.