[object Object]

← back to Wallco Ai

per-category prompt suffix: tile-profile for damask/chinoiserie/scenic, silhouette for drunk/figure categories

f216b0f7fd3810c4f3c441b283a095ec2257ff1b · 2026-05-26 08:40:43 -0700 · Steve Abrams

Files touched

Diff

commit f216b0f7fd3810c4f3c441b283a095ec2257ff1b
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Tue May 26 08:40:43 2026 -0700

    per-category prompt suffix: tile-profile for damask/chinoiserie/scenic, silhouette for drunk/figure categories
---
 scripts/generate_designs.js | 71 +++++++++++++++++++++++++++++++++------------
 1 file changed, 53 insertions(+), 18 deletions(-)

diff --git a/scripts/generate_designs.js b/scripts/generate_designs.js
index 892b451..e655f7b 100644
--- a/scripts/generate_designs.js
+++ b/scripts/generate_designs.js
@@ -47,6 +47,28 @@ try {
 }
 const NEGATIVE_PROMPT_ADDON = "neon, fluorescent, electric, saturated, rainbow, more than 4 colors, multicolor, vivid, day-glo, highlighter colors, hot pink, primary red, primary yellow, primary blue, electric green, ghost layer, ghosted background, faded background motifs, lighter copies behind, secondary motifs behind main figures, atmospheric perspective, atmospheric depth, depth layers, three colors, four colors, multiple ink tones, partial-opacity layer, semi-transparent layer, halftone, ben-day dots, dot screen shading, crosshatching, engraved interior shading, line-shading inside figure, interior shading, fur texture inside silhouette, anatomical detail inside silhouette, watercolor wash, airbrush, soft edges, sepia atmospheric gradient, cheap-looking AI artifact, layered bleed";
 
+// 2026-05-26 — Categories that are dense edge-to-edge repeating patterns by
+// design (damask, chinoiserie, scenic, stripe, etc.). The default Matisse
+// paper-cut suffix actively fights these — it bans "edge-to-edge / tessellated
+// densely" + "more than 4 colors" + "crosshatching / interior shading" which
+// are FEATURES of traditional damask. Pre-this-change, generator_tick had a
+// 100% seamless-fail rate on damask because SDXL was receiving contradictory
+// guidance (dense damask prompt + anti-density suffix). Categories in this
+// set get the tileProfilePrompts() suffix instead.
+const TILE_CATEGORIES = new Set([
+  'damask', 'chinoiserie', 'designer-scenic', 'throttled-plaster-roses',
+  'muybridge-plate', 'face-skull-damask', 'stripe', 'monterey-mural',
+  'designer-zoo-calm', 'toile-de-jouy'
+]);
+
+// Tileable-pattern prompt builder. Emphasizes wrap-around continuity and
+// allows density / interior shading — opposite of the silhouette anchor.
+function tileProfilePrompts(rawPrompt) {
+  const positive = `${rawPrompt}. Seamless tileable wallpaper repeat — the motif continues uninterrupted across the tile boundary. Elements that touch the right edge resume from the left edge, elements at the top resume from the bottom, like one continuous pattern that tiles infinitely with no visible seams. Consistent intricate motif density across the entire tile including all four edges. Archival quality designer wallcovering, hand-engraved feel, museum-grade traditional damask/chinoiserie/toile aesthetic.`;
+  const negative = `visible seam, seam visible, edge mismatch, abrupt cutoff at tile borders, sparse center with dense edges, dense center with sparse edges, isolated motif on solid background, single centered hero motif, border, frame, rectangular frame, picture frame, gilded frame, ornamental cartouche, pasted-on rectangle, watermark, signature, text, hands, fingers, low quality, blurry, neon, fluorescent, day-glo, highlighter colors, hot pink, electric green, primary saturated colors`;
+  return { positive, negative };
+}
+
 // Distribution of generation widths when --width is not explicitly passed.
 // Override via env: GENERATE_WIDTH_POOL="24,24,36,36,52" (entries weight pick frequency).
 const WIDTH_POOL = (process.env.GENERATE_WIDTH_POOL || '24,24,36,36,52')
