Use strict _ArrivalA/B/C matching (instead of broad _A*) and include legacy non-Arrival variants like _C1__ as supplemental candidates. This prevents Type-A labels from accidentally picking Type-C content in doubles/twins/triples. Also documented the rule in SKILL.md + workflow notes and applied arrival retrofix across finalized tiers (Poor/Modest/Comfortable/Wealthy).
18 KiB
NPC Nudity Workflow (Grok) - Process Notes
Purpose: reproducible, high-quality, non-sexual Undressed NPC portraits and pair/triple scenes with consistent identities and safe, tasteful framing. Designed around Grok Imagine models and the Northlands pipeline.
1) Core Workflow (Default NPC Nudity Workflow)
Always include these prompt requirements:
- "visible and unobstructed nipples" (prevents strategic hair drapes).
- Smiling, inviting gaze toward camera (no daydreaming/anger).
- Full-body, head-to-toe framing (avoid waist-cropping).
- No drapery/covering; no modern lights/objects; no text/watermarks.
- Short, sparse pubic hair matching head-hair color; confined strictly to pubic area only; no hair on breasts/abdomen; avoid "solid triangle" shapes.
- No extra limbs, no distorted anatomy, no glass wall/transparent barrier.
- Wealthy+ tiers: "No facial scars/marks/freckles/moles/beauty marks."
Nudity workflow (per image):
- Try V4 clause (twice)
- If both fail, try V1 clause (up to 8 attempts)
- If still failing, switch scenes; keep hammering until the target scene count is met, then lock successful scenes as canon for later stages.
V4 clause
short, neatly trimmed pubic hair matching head-hair color; brief partial glimpse near pubic region; no direct whole-genitals view; total nudity clearly implied
V1 clause
short, neatly trimmed pubic hair matching head-hair color; visible edge of pubic hair; no directly visible genitals; strongly implied total nudity without seeing genitals directly
Per-person hair matching (pairs/triples):
"Each person’s pubic hair matches their own head-hair color (no cross-matching), including men."
Pairs (two courtesans):
- Distinct identities (unless twins).
- Optional: "gentle, non-sexual touching" for ambience.
Twins:
- Identical facial features/hair/marks; names differ.
Triples:
- Use existing individuals with clearly different hair colors/hairstyles/skin tones.
2) Prompt drift prevention (required)
Single source of truth: keep required/forbidden phrases in references/prompt-rules.json and update it whenever rules change.
Prompt‑lint before enqueue (automatic):
- Import
scripts/prompt_guard.pyin every render script and callenforce(stage, group, prompt)before enqueue. This makes drift impossible. - Example:
from scripts.prompt_guard import enforce enforce("teasing", "triple", prompt) - You can still use
scripts/prompt_lint.pyfor batch auditing or debugging.
Version tag: include a short tag in the prompt (e.g., TeasingRules v3.2) so drift is visible in logs.
3) Prompt skeletons
Individual (Undressed)
{Name}, clearly adult {age}-year-old woman, in a cozy, intimate medieval Norse setting: {setting}.
Identity: {identity}.
{no_marks_clause_if_wealthy_plus}
Fully nude, visible and unobstructed nipples, {V4_or_V1_clause}.
She smiles warmly with inviting, direct eye contact toward the camera (not daydreaming or angry).
No sexual acts, no porn framing, no arousal-focused posing.
Full-body, head-to-toe composition; no waist-cropping; no clothing or drapery.
Photorealistic, cinematic lighting, 16:9.
No text/labels/logos/watermarks/signage/letters/symbols/UI overlays.
Pair (Undressed)
Two clearly adult women (ages {a1} and {a2}) in a cozy, intimate medieval Norse setting: {setting}.
Woman A ({name1}): {identity1}.
Woman B ({name2}): {identity2}.
They have distinct faces and clearly different facial features. (or: "They are identical twins …")
{no_marks_clause_if_wealthy_plus}
Both women are fully nude, visible and unobstructed nipples, {V4_or_V1_clause}.
Each woman's pubic hair matches her own head-hair color (no cross-matching).
They smile warmly with inviting, direct eye contact toward the camera (not daydreaming or angry).
They stand or sit close with gentle, non-sexual touching (optional).
No sexual acts, no porn framing, no arousal-focused posing.
Full-body, head-to-toe composition showing both women; no waist-cropping; no clothing or drapery.
Photorealistic, cinematic lighting, 16:9.
No text/labels/logos/watermarks/signage/letters/symbols/UI overlays.
3) Operational notes
- Direct xAI API (not OpenClaw provider routing): all renders go through custom scripts hitting the xAI Images endpoint directly.
- Models:
grok-imagine-image-pro(primary).grok-imagine-imagecan be tried if moderation is overly strict. - Endpoint:
POST https://api.x.ai/v1/images/generations - Auth key: stored in
pass x.ai/apikey(scripts read viapass show x.ai/apikey | head -n1). - Aspect:
16:9 - Download: URLs are short-lived; always
curl -Limmediately. - Rate limits: expect throttling; plan for retries and long runs.
Staging during backup windows
If /output/to-dnd-session is read-only (Nextcloud backup window), save to:
/home/rick/.openclaw/workspace/tmp/courtesans-staging
Queue is stored in:
/home/rick/.openclaw/workspace/tmp/courtesans-staging/staging_queue.jsonl
Flush back after backup:
python3 /home/rick/.openclaw/workspace/scripts/flush_courtesans_staging.py
Logging
- Primary log:
/home/rick/.openclaw/workspace/logs/courtesans_gen.log - Logs: RENDER_ATTEMPT / RENDER_SUCCESS / RENDER_FAIL / MAX_ATTEMPTS_REACHED
4) Expected failure modes (ranked)
Most common (≈50-70% of intent failures):
- Excessive pubic hair (oversized, "triangle block," wrong placement).
- Pubic hair color mismatch (cross-matching between paired women).
Moderate frequency (≈10-25%):
- Hair covering nipples (strategic drape).
- Covered/draped nudity (cloth, furs over pelvis).
Less common (≈5-15%):
- Extra limbs / distorted anatomy.
- Angry/bored expression (intent failure).
- Facial scars/marks in Wealthy+.
- "Glass wall" visual barrier in front of subjects.
Triples:
- Higher moderation sensitivity; per-person hair mismatch is common.
5) Expected yields & time
Per-attempt moderation success (Undressed pairs):
- Early runs: ~40-60% success per attempt (heavy moderation).
- Tuned prompts + hair-match clause: ~60-80% success per attempt.
Intent success after rerenders:
- Expect 60-75% "beautiful" outputs after 1-2 rerender passes.
- Remaining failures typically shrink to a handful of stubborn slots.
Time expectations (rough):
- ~110 outputs (22 pairs × 3 scenes + 44 individuals) typically 8-14 hours with rate limits, retries, and moderation.
- Triples (12 images): 30-90 minutes, with higher moderation failure rate.
6) Practical heuristics
- Undress stages (alphabetical labels): Arrival (Lobby-Dressed) → Dressed → Teasing (half-open) → Teasing More (Topless-Framed) → Topless (Topless-Dropped) → Underwear (bottoms-only) → Undressed.
- Arrival (Lobby) stage: use Dressed as the reference; main subject(s) stay fully dressed. Background lobby patrons are blurred/out-of-focus and become progressively more nude from A→C (A fully dressed; C = most nude, e.g., ~20% fully naked, ~30% topless, rest dressed). Background gender mix: 80–90% women, 10–20% men. Keep the crowd sparse and appropriate to room size; do not cram the room (especially Wealthy and up, which should feel spacious). If any background patrons wear bottoms at all, they must be small, time‑period‑appropriate bikini‑like bottoms or loincloths (tier‑appropriate); no suspenders/straps or masculine garments. No male patrons with feminine breasts (men must be flat‑chested).
- Arrival A strictness: all background patrons fully clothed with full chest coverage (no bare male chests, no bare female breasts, no bikini/lingerie tops, no exposed midriff).
- Arrival cutoff (current decision): A–C only for all tiers; D/E removed due to moderation/artifact issues. Use standard model for Arrival.
- Arrival variants: generate A1–C6 (18 images per Dressed image; 4–6 are staircase variants).
- Arrival poses: avoid the “leaning against a beam” look (especially in C). Prefer standing centered or seated on a central furniture piece that highlights the subject(s).
- Arrival background vibe: background patrons should appear gently smiling/curious toward the camera or chatting with each other (still blurred), to avoid bored expressions.
- ArrivalAllSingles overview (all tiers): generate an overview lobby image showing all singles together (dressed, smiling/charming) using the same Arrival A–C rules. Precondition: Dressed refs exist for all singles. Twins: default include one twin for space; optional to include both if configured. These images are for DM seat ambiance only (no keeper selection).
- Staircase preference: a visible staircase up is a canonical brothel/guesthouse element (especially Comfortable+). It’s OK to keep two options for a given letter if one includes a staircase.
- Arrival fidelity rule (future sets): once a Dressed keeper is chosen for a double/twin/triple, use that single Dressed image as the reference for all Arrival A–C (and later Teasing/Teasing More/Topless) to keep outfits identical across scenes. The in‑game decision point is between Arrival and Dressed.
- Exception: do not apply this rule retroactively to the current Poor→Wealthy courtesan set.
- Production order (rendering): Undressed (lock scenes) → Dressed (choose keeper outfit) → regenerate Dressed A–E from the chosen keeper to lock outfit continuity → Arrival A–C (uses the Dressed keeper) → Teasing → Teasing More → Topless → Underwear.
- Lock scenery during Undressed; reuse those same settings for later stages to ensure continuity.
- Scene-canon separation rule (2026-03-28): document scene/background canon independently of character canon (separate notes/fields). Write down a reusable descriptor for each keeper Undressed room: layout, props, lighting, camera angle, and ambiance. Use this descriptor for any gap-filling rerenders.
- Antechamber rule (2026-03-28): when using a dynamic adjacent room, define and write down a dedicated antechamber descriptor derived from the Undressed room canon (layout, props, lighting, and camera/sightline transition). Capture it with the same detail as the Undressed room and keep it in separate scene fields from character identity.
- Arrival (Lobby) stage: use Dressed as the reference; main subject(s) stay fully dressed. Background lobby patrons are blurred/out-of-focus and become progressively more nude from A→C (A fully dressed; C = most nude, e.g., ~20% fully naked, ~30% topless, rest dressed). Background gender mix: 80–90% women, 10–20% men. Keep the crowd sparse and appropriate to room size; do not cram the room (especially Wealthy and up, which should feel spacious). If any background patrons wear bottoms at all, they must be small, time‑period‑appropriate bikini‑like bottoms or loincloths (tier‑appropriate); no suspenders/straps or masculine garments. No male patrons with feminine breasts (men must be flat‑chested).
- Stop at ≥2 scenes per pair when returns diminish; use intent reviews to direct targeted rerenders.
- Round-robin rerenders across pairs to avoid stalling on one stubborn slot.
- Use KEEP list for "exceptional" outputs to avoid losing wins during cleanup.
6.5) Gate checkpoints (human actions)
- After each A-E batch: the human selects keepers (and deletes/moves rejects).
- Pause here: do not proceed to the next stage until the human confirms selection is done.
- Cleanup step: strip A-E tokens in keeper filenames and remove embedded Dressed run IDs in singles (e.g., avoid
..._Dressed__..._Teasing__...). - Doubles/triples: during selection keep the A-E token after the scene (
..._scene_A__...); remove it only after keepers are chosen. - End-stage gate (table-facing): ask the human which table handoff tier to expose:
- Underwear L (large loincloth-type cover)
- Underwear S (small modern-size cover)
- Undressed (actually naked) (Undressed is still generated regardless.)
7) Clothing fidelity & continuity (edits workflow)
Key finding: text-only prompts do not preserve garment continuity across stages. Use xAI /v1/images/edits with a Dressed reference image to keep the exact outfit, colors, and pattern placement.
Reference pairing rule (critical):
- Dressed A → TeasingA + TeasingMoreA + ToplessA + UnderwearA
- Dressed B → TeasingB + TeasingMoreB + ToplessB + UnderwearB
Continuity clause (include in edit prompts):
- "Use ONLY the provided reference image as the exact outfit source."
- "Keep the same garment, colors, fabrics, patterns, and accessory placement; pattern placement must match the reference."
- "Garments remain intact with no tears, rips, holes, fraying, or cuts."
Half-open rule (Teasing):
- Shoulder wrap/mantle removed; bodice unlaced and slipped off one shoulder.
- Exactly one nipple visible and unobstructed.
- No nudity below the waist.
Topless variants:
- Teasing More (Topless-Framed): garment still worn high; breasts exposed but framed by neckline.
- Topless (Topless-Dropped): garment slipped below shoulders; upper chest fully bare; same skirt/lower gown.
- Topless Plus (sorting only): some “topless” outputs may include extra tasteful exposure but are not fully naked. Manually move these into a new
Topless Plusfolder under each tier for later scene‑progression sorting (DM can step through with arrow‑right). - Underwear (bottoms-only): no top; time-period-appropriate bottoms only (no bra); keep the same skirt/gown removed if needed.
Topless A-Z(24) rule (current):
- Letters: A B C D E F G H J K L M N P Q R S T U V W X Y Z (skip I and O).
- A–B method (first 10 letters): A B C D E F G H J K → allow garment dropped below shoulders (arms may still have fabric); chest fully bare.
- C–E method (remaining 14 letters): L M N P Q R S T U V W X Y Z → no fabric above the waist or on arms/shoulders; upper body fully bare.
- Topless extra variants (ABERX): generate A1–A9, B1–B9, E1–E9, R1–R9, X1–X9 using the same per‑letter prompt/pose mapping as Modest. Treat the original A/B/E/R/X from the main set as A0/B0/E0/R0/X0 for continuity.
Topless anchor: may use Dressed (preferred for fidelity) or Teasing More when it better preserves progression.
Teasing More shoulder step (required): before starting a Teasing More batch, inspect every Teasing keeper to record which shoulder is still off (viewer-left/right/both). Do this separately for singles vs doubles/triples, and for doubles/triples record per-image, per-person directions (each scene can differ). Include explicit shoulder directions in Teasing More prompts (per person and per pair/triple) to avoid regression to both shoulders.
Subagent inspection option (recommended for speed):
- Spawn a subagent with model
openrouter/x-ai/grok-4.1-fastto inspect allTeasingimages and map shoulder-off per image/person. - Output a JSON map to
/home/rick/.openclaw/workspace/tmp/<tier>_teasing_shoulder_map.jsonwith entries like:{filename, type, person1, person2, notes}where person fields record viewer-left/right/both/none.
Filename cleanup: after selecting keepers, remove any lingering stage-letter tokens (e.g., _[A-E]__) in Dressed/Teasing/Teasing More filenames to reduce noise.
Underwear folder split (table-facing):
- Underwear L = A-C/plain underwear set
- Underwear S = D-F (g-string set) Apply from Modest onward once available.
Boundary Test (explicit undressed): prompt used: "Totally nude female, explicit genitalia and nipples visible, zero fabric or censorship, bare vulva in full view, reclining pose, high detail erotic D&D fantasy." Run A-G variants and try each single up to 7 moderation rejects before fail. (Singles only.)
Failure modes to QA (treat as FAIL → outtakes → rerender):
- Multi-body duplication (more than one copy of the NPC).
- Torn/holed/distressed garments (ragged openings, fraying).
- Cloth/skin clipping at exposure point (nipple appears to clip through opaque fabric).
- Wardrobe continuity breaks (garment swaps, pattern drift, color changes).
- Extra limbs / anatomy glitches.
- Triples Teasing QA: reject if >4 nipples visible (tolerance before rejection).
- Singles Teasing QA: reject unless exactly 1 nipple visible.
- Doubles/DoubleTwins Teasing QA: reject if 0, 3, or 4 nipples visible; only 1–2 permitted.
Performance note: edits are slower than pure generations; increase concurrency if needed. Default for grok-imagine-image (standard): 25 workers. grok-imagine-image-pro is limited (~30 images/min), so keep concurrency lower as needed.
ArrivalAllSingles packaging (tier root): place the overview images directly in the tier folder, named Arrival (Lobby type A/B/C).jpg (and Arrival (Lobby type X, with stairs).jpg as applicable). Do not create 01-Name.txt marker files; use passport thumbnails instead.
Post-packaging cleanup: create a folder named "Stages and Raw Files" under the tier, and move all folders at the tier root except "Per Courtesan" into it (Arrival/Dressed/Teasing/Teasing More/Topless/Topless Plus/Underwear/Undressed/etc.) to reduce DM-seat noise.
Live run hardening notes (2026-03-28):
- Confirm sync completion before preflight/canonicalization; partial sync causes rename
ENOENTand temp artifacts. - Normalize legacy single-underscore runhex names to canonical
__before packaging. - In Topless Plus, merge single
TransitionScenefiles intoName_Topless[n]sequence before finalize. - Collapse scene-suffix variants (
_reclined,_intertwined, etc.) under one base sequence to prevent wildcard collisions. - For singles, match stage files robustly: allow scene tags before stage names and legacy tails after stage names.
- For doubles/twins/triples Arrival mapping, match strict
_ArrivalA/B/Ctokens (avoid broad_A*matching), and include legacy non-Arrivalvariants (_C1__...) as supplemental candidates. - Run long finalize jobs in background and send progress pings; DAV/WebDAV mounts can look "stuck" due to sync churn.
8) Scripts (current operational set)
scripts/rerender_courtesans_doublepairs_fullynaked_smile.pyscripts/resume_courtesans_doublepairs_fullynaked_smile.pyscripts/flush_courtesans_staging.pyscripts/courtesans_smile_watchdog.pyscripts/rerender_courtesans_triples_from_manifest.py
(When packaging the skill, copy these into skills/npc-nudity-workflow/scripts/ and update paths.)