Skip to content
FramesField
Beginner Light CLI / Copy-Paste Script
Verified Dec 1, 2026

Product Cutout to IC-Light V2 Relit Hero Compositing Pipeline ($0.20 / Hero)

What you’ll make

A halo-free transparent RGBA product cutout plus a physically relit 24MP 300 DPI commercial hero composite with matched directional speculars and contact shadows.

Turn a plain diffused smartphone or studio packshot into a sunlit editorial hero still in three automated fal.ai API calls: strip the backdrop cleanly via Bria RMBG 2.0 ($0.018, 100%-licensed) or MIT BiRefNet v2 (refine_foreground: true), relight highlights and grounded floor shadows in IC-Light V2 ($0.10 at 1MP with initial_latent light bias), and finish approved heroes to 24MP 300 DPI via Topaz Image API ($0.08).

Before you start
  • A clean, evenly diffused eye-level photograph of your product (>=1500 px, zero harsh direct shadows)
  • A fal.ai API key (FAL_KEY) for Bria RMBG 2.0 ($0.018), IC-Light V2 ($0.10/MP), and Topaz Image API ($0.08)
  • curl and jq installed locally (plus optional local MIT BiRefNet v2 in ComfyUI for $0 bulk cutouts)
Estimated cost
$0.198 single-pass per 24MP relit hero (~$0.30 with two IC-Light lighting trials)
Time needed
15 min
Jump to section (2)
  1. 01Why 3 specialized $0.02–$0.10 passes beat all-in-one product generators
  2. 02Tuning IC-Light V2 prompts for believable tabletop optics
Step-by-step overview
SIGNAL PATH READY Click any node or press “Step Through” to trace data flow from input plate to final deliverable.
01–04
Diffused SKU Photo → Bria RMBG 2.0 ($0.018) → IC-Light V2 ($0.10) → Topaz 24MP ($0.08)
Official Demo · Privacy-Enhanced Player (Zero Cookies Until Click)

Diffused SKU Photo → Bria RMBG 2.0 ($0.018) → IC-Light V2 ($0.10) → Topaz 24MP ($0.08)

Bria AI (Official Demo) · youtube-nocookie.com
Frame 01 CUTOUT · $0.018
Halo-Free Alpha PNG
Bria RMBG 2.0 or BiRefNet MIT

Decontaminate bright white sweep spill before compositing onto warm stone or dark slate.

Frame 02 RELIGHT · $0.10
IC-Light V2 1MP Hero
initial_latent: Left/Right + hr_fix

Steers key light, glass speculars, and grounded floor shadows cleanly to match the prompt.

Frame 03 PRINT · $0.08
Label Lock & 24MP Finish
Topaz High Fidelity V2 (<=24MP)

Blend sharp original 6pt fine print if needed, then enlarge once to 300 DPI print master.

Separating halo-free segmentation from directional relighting replaces floating Photoshop drop-shadows with natural specular bounce and grounded contact occlusion.

Source: Bria AI (Official Demo) Model: BRIA RMBG 2.0 / BIREFNET V2 + IC-LIGHT V2 + TOPAZ IMAGE 24MP Verified Dec 1, 2026
Original source ↗

Why 3 specialized $0.02–$0.10 passes beat all-in-one product generators

When e-commerce teams drop a product photo into a single general image generator, the model subtly bends bottle shoulders, hallucinates cap ridges, or invents fake label spelling. Splitting the pipeline into Bria RMBG 2.0 (or BiRefNet v2) → IC-Light V2 → Topaz Image Upscale keeps physical product geometry anchored while synthesizing genuine directional lighting and tabletop bounce for $0.198 single-pass.

Tuning IC-Light V2 prompts for believable tabletop optics

  • Always anchor the contact plane explicitly: Include “resting firmly directly on [surface material] with crisp dark contact shadow directly underneath the base” so the bottle sits grounded instead of hovering two millimeters above the marble.
  • Name surface bounce color: Real tabletops bounce color upward onto the underside of glossy packaging—adding “subtle warm ivory stone bounce reflection along the lower glass curve” cues IC-Light V2 to wrap believable ambient light around the base.
  • Pitch 5 lighting setups for $0.50: Run the same 01_cutout_rgba.png through five quick $0.10 1024×1024 calls (Left golden morning, Right cool Nordic studio, Top dramatic architectural spotlight, moody dark slate, warm sunset linen) before paying $0.08 to upscale the client’s favorite.

For commercial licensing guardrails (Bria CC BY-NC weights vs. paid API vs. MIT BiRefNet), read Guide 35: AI Background Removal, Alpha Matting & Product Relighting or check Fix 68: Pasted-On Product Cutouts & Flat Shadows.

Copy-paste template

