fix: explicitly instruct model to generate distinct back view with barcode and text
Build and Deploy / build-and-push (push) Successful in 28s

This commit is contained in:
AI Bot
2026-09-02 14:37:15 +05:30
parent 0865b02d17
commit ad6a28ea0e
+6 -1
View File
@@ -407,13 +407,18 @@ Example 2: ["Front view", "Back view", "Left side view", "Right side view"]`;
// Run parallel generation for determined views // Run parallel generation for determined views
const promises = views.map(async (view, index) => { 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}. const fullPrompt = `A clean, isolated 3D render concept art of: ${prompt}.
Focus ONLY on the object itself. Focus ONLY on the object itself.
View: ${view}. View: ${view}.
CRITICAL INSTRUCTIONS: CRITICAL INSTRUCTIONS:
1. Pure white background. 1. Pure white background.
2. DO NOT include any infographics, extra text, labels, icons, or background scenery. Just the isolated object. 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 = { const payload = {
contents: [ contents: [