[object Object]

← back to Wallco Ai

add regen_one.js — redo comparison #1 (damask/Hermes/770000) with cleaner-lines prompt + seamless

7d406b1fe0c372431018d5a1b2e8ebc2cd494325 · 2026-05-19 11:33:57 -0700 · SteveStudio2

Files touched

Diff

commit 7d406b1fe0c372431018d5a1b2e8ebc2cd494325
Author: SteveStudio2 <steve@designerwallcoverings.com>
Date:   Tue May 19 11:33:57 2026 -0700

    add regen_one.js — redo comparison #1 (damask/Hermes/770000) with cleaner-lines prompt + seamless
---
 scripts/regen_one.js | 75 ++++++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 75 insertions(+)

diff --git a/scripts/regen_one.js b/scripts/regen_one.js
new file mode 100644
index 0000000..e64d3b4
--- /dev/null
+++ b/scripts/regen_one.js
@@ -0,0 +1,75 @@
+'use strict';
+/**
+ * One-off regenerate of comparison pair #1 — damask · Hermès · seed 770000 —
+ * with cleaner crisp linework + mandatory seamless post-process.
+ * Renders via ComfyUI base+refiner, runs make_seamless, writes to
+ * public/refiner-compare/redo_1.png  (so it sits next to the comparison page).
+ *
+ *   node scripts/regen_one.js
+ */
+require('dotenv').config({ path: require('path').join(__dirname, '..', '.env') });
+const fs = require('fs');
+const path = require('path');
+const { execSync, spawnSync } = require('child_process');
+const { FASHION_PALETTES, paletteString } = require('./fashion_palettes');
+
+const COMFY = process.env.COMFY_URL || 'http://127.0.0.1:8188';
+const OUT = path.join(__dirname, '..', 'public', 'refiner-compare', 'redo_1.png');
+const seed = 770000;
+const pal = FASHION_PALETTES[0]; // Hermès
+
+const POS = `A seamless wallpaper pattern, damask motif, ${paletteString(pal)}, ` +
+  'seamless tile, repeating pattern, no edges, fabric pattern, wallpaper design, high detail, archival quality, ' +
+  'clean crisp precise linework, sharp refined outlines, smooth clean confident curves, immaculate vector-clean edges, ' +
+  'screen-printed wallpaper quality, solid opaque richly-saturated ink, every motif fully filled with solid color, ' +
+  'crisp clean color separation, dimensional embossed relief, tactile luxe material finishes — suede, woven trim, raffia';
+const NEG = 'low quality, blurry, edges, seam, border, frame, signature, watermark, text, hands, fingers, ' +
+  'transparent, see-through, translucent, unfilled shapes, hollow outlines, outline-only motifs, ghosted layers, ' +
+  'washed out, faded, low opacity, gaps in the ink, missing fill, gradient bleed, halftone, halftone dots, ' +
+  'ben-day dots, dot-screen shading, rough lines, wobbly lines, sketchy lines, messy linework, jagged edges';
+
+const STEPS = 30, SWITCH = 24;
+const workflow = {
+  '4':  { class_type: 'CheckpointLoaderSimple', inputs: { ckpt_name: 'sd_xl_base_1.0.safetensors' } },
+  '15': { class_type: 'CheckpointLoaderSimple', inputs: { ckpt_name: 'sd_xl_refiner_1.0.safetensors' } },
+  '5':  { class_type: 'EmptyLatentImage', inputs: { width: 1024, height: 1024, batch_size: 1 } },
+  '6':  { class_type: 'CLIPTextEncode', inputs: { text: POS, clip: ['4', 1] } },
+  '7':  { class_type: 'CLIPTextEncode', inputs: { text: NEG, clip: ['4', 1] } },
+  '16': { class_type: 'CLIPTextEncode', inputs: { text: POS, clip: ['15', 1] } },
+  '17': { class_type: 'CLIPTextEncode', inputs: { text: NEG, clip: ['15', 1] } },
+  '10': { class_type: 'KSamplerAdvanced', inputs: { add_noise: 'enable', noise_seed: seed, steps: STEPS, cfg: 7.5, sampler_name: 'euler', scheduler: 'normal', start_at_step: 0, end_at_step: SWITCH, return_with_leftover_noise: 'enable', model: ['4', 0], positive: ['6', 0], negative: ['7', 0], latent_image: ['5', 0] } },
+  '11': { class_type: 'KSamplerAdvanced', inputs: { add_noise: 'disable', noise_seed: seed, steps: STEPS, cfg: 7.5, sampler_name: 'euler', scheduler: 'normal', start_at_step: SWITCH, end_at_step: 10000, return_with_leftover_noise: 'disable', model: ['15', 0], positive: ['16', 0], negative: ['17', 0], latent_image: ['10', 0] } },
+  '8':  { class_type: 'VAEDecode', inputs: { samples: ['11', 0], vae: ['15', 2] } },
+  '9':  { class_type: 'SaveImage', inputs: { filename_prefix: `redo1_${seed}`, images: ['8', 0] } },
+};
+
+console.log('submitting redo #1 — damask · Hermès · seed 770000 (cleaner lines + seamless)...');
+const submit = execSync(`curl -sf -m 30 -H 'Content-Type: application/json' -X POST '${COMFY}/prompt' -d @-`,
+  { input: JSON.stringify({ prompt: workflow, client_id: 'regen-one' }), encoding: 'utf8' });
+const pid = JSON.parse(submit).prompt_id;
+if (!pid) { console.error('no prompt_id'); process.exit(1); }
+
+const start = Date.now();
+let done = false;
+while (Date.now() - start < 6 * 60_000) {
+  execSync('sleep 3');
+  let hist;
+  try { hist = JSON.parse(execSync(`curl -sf -m 5 '${COMFY}/history/${pid}'`, { encoding: 'utf8' })); }
+  catch { continue; }
+  const e = hist[pid];
+  if (e && e.outputs && e.outputs['9'] && e.outputs['9'].images) {
+    const im = e.outputs['9'].images[0];
+    const url = `${COMFY}/view?filename=${encodeURIComponent(im.filename)}&subfolder=${encodeURIComponent(im.subfolder || '')}&type=${encodeURIComponent(im.type || 'output')}`;
+    execSync(`curl -sf -m 60 -o ${JSON.stringify(OUT)} ${JSON.stringify(url)}`);
+    done = true;
+    break;
+  }
+}
+if (!done || !fs.existsSync(OUT)) { console.error('generation failed/timed out'); process.exit(1); }
+console.log('rendered — running make_seamless...');
+
+const r = spawnSync('python3', [path.join(__dirname, 'make_seamless.py'), OUT, OUT], { encoding: 'utf8' });
+if (r.status !== 0) console.error('[make_seamless] FAILED:', (r.stderr || r.stdout || '').slice(-200));
+else console.log('seamless applied.');
+console.log(`DONE -> ${OUT}`);
+console.log('view: http://100.65.187.120:9905/refiner-compare/redo_1.png');

← f9ddcbe generator: seamless tiling now MANDATORY for all non-mural d  ·  back to Wallco Ai  ·  snapshot — gitify backup 2026-05-19 06ffe08 →