โ† Back to Marketing & Sales
Marketing & Sales by @pauldelavallaz

ad-ready

Generate professional advertising images from product URLs

0
Source Code

Ad-Ready: AI Advertising Image Generator

Generate professional advertising images from product URLs using a 4-phase AI pipeline on ComfyDeploy.

Source: github.com/PauldeLavallaz/ads_SV


Pipeline Architecture

The pipeline runs as a ComfyUI custom node deployed on ComfyDeploy. A single ProductToAds_Manual node executes 4 phases internally:

โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
โ”‚                  ProductToAds_Manual Node                     โ”‚
โ”‚                                                             โ”‚
โ”‚  PHASE 1: Product Scraping (Gemini Flash)                   โ”‚
โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€                   โ”‚
โ”‚  Scrapes product URL โ†’ extracts title, description,         โ”‚
โ”‚  features, price, materials, image URLs                      โ”‚
โ”‚  Also scrapes HTML for high-res product images (โ‰ฅ1000px)    โ”‚
โ”‚                                                             โ”‚
โ”‚  PHASE 2: Campaign Brief Generation (Gemini Flash)          โ”‚
โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€            โ”‚
โ”‚  Brand Identity + Product Data + References โ†’                โ”‚
โ”‚  10-point Campaign Brief (creative direction)                โ”‚
โ”‚                                                             โ”‚
โ”‚  PHASE 3: Blueprint Generation (Gemini Flash)               โ”‚
โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€              โ”‚
โ”‚  Master Prompt (funnel stage) + Brief + Keywords โ†’           โ”‚
โ”‚  Production-Ready JSON Blueprint                             โ”‚
โ”‚                                                             โ”‚
โ”‚  PHASE 4: Image Generation (Nano Banana Pro / Imagen 3)     โ”‚
โ”‚  โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€          โ”‚
โ”‚  Blueprint + all reference images โ†’ final ad image           โ”‚
โ”‚                                                             โ”‚
โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

Phase 2: Campaign Brief (The Creative Brain)

The Brief Generator is the most critical intermediate step. It acts as a "Senior Art Director" that translates raw data into actionable creative direction using a 10-point framework:

  1. Strategic Objective โ€” Why this campaign exists (awareness/positioning/launch)
  2. Central Message โ€” One idea perceivable without text
  3. Visual Tone of Voice โ€” Register: calm/energetic/intimate/monumental
  4. Product Role โ€” Hero vs co-protagonist vs implicit presence
  5. Visual Language & Brand Coherence โ€” Non-negotiable brand codes
  6. Photographer & Equipment โ€” Photography as concept, not execution
  7. Extended Art Direction โ€” Styling, casting, poses, hair/makeup, layout
  8. Environment & Context โ€” Where and why (conceptual, never decorative)
  9. Texture, Material & Product Render โ€” How surfaces are perceived
  10. Final Image Signature โ€” Finish, grain, temporal positioning

Without the brief, the Master Prompt must guess creative strategy. With it, the Master Prompt only executes.

The brief prompt template is included at {baseDir}/configs/Brief_Generator/brief_prompt.json.

Phase 3: Master Prompts (8 Funnel Stages)

Each funnel stage has a specialized Master Prompt that generates a production-ready JSON Blueprint. All share the same internal simulation:

  • ROUND -1: Brand Identity Forensics (stages 03+) โ€” Unified Brand Style Manifest
  • ROUND 0: Fidelity Lock โ€” Product geometry & talent identity are IMMUTABLE
  • ROUND 1: Stage Strategy โ€” Strategic approach specific to funnel position
  • ROUND 2: Graphic Design โ€” UI, typography, CTA engineering

The Blueprint JSON covers: scene production, talent lock, camera perspective, subject action/pose/wardrobe, lighting, product constraints, layout architecture, typography, CTA engineering, and brand asset placement.

Master prompt files are included at {baseDir}/configs/Product_to_Ads/.

Reference Analyzer

Reference images (referencia) are optional and off by default. The pipeline generates creative direction internally from Brand Identity + Campaign Brief. Only use a reference when the user explicitly asks to clone a specific ad's style.

When used, the reference is analyzed for pose, photographic style, and location cues.


โš ๏ธ CRITICAL: Required Inputs Checklist

Before running ANY ad generation, ensure these are provided:

