Relight Composited Product - After
Relight Composited Product - Before

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.

templates-qwen_image_edit-crop_and_stitch-fusion.json
Fetching workflow JSON…

Run it from TypeScript or Python with the Comfy SDK. The same code targets Comfy Cloud or a ComfyUI you host yourself — only the base URL changes.

// Install (beta)
npm i @comfyorg/sdk

// Run "Relight Composited Product" (TypeScript)
import { Comfy } from "@comfyorg/sdk";

const client = new Comfy({ apiKey: "comfyui-..." });

// This workflow, exported in API format (see note below)
const wf = await client.workflows.fromFile("templates-qwen_image_edit-crop_and_stitch-fusion_api.json");

const asset = client.assets.fromFile("input.png");
wf.setInput("103", "image", asset); // LoadImage

const job = await client.run(wf);
await job.getOutputs("208")[0].toFile("output.png"); // SaveImage

The SDK takes a workflow in API format: open this workflow in ComfyUI and use File → Export Workflow (API).

Comfy Cloud API access requires a plan with an API key.

FAQ

Frequently Asked Questions

View all workflows
Showing 30 of 30 templates