Go to file
type-two e3d1a0aa13 Act on the LoRA bench: fix a real farm bug, flip to the sharper backend, make gen reproducible
A 17-agent bench classified 103 models across the 125GB civit library and ran 12 live LoRA
tests. Headline: NO LoRA BEATS THE PLAIN BASELINE — all 12 came back unusable, so the
recommended recipe for both tiers contains zero LoRAs. The failure is at the checkpoint, not
the LoRAs: comfyui_sd is the only farm operator that loads a LoRA and it can reach exactly one
checkpoint, a person-photoreal SD1.5 merge that draws a woman for any clothing noun no matter
how hard you negative-prompt it. flux_local, the lane that actually works, has no lora param
at all. The two lanes are disjoint, so no LoRA here got a fair garment evaluation.

Real bug found and fixed: the farm IGNORES ?parent_job=. A bogus id still returns the entire
asset table (measured: 2,578 rows, 34 distinct parents), so mb_outputs()[0] was only ever
correct because the table happens to come back newest-first — two jobs in flight would
download each other's images, which is exactly what happened to two agents in the bench.
Now filtered client-side.

Measured changes:
· Default backend CF -> flux_local klein-4b. At matched prompt and seed, klein holds corduroy
  wale across the garment where CF flux-1-schnell flattens it to smooth canvas. CF stays
  selectable: ~2s and never queues behind the farm's serial GPU lane.
· Seeds are reproducible. /api/gen used time.time()%99991 so nothing could ever be reproduced,
  and /api/doll/gen inherited the operator default seed=42 so a phrase produced a byte-identical
  image forever and reroll did nothing. Both now hash the phrase + a variant counter; rerolling
  is bumping variant.
· The painterly white doll2d template that actually shipped the 441 sprites wasn't in this repo
  at all — only djsim's later green variant. Added, and made the default; green is now the
  documented escape hatch for plaid and busy patterns, since the bench measured klein on pure
  white keying 7/7 flood seeds on both a dark solid and a busy multicolour knit.
· Doll generation moved 1024 -> 704 to match the canvas, so we stop downscaling before the key
  and softening the edges the keyer depends on.
· Templates hoisted to one registry; /api/gen returns the resolved prompt and seed and the UI
  shows them under the preview.
· Local keyer warns loudly: flat3d product shots come back on studio grey with a drop shadow
  (border 215-244, zero pixels >=250), which only partially seeds the >232 gate. RMBG is
  semantic and unaffected.

Verified: seeds deterministic and variant-sensitive, templates resolve view/year, and a live
klein-4b generation produced a flat-lay corduroy jacket with legible wale and no person.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-24 16:47:26 +10:00
tools Phase 2: reskin engine — dress the nude TRELLIS bodies without fitting anything 2026-07-24 16:22:38 +10:00
web Act on the LoRA bench: fix a real farm bug, flip to the sharper backend, make gen reproducible 2026-07-24 16:47:26 +10:00
.gitignore Phase 3: the 2D paper-doll tier — 392 garments you can actually change 2026-07-24 16:07:13 +10:00
blender_ops.py WARDROBEGOD v1 — wardrobe generator bench (bodies, fits, garment gen pipeline) 2026-07-20 20:53:43 +10:00
README.md WARDROBEGOD v1 — wardrobe generator bench (bodies, fits, garment gen pipeline) 2026-07-20 20:53:43 +10:00
server.py Act on the LoRA bench: fix a real farm bug, flip to the sharper backend, make gen reproducible 2026-07-24 16:47:26 +10:00
STATE_AND_PLAN.md Record build status for phases 0-3 + recon corrections found while building 2026-07-24 16:23:39 +10:00

WARDROBEGOD — one skeleton, infinite fits

The wardrobe generator bench: load bodies (FBX/GLB/OBJ), build a clothes library, generate new garments on the farm, fit them, assemble dressed NPCs. Sibling of NPCFACTORY (the dress-up/clip bench) and MeshGod imagelab — this one owns clothing.

python3 server.py                 → http://localhost:8150
WG_HOST=0.0.0.0 python3 server.py → expose on the tailnet
MB_TOKEN=mbt_… python3 server.py  → enables the generator tab (MODELBEAST bearer token)

No build step: stdlib server + three.js from CDN. Heavy lifting = local headless Blender (blender_ops.py, tested on 5.1.2; override path with WG_BLENDER).

What it does

  • Library panes: bodies (scans library/bodies/ + ~/Documents/anatomy + thriftgod's web/assets/models), garments, generated images, finished outfits. Upload via file inputs.
  • Stage: orbit viewer; FBX auto-converts to GLB (cached in .glbcache/); HUD reads tris / height / rig state (bones + clips); first clip auto-plays.
  • Body ops: scale-to-height (bases arrive 1.0m tall — normalize to ~1.72m); decimate-keep-weights (the SAFE local path for rigged meshes — never farm /finish).
  • Rigid attach (tier 1): hats/bags/shoes → pick a bone, slide offsets, preview live. Bake permanently via the fleet /rig endpoint (m1ultra :8011) when happy.
  • Deforming FIT (tier 2): weight-transfers the rigged body's skinning onto a garment mesh (Blender data_transfer, nearest-face interpolated, optional inflate-mm of air), parents it to the armature. FIT → wardrobe item = garment+skeleton GLB (reusable); fit → dressed glb = body+garment in one.
  • Assemble: body + ticked fitted garments → one dressed GLB in out/ — drop straight into thriftgod / djsim / procity, or publish to 3GOD.

Generating NEW clothing (the pipeline, $0 on MODELBEAST)

  1. flux (flux_local, Klein) — product-shot prompt template: garment laid flat, white bg
  2. cutout (bg_remove_local) — the biggest quality lever before 3D
  3. then ONE of:
    • → rigid 3D (trellis_mac, ~5 min): hats, shoes, bags, glasses — bone-parent these. NOT for floppy cloth: reconstruction eats thin geometry (fleet traps ledger).
    • → hanging texture: flat garment PNG for rack planes (djsim fittings.js garment({image})) and the paper-doll wardrobe. Flat clothes love this route.
    • deforming wearables: model/retopo against the base body (or socket-cut a clothed torso, character_kit_modular style), then FIT. Never raw-gen these.

House rules

  • Bases (anatomical models) stay in the library. Only dressed outfits ship into games.
  • FIT requires a rigged body. Unrigged base → rig first (MIRPAMO on ultra, or Mixamo).
  • One skeleton (mixamorig) across the fleet: any garment fitted on one body fits every body on that skeleton, and every clip in the bank drives it.