Input Required? How to Get It
--product-url โœ… ALWAYS User provides the product page URL
--product-image โœ… ALWAYS Download from the product page, or user provides
--brand-profile โœ… NEVER EMPTY Pick from catalog or run brand-analyzer first. NEVER leave as "No Brand" if a brand is known
--prompt-profile โœ… ALWAYS Choose based on campaign objective
--aspect-ratio Default: 4:5 Change if needed for platform
--model ๐Ÿ”ถ OPTIONAL Model/talent face. Ads with talent perform much better. Empty = product-only ad (no person). When used, pick from ~/clawd/models-catalog/catalog/images/ (114 models available)
--logo ๐Ÿ”ถ OPTIONAL Try to find it. Use if good quality & easy to get. Skip if low-res or hard to find. Empty = bypassed
--reference ๐Ÿ”ถ OPTIONAL (off) Only when user explicitly asks to clone a reference ad. Empty = bypassed
--creative-brief ๐Ÿ”ถ ON-DEMAND Only when user gives explicit creative direction. Omit to let pipeline auto-generate from brand profile
--language ๐Ÿ”ถ ON-DEMAND Only when user requests a specific language. Omit to use default (es)

๐Ÿšจ NEVER Skip These Steps:

  1. Product image โ€” Download the main product photo from the product URL. The scraper is fragile; always provide a product image explicitly.
  2. Brand profile โ€” If the brand doesn't exist in the catalog, run brand-analyzer skill FIRST to generate one. Never submit with "No Brand" when a brand is known.
  3. Brand logo โ€” TRY to find it (Clearbit, logo.dev, brand website). Use if good quality. If not found or low-res, skip it โ€” the variable accepts empty string (bypassed server-side).
  4. Reference โ€” Do NOT search for references by default. Only provide when the user explicitly asks to clone a specific ad or says "find a good ad to clone".

Auto-Preparation Workflow

When the user asks to generate an ad:

1. User provides: product URL + brand name + objective

2. CHECK brand profile exists:
   โ†’ ls ~/clawd/ad-ready/configs/Brands/ | grep -i "{brand}"
   โ†’ If not found: run brand-analyzer skill first

3. DOWNLOAD product image:
   โ†’ Visit the product URL or fetch the page
   โ†’ Find and download the main product image
   โ†’ Save to /tmp/ad-ready-product.jpg

4. DOWNLOAD brand logo:
   โ†’ Search "{brand name} logo PNG" or fetch from brand website
   โ†’ Download clean logo image
   โ†’ Save to /tmp/ad-ready-logo.png

5. SELECT prompt profile based on objective:
   โ†’ ๐ŸŽจ Morfeo_Creative: DEFAULT โ€” cinematic, narrative-rich, slightly surreal. Best visuals.
   โ†’ Awareness: brand discovery, dynamic scenes, world-building, scroll-stoppers
   โ†’ Interest: sustained attention, micro-world hinting at use-case
   โ†’ Consideration: feature communication, proof cues, informative
   โ†’ Evaluation: trust, authority, reviews, certifications
   โ†’ Conversion: โš ๏ธ MINIMAL by design โ€” clean, CTA-dominant, white backgrounds
   โ†’ Retention: post-purchase confidence, onboarding
   โ†’ Loyalty: editorial, lifestyle, emotional bond
   โ†’ Advocacy: share-worthy, community, belonging

   DEFAULT SELECTION LOGIC:
   - Generic "generate an ad" โ†’ Morfeo_Creative (09)
   - "awareness" / "brand discovery" โ†’ Awareness (01)
   - "conversion" / "buy now" / CTA-focused โ†’ Conversion (05)
   - "creative" / "original" / "surreal" โ†’ Morfeo_Creative (09)
   - "lifestyle" / "editorial" โ†’ Loyalty (07)
   - When in doubt โ†’ Morfeo_Creative (09), NOT Conversion

5b. SELECT MODEL (optional):
   โ†’ If user wants a person in the ad: pick from ~/clawd/models-catalog/catalog/images/model_XX.jpg (114 available)
   โ†’ If user wants product-only ad (no person): leave --model empty
   โ†’ If user doesn't specify: ASK if they want a model or product-only
   โ†’ Catalog preview: catalog.json at ~/clawd/models-catalog/catalog/catalog.json

6. RUN the generation with ALL inputs filled