End-to-End Bria RMBG 2.0 → IC-Light V2 → Topaz 24MP Hero Script relight-product-hero.sh
Extracts a 100%-licensed transparent product PNG ($0.018), relights it directionally in IC-Light V2 ($0.10 at 1MP), and scales the approved hero to 24MP via Topaz Image API ($0.08).
#!/usr/bin/env bash
set -euo pipefail
# Usage:
#   FAL_KEY="your_key" ./relight-product-hero.sh "https://cdn.example.com/raw_bottle.png" Left

RAW_URL="${1:?Pass diffused studio product photo URL}"
LIGHT_SIDE="${2:-Left}" # Left | Right | Top | Bottom
PROMPT="${3:-Minimalist matte glass serum bottle resting directly on honed warm travertine stone plinth, golden morning sunlight raking from frame left casting soft grounded contact shadow to the right, warm architectural stone bounce light, crisp commercial packshot}"

echo "[1/3] Bria RMBG 2.0 cutout (\$0.018, 100% licensed)..."
CUTOUT_URL=$(curl -sS -X POST "https://fal.run/fal-ai/bria/background/remove" \
  -H "Authorization: Key ${FAL_KEY:?Set FAL_KEY}" \
  -H "Content-Type: application/json" \
  -d "{\"image_url\":\"${RAW_URL}\"}" | jq -r '.image.url // empty')
if [ -z "${CUTOUT_URL}" ]; then echo "RMBG failed" >&2; exit 1; fi
curl -fsSL "${CUTOUT_URL}" -o 01_cutout_rgba.png

echo "[2/3] IC-Light V2 directional relight (\$0.10 @ 1MP, initial_latent=${LIGHT_SIDE})..."
RELIT_URL=$(curl -sS -X POST "https://fal.run/fal-ai/iclight-v2" \
  -H "Authorization: Key ${FAL_KEY}" \
  -H "Content-Type: application/json" \
  -d "{
    \"image_url\": \"${CUTOUT_URL}\",
    \"prompt\": \"${PROMPT}\",
    \"initial_latent\": \"${LIGHT_SIDE}\",
    \"image_size\": \"square_hd\",
    \"enable_hr_fix\": true,
    \"output_format\": \"png\",
    \"seed\": 4096
  }" | jq -r '.images[0].url // empty')
if [ -z "${RELIT_URL}" ]; then echo "IC-Light failed" >&2; exit 1; fi
curl -fsSL "${RELIT_URL}" -o 02_relit_1024.png

echo "[3/3] Topaz Image API 4x enlargement to 4096x4096 (16.8MP, \$0.08 <=24MP tier)..."
MASTER_URL=$(curl -sS -X POST "https://fal.run/fal-ai/topaz/upscale/image" \
  -H "Authorization: Key ${FAL_KEY}" \
  -H "Content-Type: application/json" \
  -d "{
    \"image_url\": \"${RELIT_URL}\",
    \"model\": \"High Fidelity V2\",
    \"upscale_factor\": 4,
    \"output_format\": \"png\"
  }" | jq -r '.image.url // empty')
if [ -z "${MASTER_URL}" ]; then echo "Topaz upscale failed" >&2; exit 1; fi
curl -fsSL "${MASTER_URL}" -o 03_hero_master_4096.png
echo "Done! Saved 01_cutout_rgba.png, 02_relit_1024.png, and 03_hero_master_4096.png"

Helpful prompts & skills for this workflow

Frequently Asked Questions

Why upscale AFTER IC-Light V2 instead of upscaling the cutout first?
IC-Light V2 bills $0.10 per output megapixel. Relighting at 1024×1024 costs $0.10 per lighting test, whereas relighting a 4096×4096 image directly would cost $1.68 per attempt. Draft cheaply at 1MP and pay Topaz $0.08 once on the winning composite.
When should I swap Bria RMBG 2.0 ($0.018) for BiRefNet v2 in step 1?
Swap to MIT-licensed BiRefNet v2 when self-hosting locally at $0/image for 500+ SKU batches, or when extracting translucent glass, mesh, or fine portrait hair at 2048×2048 resolution with refine_foreground: true.
What if my source photo has multiple props and I only want to cut out one bottle?
Keep Bria RMBG 2.0 and add the optional prompt field (e.g., 'prompt': 'amber glass serum bottle')—Bria routes it through prompt-guided object isolation for $0.03 instead of $0.018.
How do I avoid softening tiny 6pt ingredient labels during IC-Light relighting?
Keep enable_hr_fix: true in IC-Light V2, and for regulated cosmetics or beverage cans paste a tightly feathered crop of the original sharp studio label over 02_relit_1024.png in Luminosity/Multiply blend mode before running Topaz.
Use this page in AI tools or notes
raw .md