@@ -162,7 +184,7 @@ function loadReplicateToken() {
   return null;
 }
 
-function genReplicate(prompt, seed, outPath) {
+function genReplicate(prompt, seed, outPath, meta) {
   const TOKEN = loadReplicateToken();
   if (!TOKEN) throw new Error('REPLICATE_API_TOKEN not found in env or ~/Projects/secrets-manager/.env');
 
@@ -171,16 +193,20 @@ function genReplicate(prompt, seed, outPath) {
   const WIDTH  = parseInt(process.env.REPLICATE_WIDTH  || '1024', 10);
   const HEIGHT = parseInt(process.env.REPLICATE_HEIGHT || '1024', 10);
 
-  // 2026-05-22 — match the comfy backend's v3 paper-cut-stencil aesthetic.
-  // The old prompt asked for "dimensional embossed relief" + "tactile luxe material
-  // finishes" which directly produced the ghost-layer / outline-fill failures Steve
-  // rejected. Replaced with the same anchor as genComfy().
-  // 2026-05-22 v4 — Steve directive "it's like we are literally pasting silhouettes."
-  // Reframe the entire generation as Matisse-cut-paper collage / sticker-on-paper.
-  // The figure-ground relationship is the WHOLE design — no depth, no atmosphere,
-  // no secondary motifs behind primary, no shaded interiors.
-  const positive = `${prompt}. Matisse cut-paper collage aesthetic — every motif is a flat solid-color silhouette physically cut from construction paper with scissors and pasted onto a single solid background, like stickers peeled from a sheet. SILHOUETTE ON BACKGROUND ONLY. No depth, no atmosphere, no secondary motifs behind primary ones, no shading inside shapes. Every shape one opaque ink color, hard razor-sharp paper-cut edges. Two ink tones maximum (figure + ground). Vinyl die-cut sticker aesthetic, seamless tile, generous negative space, sparse minimal composition, archival quality designer wallcovering. NO FRAME, NO PLATE, NO PASTED-ON SHAPE around the motif — motifs sit DIRECTLY on the background with no enclosing rectangle, oval, rounded-square, or circle behind them.`;
-  const negative = `outline only, line drawing, linework, hollow shape, hollow interior, unfilled motif, see-through, white interior, transparent fill, translucent fill, outline drawing of a flower, outline drawing of a leaf, ink outline without fill, line-art rendered motif, hand-drawn ink lines, etching, engraving, gradient fill, drop shadow, ambient occlusion, soft shadow, semi-transparent, alpha overlay, multiply blend, ghost background, ghost layer, ghosted, layered bleed, bleed between inks, overlapping translucent layers, faded background, multi-tone interior shading, dimensional, embossed, relief, 3D, three-dimensional, depth, atmospheric perspective, fur texture, anatomical detail inside silhouette, crosshatching, halftone, ben-day dots, dot screen, watercolor wash, airbrush, soft edges, blurry, low quality, seam visible, border, frame, rectangular frame, oval frame, rounded square frame, beveled frame, picture frame, gilded frame, ornamental frame, pasted-on rectangle, pasted-on oval, pasted-on circle, sticker outline around motif, ornamental cartouche containing the motif, hard-edged inner shape, plate behind motif, contrasting plate, medallion plate, signature, watermark, text, hands, fingers, busy, cluttered, edge-to-edge, tessellated densely, more than 4 colors, ${NEGATIVE_PROMPT_ADDON}`;
+  let positive, negative;
+  if (meta && TILE_CATEGORIES.has(meta.category)) {
+    // Tile-profile categories (damask, chinoiserie, etc.) — see TILE_CATEGORIES comment.
+    const p = tileProfilePrompts(prompt);
+    positive = p.positive;
+    negative = p.negative;
+  } else {
+    // Silhouette profile (drunk-animals, designer-bugs, lips, cactus, etc.) —
+    // 2026-05-22 v4 Matisse-cut-paper anchor. Steve directive: "it's like we are
+    // literally pasting silhouettes." Figure-ground only, no depth, no secondary
+    // motifs behind primary, no shaded interiors.
+    positive = `${prompt}. Matisse cut-paper collage aesthetic — every motif is a flat solid-color silhouette physically cut from construction paper with scissors and pasted onto a single solid background, like stickers peeled from a sheet. SILHOUETTE ON BACKGROUND ONLY. No depth, no atmosphere, no secondary motifs behind primary ones, no shading inside shapes. Every shape one opaque ink color, hard razor-sharp paper-cut edges. Two ink tones maximum (figure + ground). Vinyl die-cut sticker aesthetic, seamless tile, generous negative space, sparse minimal composition, archival quality designer wallcovering. NO FRAME, NO PLATE, NO PASTED-ON SHAPE around the motif — motifs sit DIRECTLY on the background with no enclosing rectangle, oval, rounded-square, or circle behind them.`;
+    negative = `outline only, line drawing, linework, hollow shape, hollow interior, unfilled motif, see-through, white interior, transparent fill, translucent fill, outline drawing of a flower, outline drawing of a leaf, ink outline without fill, line-art rendered motif, hand-drawn ink lines, etching, engraving, gradient fill, drop shadow, ambient occlusion, soft shadow, semi-transparent, alpha overlay, multiply blend, ghost background, ghost layer, ghosted, layered bleed, bleed between inks, overlapping translucent layers, faded background, multi-tone interior shading, dimensional, embossed, relief, 3D, three-dimensional, depth, atmospheric perspective, fur texture, anatomical detail inside silhouette, crosshatching, halftone, ben-day dots, dot screen, watercolor wash, airbrush, soft edges, blurry, low quality, seam visible, border, frame, rectangular frame, oval frame, rounded square frame, beveled frame, picture frame, gilded frame, ornamental frame, pasted-on rectangle, pasted-on oval, pasted-on circle, sticker outline around motif, ornamental cartouche containing the motif, hard-edged inner shape, plate behind motif, contrasting plate, medallion plate, signature, watermark, text, hands, fingers, busy, cluttered, edge-to-edge, tessellated densely, more than 4 colors, ${NEGATIVE_PROMPT_ADDON}`;
+  }
 
   const body = {
     version: MODEL_VERSION,
@@ -234,7 +260,7 @@ function genReplicate(prompt, seed, outPath) {
 // ---- ComfyUI backend ------------------------------------------------------
 // Submits a SDXL txt2img workflow to ComfyUI at COMFY_URL (default Mac1 192.168.1.133:8188).
 // Polls /history/<prompt_id> for the result, then pulls the image bytes.
-function genComfy(prompt, seed, outPath) {
+function genComfy(prompt, seed, outPath, meta) {
   const COMFY = process.env.COMFY_URL || 'http://192.168.1.133:8188';
   const MODEL = process.env.COMFY_MODEL || 'sd_xl_base_1.0.safetensors';
   const WIDTH = parseInt(process.env.COMFY_WIDTH || '1024', 10);
@@ -262,8 +288,17 @@ function genComfy(prompt, seed, outPath) {
   // filled silhouette, NEVER an outline drawing. Background motifs must be
   // colored fills, not white-interior shapes. Negative prompt explicitly bans
   // outline-only / hollow / linework rendering.
-  const positivePrompt = `${prompt}, vinyl die-cut sticker aesthetic, seamless tile, every single shape rendered as a SOLID FILLED SILHOUETTE in one opaque ink color, NO outline-only motifs, NO hollow shapes, NO line drawings, NO see-through interiors, EVERY flower leaf branch fully filled like a paper-cut stencil, hard crisp razor-sharp edges, flat single-layer screen-print, two to four ink tones maximum, generous negative space between filled shapes, sparse minimal composition, archival quality designer wallcovering`;
-  const negativePrompt = `outline only, line drawing, linework, hollow shape, hollow interior, unfilled motif, see-through, white interior, transparent fill, translucent fill, outline drawing of a flower, outline drawing of a leaf, ink outline without fill, line-art rendered motif, hand-drawn ink lines, etching, engraving, gradient fill, drop shadow, ambient occlusion, soft shadow, semi-transparent, alpha overlay, multiply blend, ghost background, ghost layer, ghosted, layered bleed, bleed between inks, overlapping translucent layers, faded background, multi-tone interior shading, dimensional, embossed, relief, 3D, three-dimensional, depth, atmospheric perspective, fur texture, anatomical detail inside silhouette, crosshatching, halftone, ben-day dots, dot screen, watercolor wash, airbrush, soft edges, blurry, low quality, seam visible, border, frame, signature, watermark, text, hands, fingers, busy, cluttered, edge-to-edge, tessellated densely, more than 4 colors, ${NEGATIVE_PROMPT_ADDON}`;
+  let positivePrompt, negativePrompt;
+  if (meta && TILE_CATEGORIES.has(meta.category)) {
+    // Tile-profile categories (damask/chinoiserie/scenic/etc.) get a tileability-
+    // first suffix; the silhouette anchor below actively fights damask aesthetic.
+    const p = tileProfilePrompts(prompt);
+    positivePrompt = p.positive;
+    negativePrompt = p.negative;
+  } else {
+    positivePrompt = `${prompt}, vinyl die-cut sticker aesthetic, seamless tile, every single shape rendered as a SOLID FILLED SILHOUETTE in one opaque ink color, NO outline-only motifs, NO hollow shapes, NO line drawings, NO see-through interiors, EVERY flower leaf branch fully filled like a paper-cut stencil, hard crisp razor-sharp edges, flat single-layer screen-print, two to four ink tones maximum, generous negative space between filled shapes, sparse minimal composition, archival quality designer wallcovering`;
+    negativePrompt = `outline only, line drawing, linework, hollow shape, hollow interior, unfilled motif, see-through, white interior, transparent fill, translucent fill, outline drawing of a flower, outline drawing of a leaf, ink outline without fill, line-art rendered motif, hand-drawn ink lines, etching, engraving, gradient fill, drop shadow, ambient occlusion, soft shadow, semi-transparent, alpha overlay, multiply blend, ghost background, ghost layer, ghosted, layered bleed, bleed between inks, overlapping translucent layers, faded background, multi-tone interior shading, dimensional, embossed, relief, 3D, three-dimensional, depth, atmospheric perspective, fur texture, anatomical detail inside silhouette, crosshatching, halftone, ben-day dots, dot screen, watercolor wash, airbrush, soft edges, blurry, low quality, seam visible, border, frame, signature, watermark, text, hands, fingers, busy, cluttered, edge-to-edge, tessellated densely, more than 4 colors, ${NEGATIVE_PROMPT_ADDON}`;
+  }
 
   // Optional SDXL refiner — set COMFY_REFINER_MODEL=sd_xl_refiner_1.0.safetensors
   // to run base+refiner (expert-ensemble), matching what Replicate's SDXL does.
@@ -384,10 +419,10 @@ function genReplicateFlux(prompt, seed, outPath) {
 
 function generate(prompt, seed, outPath, meta) {
   switch (BACKEND) {
-    case 'replicate': genReplicate(prompt, seed, outPath); break;
-    case 'flux':      genReplicateFlux(prompt, seed, outPath); break;
-    case 'comfy':     genComfy(prompt, seed, outPath); break;
-    default:          genStub(prompt, seed, outPath); break;
+    case 'replicate': genReplicate(prompt, seed, outPath, meta); break;
+    case 'flux':      genReplicateFlux(prompt, seed, outPath, meta); break;
+    case 'comfy':     genComfy(prompt, seed, outPath, meta); break;
+    default:          genStub(prompt, seed, outPath, meta); break;
   }
   // 2026-05-22 — Ghost-layer post-process. SDXL produces multi-opacity ghost
   // copies of repeat motifs ~100% of the time even with strong anti-prompts

← 540cab4 gitignore data/crontab.backup-* snapshots + flush new bleed-  ·  back to Wallco Ai  ·  deploy: exclude 16GB of regeneratable data dirs (elements/ti d023789 →