The 'Relight Composited Product' workflow in ComfyUI is designed to enhance product images by allowing users to adjust the lighting of a specific area within a composited image. This is particularly useful for product photographers and e-commerce businesses looking to create visually appealing images that stand out. The workflow leverages the Qwen-Image-Edit model, known for its advanced image editing capabilities, to achieve realistic lighting adjustments. By using the 'comfyui-inpaint-cropandstitch' custom node, users can precisely target areas of the image to relight, ensuring seamless integration with the existing scene. This workflow is beneficial for improving the visual aesthetics of product images without the need for complex photo editing software.
API
Use this workflow from code
Every Comfy workflow is a JSON graph. The payload below is this workflow, exactly as ComfyUI runs it — fetch it from the URL, keep it in version control, or load it in ComfyUI and run it node by node.
GET https://comfy.org/workflows/download/ae12a241076c.jsonFetching workflow JSON…
Run it from Python or TypeScript with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.
# Install (beta)
pip install comfy-sdk # Python
npm i @comfyorg/sdk # TypeScript
# Run "Relight Composited Product" (Python)
from comfy_sdk import Comfy
client = Comfy(api_key="comfyui-...")
# This workflow, exported in API format (see note below)
wf = client.workflows.from_file("templates-qwen_image_edit-crop_and_stitch-fusion_api.json")
asset = client.assets.from_file("input.png")
wf.set_input("103", "image", asset) # LoadImage
job = client.run(wf)
for output in job.get_outputs("208"): # SaveImage
output.to_file(output.name)The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API). API access requires a Comfy Cloud plan with an API key. SDK docs · Get an API key
FAQ
















