[object Object]

← back to Wallco Ai

generator: seamless tiling now MANDATORY for all non-mural designs (no env opt-out); murals (~11ft x 120in) exempt

f9ddcbed6cdecfaa7a78ca47f0f49029fb7e49f3 · 2026-05-19 11:32:36 -0700 · SteveStudio2

Files touched

Diff

commit f9ddcbed6cdecfaa7a78ca47f0f49029fb7e49f3
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Tue May 19 11:32:36 2026 -0700

    generator: seamless tiling now MANDATORY for all non-mural designs (no env opt-out); murals (~11ft x 120in) exempt
---
 scripts/generate_designs.js | 26 ++++++++++++++------------
 1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/scripts/generate_designs.js b/scripts/generate_designs.js
index 87387f4..0f98473 100644
--- a/scripts/generate_designs.js
+++ b/scripts/generate_designs.js
@@ -288,27 +288,29 @@ function genComfy(prompt, seed, outPath) {
   return outPath;
 }
 
-function generate(prompt, seed, outPath) {
+function generate(prompt, seed, outPath, meta) {
   switch (BACKEND) {
     case 'replicate': genReplicate(prompt, seed, outPath); break;
     case 'comfy':     genComfy(prompt, seed, outPath); break;
     default:          genStub(prompt, seed, outPath); break;
   }
-  // Seamless post-process — collapse edge-pixel Δ from ~50/255 to <15/255
-  // via offset-and-blend. Skippable with MAKE_SEAMLESS=0 for stub/debug runs.
-  // Measured on 3 representative wallco patterns 2026-05-12:
-  //   #14  h-Δ 65.66 →  8.88   v-Δ 37.74 →  9.30
-  //   #144 h-Δ 27.07 → 12.69   v-Δ 38.29 → 11.58
-  //   #16  h-Δ 47.78 →  8.18   v-Δ 60.68 → 16.07
-  // Required so Spoonflower print files tile cleanly — the room renderer
-  // hides seams on the wall composite, but raw-download/print does not.
-  if (process.env.MAKE_SEAMLESS !== '0') {
+  // Seamless post-process — collapse edge-pixel Δ via offset-and-blend so the
+  // tile repeats cleanly (raw-download / Spoonflower print files need this;
+  // the room renderer hides seams on a composite but a print does not).
+  // Steve 2026-05-19: every pattern MUST be seamlessly tileable. The ONLY
+  // exception is a large mural panel (~11ft tall × 120" wide) — a single
+  // non-repeating image. make_seamless is therefore MANDATORY for every
+  // non-mural design (no env opt-out); murals skip it.
+  const isMural = !!meta && (meta.kind === 'mural' || /mural/i.test(meta.category || ''));
+  if (!isMural) {
     const seamlessScript = path.join(__dirname, 'make_seamless.py');
     if (fs.existsSync(seamlessScript) && fs.existsSync(outPath)) {
       const r = spawnSync('python3', [seamlessScript, outPath, outPath], { encoding: 'utf8' });
       if (r.status !== 0) {
-        console.error('[make_seamless] failed, leaving raw pattern in place:', (r.stderr || r.stdout || '').slice(-200));
+        console.error('[make_seamless] FAILED — pattern is NOT seamless:', (r.stderr || r.stdout || '').slice(-200));
       }
+    } else {
+      console.error('[make_seamless] script or output missing — pattern NOT verified seamless');
     }
   }
   return outPath;
@@ -380,7 +382,7 @@ function main() {
     const thisWidth  = widthFixed ? opt.width  : pickWidth();
     const thisHeight = (opt.height != null) ? opt.height : thisWidth;
     try {
-      generate(prompt, seed, outPath);
+      generate(prompt, seed, outPath, { kind: opt.kind, category: opt.category });
       // Triple-layer copyright watermark — metadata + LSB(blue) + DCT(green).
       // Pixel-identical (PSNR > 1.4M dB), proves SAND, LLC ownership at the
       // bit level. Silently no-ops if Python/Pillow not available.

← c51e39f refiner-compare: write progress per-image (not per-pair) + l  ·  back to Wallco Ai  ·  add regen_one.js — redo comparison #1 (damask/Hermes/770000) 7d406b1 →