[object Object]

← back to Wallco Ai

task#25: chinoiserie tile-class SAMPLE on ComfyUI (Mac2, circular-padding) — measure seamless yield vs Replicate 20% baseline; is_published=FALSE

306c86f067b6fd6e2b8cd35276d02d5bdfe2b06f · 2026-05-27 07:03:40 -0700 · Steve Abrams

Files touched

Diff

commit 306c86f067b6fd6e2b8cd35276d02d5bdfe2b06f
Author: Steve Abrams <steve@designerwallcoverings.com>
Date:   Wed May 27 07:03:40 2026 -0700

    task#25: chinoiserie tile-class SAMPLE on ComfyUI (Mac2, circular-padding) — measure seamless yield vs Replicate 20% baseline; is_published=FALSE
---
 scripts/sample-chinoiserie-comfyui.js | 115 ++++++++++++++++++++++++++++++++++
 1 file changed, 115 insertions(+)

diff --git a/scripts/sample-chinoiserie-comfyui.js b/scripts/sample-chinoiserie-comfyui.js
new file mode 100644
index 0000000..83c327b
--- /dev/null
+++ b/scripts/sample-chinoiserie-comfyui.js
@@ -0,0 +1,115 @@
+#!/usr/bin/env node
+/**
+ * YOLO task #25 — style-aware tile-class SAMPLE on ComfyUI (chinoiserie).
+ *
+ * Closes the open question from task #13: the Replicate SDXL path gave only
+ * 20% seamless yield on chinoiserie (a TILE-class style) because Replicate
+ * ships zeros-padding so tile edges don't wrap. Task #13 hypothesized that
+ * ComfyUI's circular-padding (SeamlessTile + MakeCircularVAE patching the
+ * UNet+VAE Conv2d) is the right backend for tile-class styles — that's exactly
+ * why generate_designs.js force-routes TILE_CATEGORIES to comfy. The prior
+ * ComfyUI attempt died on a contended Mac1 (0 designs / 35 min); the
+ * hypothesis was never measured. This measures it.
+ *
+ * DTD verdict 2026-05-27 (unanimous 3/3): Mac1 ComfyUI had a 73-job / ~20hr
+ * queue (useless for a 25-min budget). The hypothesis is about ComfyUI
+ * circular-padding, NOT the Mac1 box — Mac2's local ComfyUI runs the identical
+ * software + the identical SeamlessTile/MakeCircularVAE custom node. So
+ * measure the identical circular-padding hypothesis on Mac2 (free, in-budget).
+ *
+ * Category = 'chinoiserie' (a real TILE_CATEGORY) so the generator uses its
+ * production tile path: force-route comfy + tileable=true (SeamlessTile +
+ * MakeCircularVAE) + tileProfilePrompts continuity suffix. This is the REAL
+ * production tile path — exactly the path Steve would scale.
+ *
+ * Prompt bodies lifted verbatim-in-structure from task #13 (CHINO_BODY) which
+ * itself was lifted from the published chinoiserie rows (ids 37714/37556/30240).
+ * 5 colorway×motif draws are identical to task #13 for a clean
+ * Replicate-vs-ComfyUI comparison; 3 added to reach the 8-design target.
+ *
+ * HARD: is_published stays FALSE (generate_designs.js inserts FALSE). NO
+ * publish, NO snapshot rebuild, NO deploy, NO Shopify push, NO git push.
+ *
+ * Usage: node scripts/sample-chinoiserie-comfyui.js
+ */
+require('dotenv').config({ path: require('path').join(__dirname, '..', '.env') });
+const { spawnSync } = require('child_process');
+const path = require('path');
+
+// ── Backend: Mac2 local ComfyUI (DTD-B). Identical circular-padding nodes. ──
+// HARD-FORCE Mac2 — the repo .env sets COMFY_URL to Mac1 (192.168.1.133), which
+// has a ~20hr queue. Override unconditionally; allow opt-out only via MAC2_COMFY.
+const COMFY_URL = process.env.MAC2_COMFY_URL || 'http://127.0.0.1:8188';
+
+// CHINO_BODY — verbatim from task #13 (the published-chinoiserie discipline block).
+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.';
+
+const FIGURE = 'bone-ivory (#F2EADB) single-ink';
+
+// 5 identical to task #13 + 3 new (marked) to reach 8.
+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' },
+  // ── 3 new for the 8-design target ──
+  { colorway: 'Celadon',         ground: 'solid pale celadon-green (#B7C9B0)', motif: 'peony branch silhouettes with blossoming flower-heads and curling tendrils' },
+  { colorway: 'Imperial Gold',   ground: 'solid muted antique-gold (#B89A52)', motif: 'foo-dog temple-guardian lions seated on plinths flanking a hanging lantern' },
+  { colorway: 'Ink Black',       ground: 'solid near-black (#1A1A1A)',        motif: 'scholar-rock and garden-pavilion vignettes with stylized pine boughs' },
+];
+
+function buildPrompt(s) {
+  return `Chinoiserie wallpaper — ${s.colorway} colorway. Ground: ${s.ground}. Figure: ${FIGURE}. ` +
+         `Motif: ${s.motif}, ${CHINO_BODY}`;
+}
+
+// ── Settlement pre-gate on every prompt (Steve hard rule). ──
+const { checkPrompt } = require('./settlement-gate.js');
+const okPrompts = [];
+console.log('=== SETTLEMENT PRE-GATE (text, free, deterministic) ===');
+for (const s of SAMPLES) {
+  const p = buildPrompt(s);
+  const r = checkPrompt(p);
+  console.log(`  ${s.colorway.padEnd(16)} VERDICT=${r.verdict}  (partA=${r.partA} partB=${JSON.stringify(r.partB)})`);
+  if (r.verdict === 'BLOCK') { console.log(`     ✗ BLOCKED — dropped: ${r.reason}`); continue; }
+  okPrompts.push(p);
+}
+console.log(`Settlement: ${okPrompts.length}/${SAMPLES.length} prompts cleared (OK/NEEDS_REVIEW).`);
+if (!okPrompts.length) { console.error('All prompts blocked — nothing to generate.'); process.exit(1); }
+
+// ── Hand off to the canonical generator as a child process so post-gen steps
+//    can run after main() exits. category=chinoiserie => tile path (comfy +
+//    SeamlessTile + MakeCircularVAE). Seamless gate active at tolerance 12. ──
+const env = {
+  ...process.env,
+  GEN_BACKEND: 'comfy',
+  COMFY_URL,
+  COMFY_POLL_TIMEOUT_SEC: process.env.COMFY_POLL_TIMEOUT_SEC || '360',
+  WALLCO_SEAMLESS_TOLERANCE: '12',   // task-mandated tolerance, gate ACTIVE
+};
+const genArgs = [
+  path.join(__dirname, 'generate_designs.js'),
+  '--n', String(okPrompts.length),
+  '--kind', 'seamless_tile',
+  '--category', 'chinoiserie',
+  '--width', '24',
+  '--prompts', okPrompts.join('|'),
+];
+console.log(`\n=== GENERATE (backend=comfy @ ${COMFY_URL}, category=chinoiserie, tileable, is_published=FALSE) ===`);
+const t0 = Date.now();
+const r = spawnSync('node', genArgs, { env, stdio: 'inherit' });
+console.log(`\n=== generation finished in ${Math.round((Date.now()-t0)/1000)}s (exit ${r.status}) ===`);
+process.exit(r.status || 0);

← 5778b04 snapshot before reject sweep (preserve parallel-session in-p  ·  back to Wallco Ai  ·  fuzzy-seam scanner: detect pil-heal blur-band 'fuzzy cross' 5d63f4b →