From ad6a28ea0e75b4d31ea1a130abe18c0d3949adb4 Mon Sep 17 00:00:00 2001 From: AI Bot Date: Wed, 2 Sep 2026 14:37:15 +0530 Subject: [PATCH] fix: explicitly instruct model to generate distinct back view with barcode and text --- backend/server.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/backend/server.js b/backend/server.js index 1fedcfd..c918fc7 100644 --- a/backend/server.js +++ b/backend/server.js @@ -407,13 +407,18 @@ Example 2: ["Front view", "Back view", "Left side view", "Right side view"]`; // Run parallel generation for determined views const promises = views.map(async (view, index) => { + let backViewSpecifics = ""; + if (view.toLowerCase().includes('back')) { + backViewSpecifics = "\n4. CRITICAL: This is the REAR / BACK view. It MUST look completely different from the front. It should show typical back-of-packaging elements like a barcode, ingredients list, usage instructions, and small regulatory text. DO NOT just generate the front logo again."; + } + const fullPrompt = `A clean, isolated 3D render concept art of: ${prompt}. Focus ONLY on the object itself. View: ${view}. CRITICAL INSTRUCTIONS: 1. Pure white background. 2. DO NOT include any infographics, extra text, labels, icons, or background scenery. Just the isolated object. -3. If this object is very thin (like a sachet, pouch, or packet), the 'Left side view' and 'Right side view' must only show the thin edge profile of the object without the main front artwork.`; +3. If this object is very thin (like a sachet, pouch, or packet), the 'Left side view' and 'Right side view' must only show the thin edge profile of the object without the main front artwork.${backViewSpecifics}`; const payload = { contents: [