Usage

Full command (recommended):

COMFY_DEPLOY_API_KEY="$KEY" uv run {baseDir}/scripts/generate.py \
  --product-url "https://shop.example.com/product" \
  --product-image "/tmp/product-photo.jpg" \
  --logo "/tmp/brand-logo.png" \
  --model "models-catalog/catalog/images/model_15.jpg" \
  --brand-profile "Nike" \
  --prompt-profile "Master_prompt_05_Conversion" \
  --aspect-ratio "4:5" \
  --output "ad-output.png"

With reference (only when explicitly requested):

COMFY_DEPLOY_API_KEY="$KEY" uv run {baseDir}/scripts/generate.py \
  --product-url "https://shop.example.com/product" \
  --product-image "/tmp/product-photo.jpg" \
  --reference "/tmp/reference-ad.jpg" \
  --brand-profile "Nike" \
  --prompt-profile "Master_prompt_01_Awareness" \
  --output "ad-output.png"

Auto-fetch mode (downloads product image and logo automatically):

COMFY_DEPLOY_API_KEY="$KEY" uv run {baseDir}/scripts/generate.py \
  --product-url "https://shop.example.com/product" \
  --brand-profile "Nike" \
  --prompt-profile "Master_prompt_05_Conversion" \
  --auto-fetch \
  --output "ad-output.png"

List available brands:

uv run {baseDir}/scripts/generate.py --list-brands

API Details

Endpoint: https://api.comfydeploy.com/api/run/deployment/queue Deployment ID: e37318e6-ef21-4aab-bc90-8fb29624cd15

ComfyDeploy Input Variables

Variable Type Description
product_url string Product page URL to scrape
producto image URL Product image (uploaded to ComfyDeploy)
model image URL Model/talent face reference. OPTIONAL โ€” empty = product-only ad without a person. When used, select from models catalog (~/clawd/models-catalog/catalog/images/model_XX.jpg, 114 available)
referencia image URL Style reference ad โ€” OPTIONAL, empty = bypassed. Only when user asks to clone a reference
marca image URL Brand logo โ€” OPTIONAL, empty = bypassed. Use if found easily in good quality
brand_profile enum Brand name from catalog (70+ brands)
prompt_profile enum Funnel stage master prompt
aspect_ratio enum Output format (1:1, 4:5, 5:4, 9:16, etc.)
language string ON-DEMAND ONLY. Output language for ad copy/CTA. Default: es. Only send when the user explicitly requests a different language. Otherwise, DO NOT include this parameter โ€” let the pipeline use its default.
creative_brief string ON-DEMAND ONLY. Free-text creative direction override. Only use when the user explicitly asks for a specific creative direction, scene, mood, or concept. Otherwise, DO NOT include this parameter โ€” let the pipeline generate its own brief from the Brand Identity profile automatically.

Funnel Stages โ€” Strategic Detail

01 โ€” Awareness

Goal: Scroll-stop, curiosity, brand introduction Reject: Generic "product on table" concepts Strategy: Dynamic camera angles, world-building environments, high-concept creativity CTA: Soft or optional Visual Hierarchy: Talent โ†’ Product โ†’ Optional CTA

02 โ€” Interest

Goal: Sustained attention, introduce value proposition Reject: Abstract visuals that hide the product Strategy: One clear visual idea, believable micro-world hinting at use-case CTA: Learn More, Discover, See Details Visual Hierarchy: Talent โ†’ Product โ†’ Headline โ†’ CTA

03 โ€” Consideration

Goal: Informed evaluation, reduce uncertainty Reject: Pure mood storytelling, vague emotional content Strategy: Communicate WHAT product does, ONE primary differentiator, ONE proof cue CTA: Compare, See Details, Explore Visual Hierarchy: Talent โ†’ Product โ†’ Key Benefit โ†’ Proof Cue โ†’ CTA New: Adds Brand Identity Manifest to Blueprint JSON

04 โ€” Evaluation

Goal: Validate purchase decision, proof & trust Reject: Pure mood, unsupportable claims, visual clutter Strategy: One trust anchor (quality/legitimacy/authority), one proof cue (reviews/certification) CTA: See Reviews, Verified Quality, Learn More Visual Hierarchy: Trust Anchor โ†’ Proof Cue โ†’ Product โ†’ Talent โ†’ CTA

