[object Object]

← back to Wallco Ai

Add Replicate-only chinoiserie sample generator (YOLO task #13, DTD Option C)

41574f38b05f7796a0c1e938797fe6f5be26fdbd · 2026-05-26 15:10:44 -0700 · Steve

Files touched

Diff

commit 41574f38b05f7796a0c1e938797fe6f5be26fdbd
Author: Steve <steve@designerwallcoverings.com>
Date:   Tue May 26 15:10:44 2026 -0700

    Add Replicate-only chinoiserie sample generator (YOLO task #13, DTD Option C)
---
 scripts/sample-chinoiserie-replicate.js | 75 +++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/scripts/sample-chinoiserie-replicate.js b/scripts/sample-chinoiserie-replicate.js
new file mode 100644
index 0000000..307f50e
--- /dev/null
+++ b/scripts/sample-chinoiserie-replicate.js
@@ -0,0 +1,75 @@
+#!/usr/bin/env node
+/**
+ * YOLO task #13 — style-aware AI design SAMPLE (chinoiserie, Replicate-only).
+ *
+ * Generates a 4-6 design SAMPLE of the proven PG chinoiserie style template via
+ * the wallco-ai Replicate SDXL path, SYNCHRONOUSLY. Stays on Replicate (NOT
+ * Mac1 ComfyUI) by passing a non-TILE category slug 'chinoiserie-sample' so
+ * generate_designs.js does not force-route to comfy.
+ *
+ * DTD verdict 2026-05-26 = Option C (unanimous 3/3): keep the proven sparse
+ * template, route around TILE_CATEGORIES via the sample slug, run ghost/frame
+ * gates normally, RECORD (not hard-gate) the seamless score, report realized
+ * PASS rate.
+ *
+ * All output is_published=FALSE. No scale, no publish, no deploy. The prompt
+ * bodies are lifted verbatim-in-structure from the established chinoiserie
+ * rows in dw_unified.spoon_all_designs (ids 37714 / 37556 / 30240) so the
+ * style + palette discipline + screen-print anti-prompt anchor are preserved.
+ *
+ * Usage: GEN_BACKEND=replicate node scripts/sample-chinoiserie-replicate.js
+ */
+require('dotenv').config({ path: require('path').join(__dirname, '..', '.env') });
+
+// Force Replicate for this sample regardless of the repo default (comfy).
+process.env.GEN_BACKEND = 'replicate';
+
+// The proven chinoiserie body — sparse, 75-85% negative space, single-ink
+// figure on solid ground, hard screen-print edges, NO ghost layer. This is the
+// exact discipline block from the published chinoiserie catalog rows.
+const CHINO_BODY =
+  'arranged in a refined seamless repeat. British-archival Mandarin / Ming-dynasty woodblock register. ' +
+  'KEEP IT SIMPLE — sparse, refined, lavishly negative-space-driven. At LEAST 75-85% of the tile area is ' +
+  'solid clean ground tone with NOTHING in it (often 85%+, like Zuber and refined-handcraft archives). ' +
+  'Motifs are FEW (2-4 per tile maximum), well-spaced, never edge-to-edge, never tessellated, never cluttered. ' +
+  'The empty ground IS the design — motifs are punctuation, not pattern-fill. Up to 4 colors max, but the ' +
+  'COMPOSITION must stay simple. Default is 2-tone. Never more than 4 distinct ink tones. ABSOLUTELY NO bleed ' +
+  'between layers — bleed looks cheap and is FORBIDDEN. Single-layer screen-print only. NO ghost layer, NO ' +
+  'faded background, NO atmospheric depth, NO secondary motifs behind the main figures. The ground is one ' +
+  'completely uniform flat solid color from edge to edge. Subtle. Sparse. Refined. Negative-space-driven. ' +
+  'Single-pass silkscreen with two ink screens. Hard clean razor-sharp edges. No half-tones, no gradient, no ' +
+  'watercolor, no crosshatch shading. Every figure region is one flat color. Square aspect ratio, seamless tile ' +
+  'repeat (edges meet cleanly), flat-paper rendering, no watermark, no signature, no text, no logos.';
+
+// 5 distinct (motif × colorway) draws from the established chinoiserie vocabulary.
+const SAMPLES = [
+  { colorway: 'Midnight Navy', ground: 'solid deep-navy (#1B2A3A)', motif: 'pagodas with curved-eave silhouettes flanked by symmetric flowering branches' },
+  { colorway: 'Oxblood',       ground: 'solid deep-oxblood (#5A2A2A)', motif: 'kylin mythical-beast pair on a rocky outcrop with stylized cloud-bands above' },
+  { colorway: 'Forest Loden',  ground: 'solid muted-loden-green (#3D4A39)', motif: 'mountain-and-temple silhouette repeats with stylized scholar-cloud forms' },
+  { colorway: 'Champagne Linen', ground: 'solid champagne-neutral (#D7C9A8)', motif: 'lotus blossom roundels in vertical stacks separated by slender bamboo culms' },
+  { colorway: 'Deep Plum',     ground: 'solid aubergine-plum (#3D2B3F)', motif: 'crane-and-willow vignettes with drifting cloud-bands above' },
+];
+
+const FIGURE = 'bone-ivory (#F2EADB) single-ink';
+
+function buildPrompt(s) {
+  return `Chinoiserie wallpaper — ${s.colorway} colorway. Ground: ${s.ground}. Figure: ${FIGURE}. ` +
+         `Motif: ${s.motif}, ${CHINO_BODY}`;
+}
+
+const prompts = SAMPLES.map(buildPrompt);
+// Pass the prompts to the canonical generator via --prompts so all inline gates
+// (ghost / frame / seamless) and the tone-on-tone suffix + persist + watermark
+// run exactly as in production. Category slug 'chinoiserie-sample' is NOT in
+// TILE_CATEGORIES so the backend stays = replicate.
+process.argv = [
+  process.argv[0], process.argv[1],
+  '--n', String(prompts.length),
+  '--kind', 'seamless_tile',
+  '--category', 'chinoiserie-sample',
+  '--width', '24',
+  '--prompts', prompts.join('|'),
+];
+
+console.log(`[sample-chinoiserie-replicate] ${prompts.length} prompts · backend=replicate · category=chinoiserie-sample · is_published=FALSE`);
+require('./generate_designs.js');

← dddb2ad TODO: record dogs collection (DTD verdict, generate-dogs.js  ·  back to Wallco Ai  ·  drunk-*: every design now shows a vice — joint/cigar/pipe/bo 808384d →