From 2360e1f7ae8340333d9dc5a75f33b89821417143 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=9D=D0=B8=D0=BA=20=28Claude=29?= Date: Sat, 13 Jun 2026 09:29:40 +0300 Subject: [PATCH] =?UTF-8?q?fix:=20cover=20images=20=E2=80=94=20simplified?= =?UTF-8?q?=20coherent=20prompts,=20no=20style=20conflicts?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Проблема: VISUAL CONCEPT и STYLE из COVER_STYLES противоречили друг другу (sculptor on marble + frosted glass style = модель рисовала свой дефолт) Решение: 3 простых параметра на статью без конфликтов: SUBJECT: что изображено (из getVisualMetaphor) SETTING: антураж (12 вариантов по articleId % 12): oak desk | marble | slate | workbench | velvet | dawn mist | terracotta | city night | concrete | library | frost | brick LIGHTING: конкретный свет (golden hour, studio, rim light, etc.) COLOR TEMPERATURE: warm amber / cool whites / etc. Убраны STYLE/PALETTE/MOOD/COMPOSITION блоки которые путали модель. Теперь каждая статья = уникальная физическая сцена с конкретным светом. --- src/services/covers.js | 49 ++++++++++++++++++++++++++++++++---------- 1 file changed, 38 insertions(+), 11 deletions(-) diff --git a/src/services/covers.js b/src/services/covers.js index 7e54db3..1a2841c 100644 --- a/src/services/covers.js +++ b/src/services/covers.js @@ -167,20 +167,47 @@ function buildCoverPrompt({ title, tags = [], articleId = 0, channelStyle = null paletteDesc = PALETTES[channelStyle.image_palette] || null; } - const visualMetaphor = getVisualMetaphor(title, tags, articleId); + // Выбираем сцену — конкретное место + свет + цвет + // Привязаны к articleId чтобы каждая статья имела уникальный антураж + const SCENES = [ + { setting: 'warm oak desktop surface, afternoon sunlight through window from left casting long shadows', + lighting: 'golden hour, soft shadows', temp: 'warm amber tones' }, + { setting: 'white marble surface, clean studio setup, diffused overhead light', + lighting: 'flat professional studio lighting', temp: 'cool whites and greys' }, + { setting: 'dark slate table, single focused spotlight from above', + lighting: 'dramatic single point light, deep shadows', temp: 'high contrast, near-monochrome' }, + { setting: 'weathered wooden workbench outdoors, overcast daylight', + lighting: 'soft even overcast light, no harsh shadows', temp: 'muted natural greens and browns' }, + { setting: 'black velvet surface in studio, rim lighting from behind', + lighting: 'rim lit, glowing edges, dark center', temp: 'rich blacks with gold highlights' }, + { setting: 'blue morning mist, outdoor scene at dawn, dew on surfaces', + lighting: 'early morning blue hour, soft mist', temp: 'cool blues and pale greys' }, + { setting: 'terracotta-tiled floor, Mediterranean afternoon, dappled shade', + lighting: 'dappled sunlight through leaves', temp: 'warm sienna and ochre tones' }, + { setting: 'glass surface over city lights at night, reflections below', + lighting: 'city glow from below, urban night', temp: 'multicolored bokeh, deep navy' }, + { setting: 'rough concrete surface, industrial warehouse, fluorescent light', + lighting: 'harsh overhead fluorescent, cool and flat', temp: 'grey concrete tones, accent cyan' }, + { setting: 'antique wooden library floor, surrounded by stacked books, candlelight', + lighting: 'warm candlelight from one side', temp: 'deep amber and aged parchment' }, + { setting: 'frosted glass surface, winter morning, ice crystals at edges', + lighting: 'diffused winter morning light', temp: 'icy blues and whites' }, + { setting: 'warm brick wall background, artisan workshop, window light', + lighting: 'soft side window light', temp: 'warm brick reds and natural wood' }, + ]; + const scene = SCENES[articleId % SCENES.length]; + const visualConcept = getVisualMetaphor(title, tags, articleId); - return `Create a wide 16:9 editorial cover illustration. + return `Generate a 16:9 editorial cover photograph or illustration. -VISUAL CONCEPT: ${visualMetaphor} +SUBJECT: ${visualConcept} +SETTING: ${scene.setting} +LIGHTING: ${scene.lighting} +COLOR TEMPERATURE: ${scene.temp} +${tagHint ? `THEMATIC CONTEXT: ${tagHint}` : ''} +${channelStyle?.image_prompt_instructions ? `CHANNEL STYLE: ${channelStyle.image_prompt_instructions}` : ''} -STYLE: ${styleDesc}. -${paletteDesc ? `COLOR PALETTE: ${paletteDesc}.` : ''} -MOOD: ${moodDesc}. -COMPOSITION: ${compositionDesc} -${tagHint ? `THEME (abstract cues only): ${tagHint}.` : ''} -${channelStyle?.image_prompt_instructions ? `\nCHANNEL STYLE: ${channelStyle.image_prompt_instructions}` : ''} - -RULE: absolutely no text, no letters, no words, no logos, no real human faces.`; +RULES: photorealistic or illustrated — either works. NO text, NO letters, NO logos, NO human faces.`; } /**