05 โ€” Conversion

Goal: Trigger decisive action, remove friction Reject: New hesitation-inducing info, complex compositions Strategy: One hero (product), one action, optional micro-reassurance CTA: Buy Now, Get Yours, Complete Order (PRIMARY visual element) Visual Hierarchy: Product โ†’ CTA โ†’ Optional Reassurance โ†’ Brand โ†’ Talent

06 โ€” Retention

Goal: Post-purchase confidence, reduce churn Reject: Hard-sell, urgency, price talk Strategy: "You made the right choice" + "Here is the next step" CTA: Start, Set Up, Learn, Track (guidance, not purchase) Visual Hierarchy: Confirmation โ†’ Next Step โ†’ Product โ†’ Talent

07 โ€” Loyalty

Goal: Strengthen emotional bond over time Reject: Sales layouts, instructional tone, aggressive CTAs Strategy: "This brand is part of who you are" โ€” habitual engagement CTA: Optional: Explore, Be Part Of, Continue Visual Hierarchy: Brand World/Mood โ†’ Talent (identity mirror) โ†’ Product โ†’ Brand

08 โ€” Advocacy

Goal: Turn customers into voluntary brand ambassadors Reject: Sales language, instructional tone, forced testimonials Strategy: Signal belonging, create share-worthy imagery, enable organic sharing CTA: Optional or absent: Join the Movement, Part of Us Visual Hierarchy: Mood โ†’ Talent (identity proxy) โ†’ Product (symbol) โ†’ Brand

09 โ€” Morfeo Creative ๐ŸŽจ (DEFAULT)

Goal: Maximum visual impact, narrative-rich, cinematic quality Reject: White backgrounds, studio shots, "product on table", generic poses, sterile compositions Strategy: Build immersive WORLDS, not backgrounds. Talent is a CHARACTER with emotion and action. Subtle surreal/magical elements elevate the mundane. Think movie stills + magical realism + high fashion. CTA: Present but integrated into scene aesthetics Visual Hierarchy: Scene โ†’ Talent (as character) โ†’ Product (organic in scene) โ†’ CTA Creative Philosophy:

  • NEVER a white background or studio
  • Every image has depth (foreground/midground/background layers)
  • Lighting is narrative (golden hour, practicals, colored atmosphere)
  • One subtle surreal element per scene (impossible beauty, dream-logic detail)
  • Wardrobe is costume design, not "simple clothes"
  • Camera has personality (specific film stocks, intentional imperfections)

Creating New Ad Types

To create a new funnel stage or specialized ad type:

  1. Copy the closest existing Master Prompt from {baseDir}/configs/Product_to_Ads/
  2. Redefine ROUND 1 with the new strategic objective
  3. Adjust ROUND 2 UI hierarchy accordingly
  4. Shift talent/product narrative roles
  5. Modify CTA philosophy and copy voice
  6. Keep the JSON output structure identical for pipeline compatibility
  7. Maintain the Fidelity Lock (ROUND 0) โ€” product and talent are always immutable
  8. Save as Master_prompt_XX_NewStage.json โ€” the node auto-discovers new profiles

Key Evolution Pattern Across Stages:

Aspect Early (01-02) Mid (03-05) Late (06-08) Morfeo (09)
Talent role Attention anchor Credibility anchor Identity mirror Character in story
Product role Secondary hero Evaluation hero Familiar symbol Organic in world
CTA Soft/exploratory Proof-led โ†’ Decisive Guidance โ†’ Optional Integrated/aesthetic
Copy voice Intriguing Clarity, proof, action Supportive โ†’ Proud Evocative/poetic
Visual density High-concept Structured, scannable Editorial, spacious Cinematic/layered
Environment World-building Context-rich Lifestyle Immersive + surreal
Environment World-building Context-rich Lifestyle, intimate

Image Input Types

Binding Images (strict fidelity โ€” immutable)

  • talent: Face/body locked, no deviation in facial structure, ethnicity, proportions
  • product_1-4: Shape, label text, material, proportions preserved 1:1
  • brand_logo: UI/button style derived from logo geometry

Soft References (optional, off by default)

Reference image input (referencia) is optional. When provided, it's analyzed for:

  • POSE_REF โ†’ Body position, limbs, weight, gaze, micro-gestures
  • PHOTO_STYLE_REF โ†’ Camera, lens, lighting, grading, grain
  • LOCATION_REF โ†’ Setting, materials, colors, mood

When empty (default), creative direction comes from Brand Identity + Campaign Brief alone.


Brand Profiles

Catalog (70+ brands):

ls ~/clawd/ad-ready/configs/Brands/*.json | sed 's/.*\///' | sed 's/\.json//'

Creating new brand profiles:

Use the brand-analyzer skill:

GEMINI_API_KEY="$KEY" uv run ~/.clawdbot/skills/brand-analyzer/scripts/analyze.py \
  --brand "Brand Name" --auto-save

The Brand Analyzer uses a 3-phase methodology:

  1. Phase 1: Official research via Google Search (canonical data: name, founding, positioning, vision, mission, tagline)
  2. Phase 1.1: Independent campaign research (10+ distinct campaigns via Google Images/Pinterest)
  3. Phase 2-3: Visual analysis โ†’ JSON profile following the standard template

Output covers: brand_info, brand_values, target_audience, tone_of_voice, visual_identity, photography, campaign_guidelines, brand_behavior, channel_expression, compliance.


Aspect Ratios

Ratio Use Case
4:5 Default. Instagram feed, Facebook
9:16 Stories, Reels, TikTok
1:1 Square posts
16:9 YouTube, landscape banners
5:4 Alternative landscape
2:3 Pinterest
3:4 Portrait

Config Files Reference

The skill includes reference copies of all pipeline configuration files:

{baseDir}/configs/
โ”œโ”€โ”€ Brief_Generator/
โ”‚   โ””โ”€โ”€ brief_prompt.json              # 10-point campaign brief framework
โ”œโ”€โ”€ Product_to_Ads/
โ”‚   โ”œโ”€โ”€ Master_prompt_01_Awareness.json
โ”‚   โ”œโ”€โ”€ Master_prompt_02_Interest.json
โ”‚   โ”œโ”€โ”€ Master_prompt_03_Consideration.json
โ”‚   โ”œโ”€โ”€ Master_prompt_04_Evaluation.json
โ”‚   โ”œโ”€โ”€ Master_prompt_05_Conversion.json
โ”‚   โ”œโ”€โ”€ Master_prompt_06_Retention.json
โ”‚   โ”œโ”€โ”€ Master_prompt_07_Loyalty.json
โ”‚   โ”œโ”€โ”€ Master_prompt_08_Advocacy.json
โ”‚   โ””โ”€โ”€ Master_prompt_09_Morfeo_Creative.json  # ๐ŸŽจ DEFAULT โ€” cinematic, surreal, narrative
โ””โ”€โ”€ Reference_Analyzer/
    โ””โ”€โ”€ reference_analysis_prompt.txt   # Pose/style/location analysis prompt

These configs are the canonical reference for the pipeline's behavior. The actual live configs are stored in the ComfyUI deployment at ads_SV/configs/.


Known Limitations

  1. Product image scraping is fragile โ€” always provide product images manually
  2. Some websites block scraping โ€” provide product data manually when scraping fails
  3. Gemini hallucinations โ€” occasional issues in complex reasoning steps
  4. No brief editing โ€” brief is generated automatically; manual override not yet supported
  5. Logo & reference are optional โ€” both use server-side bypass; empty string = not used. Logo: use if good quality. Reference: only on explicit request

Ad-Ready vs Morpheus

Feature Ad-Ready Morpheus
Input Product URL (auto-scrapes) Manual product image
Brand intelligence 70+ brand profiles None
Funnel targeting 8 funnel stages None
Brief generation Auto (10-point creative direction) None
Creative direction Objective-driven (brief โ†’ blueprint) Pack-based (camera, lens, lighting)
Best for Product advertising campaigns Fashion/lifestyle editorial photography
Control level High-level (strategy-first) Granular (every visual parameter)

API Key

Uses ComfyDeploy API key. Set via COMFY_DEPLOY_API_KEY environment variable.

Source Repository

  • GitHub: PauldeLavallaz/ads_SV
  • Architecture: ComfyUI custom node package with 3 nodes:
    • ProductToAds_Manual โ€” Full manual control, single format
    • ProductToAds_Auto โ€” Auto-downloads images, generates 4 formats
    • BrandIdentityAnalyzer โ€” Analyzes brands via Gemini + Google Search