rig-parts 1.82.0 → 1.82.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli.ts CHANGED
@@ -794,9 +794,9 @@ usage:
794
794
  outside the painting, by name.
795
795
 
796
796
  rig-parts comfy seethrough --image <png> --out <dir> [--host <url>]
797
- [--resolution 1024] [--steps 30] [--seed 42] [--offload] [--lama] [--nf4]
797
+ [--resolution 1024] [--steps 30] [--seed 42] [--offload | --no-offload] [--lama] [--nf4]
798
798
  [--prefix spine_parts] [--wait 1800] [--timeout 3600] [--poll 3]
799
- [--config <config.json> --depth-run <full|head>]
799
+ [--config <config.json>] [--depth-run <full|head>]
800
800
  Optional. Run See-through on a ComfyUI box with the jtydhr88/ComfyUI-See-through
801
801
  wrapper installed, and write the wrapper form \`layers\` reads into <out>
802
802
  (absent or empty): layers.json, parts/<tag>.png, meta.json, previews/.
@@ -805,9 +805,14 @@ usage:
805
805
  queue (at most --wait s), polls /history (at most --timeout s), and
806
806
  writes <out> only after the layer reader accepts what came back.
807
807
  --lama turns the wrapper's LaMa inpainting on and --nf4 its nf4
808
- quantisation; both are off unless given, as --offload is.
809
- Depth hints are inactive by default. --config reads its optional depth
810
- block; with that block --depth-run explicitly selects full or head.
808
+ quantisation; both are off unless given. Resolution, steps, seed and offload
809
+ use explicit flags first, then --config's seethrough block, then defaults
810
+ 1024, 30, 42 and false. The resolved resolution must be an integer of at
811
+ least 64, including config values. --no-offload overrides a config's true; it cannot
812
+ be combined with --offload. Each value prints its source. No config is
813
+ discovered automatically: give --config <config.json> to use its settings.
814
+ Depth hints are inactive by default. --config also reads its optional
815
+ depth block; with that block --depth-run explicitly selects full or head.
811
816
  Active declared sheets are fetched and validated, never inferred.
812
817
 
813
818
  rig-parts comfy paint --config <config.json> --out <dir> [--host <url>]
@@ -1077,7 +1082,7 @@ const TAKES = {
1077
1082
  check: { valued: ['--rig', '--out', '--parts', '--source', '--page-edges', '--pack-shape', '--requirements', '--set', '--environment', '--wind-band'], switches: ['--seam-pairs', '--keep-stills', '--all-sets', '--no-extremes'] },
1078
1083
  loop: { valued: ['--frames', '--out'], switches: ['--palette'] },
1079
1084
  assemble: { valued: ['--source', '--full', '--head', '--config', '--out', '--seam', '--project', '--alt', '--write-config'], switches: ['--propose-plan'] },
1080
- 'comfy seethrough': { valued: ['--image', '--out', '--resolution', '--steps', '--seed', '--prefix', '--host', '--wait', '--timeout', '--poll', '--config', '--depth-run'], switches: ['--offload', '--lama', '--nf4'] },
1085
+ 'comfy seethrough': { valued: ['--image', '--out', '--resolution', '--steps', '--seed', '--prefix', '--host', '--wait', '--timeout', '--poll', '--config', '--depth-run'], switches: ['--offload', '--no-offload', '--lama', '--nf4'] },
1081
1086
  'comfy paint': { valued: ['--config', '--out', '--seeds', '--seed0', '--host', '--wait', '--timeout', '--poll'], switches: [] },
1082
1087
  inputs: { valued: ['--source', '--config', '--out'], switches: [] },
1083
1088
  build: { valued: ['--config', '--source', '--full', '--head', '--out', '--seam', '--project', '--page-edges', '--pack-shape', '--requirements', '--idle-keys', '--lead-in', '--alt', '--set', '--environment', '--wind-band'], switches: ['--loop', '--seam-pairs', '--keep-stills', '--all-sets', '--no-extremes'] },
@@ -1768,12 +1773,11 @@ function comfyFlags(args: string[], command: 'comfy seethrough' | 'comfy paint')
1768
1773
  return { v, on };
1769
1774
  }
1770
1775
 
1771
- /** An integer flag at or above `min`, or its stated default; a string is a usage error. */
1772
- function intFlag(v: Map<string, string>, flag: string, fallback: number, min: number): number | string {
1776
+ /** The resolved flag or fallback must be an integer at or above `min`; a string is a usage error. */
1777
+ function intFlag(v: Map<string, string>, flag: string, fallback: number, min: number, fallbackSource = flag): number | string {
1773
1778
  const raw = v.get(flag);
1774
- if (raw === undefined) return fallback;
1775
- const n = Number(raw);
1776
- return Number.isInteger(n) && n >= min ? n : `${flag} ${raw} is not an integer of at least ${min}`;
1779
+ const n = raw === undefined ? fallback : Number(raw);
1780
+ return Number.isInteger(n) && n >= min ? n : `${raw === undefined ? fallbackSource : flag} ${raw ?? fallback} is not an integer of at least ${min}`;
1777
1781
  }
1778
1782
 
1779
1783
  /** A seconds flag above 0, or its stated default. */
@@ -1790,6 +1794,7 @@ async function cmdComfy(args: string[]): Promise<number> {
1790
1794
  const f = comfyFlags(rest, `comfy ${sub}`);
1791
1795
  if (typeof f === 'string') return usage(f);
1792
1796
  const { v, on } = f;
1797
+ if (on.has('--offload') && on.has('--no-offload')) return usage('--offload and --no-offload cannot be combined');
1793
1798
  const wait = secondsFlag(v, '--wait', 1800);
1794
1799
  const timeout = secondsFlag(v, '--timeout', 3600);
1795
1800
  const poll = secondsFlag(v, '--poll', 3);
@@ -1803,7 +1808,8 @@ async function cmdComfy(args: string[]): Promise<number> {
1803
1808
  // config comfy paint cannot paint from is refused with no box named.
1804
1809
  const paint = sub === 'paint' ? loadPaintConfig(configPath as string) : null;
1805
1810
  const cfg = paint === null ? null : paint.config;
1806
- const depthConfig = sub === 'seethrough' && configPath !== undefined ? loadEarlyConfig(configPath, 'layers').depth : undefined;
1811
+ const early = sub === 'seethrough' && configPath !== undefined ? loadEarlyConfig(configPath, 'layers') : undefined;
1812
+ const depthConfig = early?.depth;
1807
1813
  const depthRun = v.get('--depth-run');
1808
1814
  if (sub === 'seethrough' && depthConfig !== undefined && depthRun !== 'full' && depthRun !== 'head') return usage('active config.depth requires --depth-run <full|head>; the source run is not inferred');
1809
1815
  if (sub === 'seethrough' && depthConfig === undefined && depthRun !== undefined) return usage('--depth-run requires --config with an explicit depth block');
@@ -1812,9 +1818,9 @@ async function cmdComfy(args: string[]): Promise<number> {
1812
1818
  if (sub === 'seethrough') {
1813
1819
  const image = v.get('--image');
1814
1820
  if (image === undefined) return usage('comfy seethrough needs --image <png>');
1815
- const resolution = intFlag(v, '--resolution', 1024, 64);
1816
- const steps = intFlag(v, '--steps', 30, 1);
1817
- const seed = intFlag(v, '--seed', 42, 0);
1821
+ const resolution = intFlag(v, '--resolution', early?.seethrough.resolution ?? 1024, 64, 'config.seethrough.resolution');
1822
+ const steps = intFlag(v, '--steps', early?.seethrough.steps ?? 30, 1);
1823
+ const seed = intFlag(v, '--seed', early?.seethrough.seed ?? 42, 0);
1818
1824
  for (const x of [resolution, steps, seed]) if (typeof x === 'string') return usage(x);
1819
1825
  const prefix = v.get('--prefix') ?? 'spine_parts';
1820
1826
  if (!/^[A-Za-z0-9_-]+$/.test(prefix)) return usage(`--prefix ${prefix} is not letters, digits, "_" and "-"`);
@@ -1825,7 +1831,7 @@ async function cmdComfy(args: string[]): Promise<number> {
1825
1831
  resolution: resolution as number,
1826
1832
  steps: steps as number,
1827
1833
  seed: seed as number,
1828
- offload: on.has('--offload'),
1834
+ offload: on.has('--offload') ? true : on.has('--no-offload') ? false : (early?.seethrough.offload ?? false),
1829
1835
  lama: on.has('--lama'),
1830
1836
  quant: on.has('--nf4') ? ('nf4' as const) : ('none' as const),
1831
1837
  wait: wait as number,
@@ -1833,7 +1839,10 @@ async function cmdComfy(args: string[]): Promise<number> {
1833
1839
  ...(depthConfig === undefined ? {} : { depth: { config: depthConfig, run: depthRun as 'full' | 'head', base: dirname(resolve(configPath as string)) } }),
1834
1840
  };
1835
1841
  console.log(`rig-parts comfy seethrough: ${image} -> ${out}`);
1836
- console.log(` resolution ${run.resolution}, steps ${run.steps}, seed ${run.seed}, offload ${run.offload}, lama ${run.lama}, quant ${run.quant}; wait <= ${run.wait} s, timeout ${run.timeout} s`);
1842
+ const source = (key: 'resolution' | 'steps' | 'seed' | 'offload'): string =>
1843
+ v.has(`--${key}`) || (key === 'offload' && (on.has('--offload') || on.has('--no-offload'))) ? 'cli' : early === undefined ? 'default' : `config.seethrough.${key}`;
1844
+ console.log(` resolution ${run.resolution} (source=${source('resolution')}), steps ${run.steps} (source=${source('steps')}), seed ${run.seed} (source=${source('seed')}), offload ${run.offload} (source=${source('offload')}); lama ${run.lama}, quant ${run.quant}; wait <= ${run.wait} s, timeout ${run.timeout} s`);
1845
+ if (early === undefined) console.log(' no config loaded; give --config <config.json> to use config.seethrough settings; explicit CLI flags override them');
1837
1846
  const r = await runSeeThrough(client, run, (l) => console.log(l));
1838
1847
  console.log(` ${r.layers.length} layer(s) on a ${r.canvas[0]}x${r.canvas[1]} canvas, read back green by the layer reader: ${r.layers.join(', ')}`);
1839
1848
  console.log(` wrote ${join(out, 'layers.json')}, meta.json, parts/ (${r.layers.length} PNG) and previews/ (${r.previews.length} PNG); GPU job ended`);
package/docs/AUTHORING.md CHANGED
@@ -121,7 +121,7 @@ read by no CPU stage).
121
121
  | `generation.*` | the optional `comfy` adapter only; no CPU stage | recorded: checkpoint, LoRAs, sampler, prompt parts, `latent`, `seed`, `control` |
122
122
  | `generation.control.skeleton` | `comfy paint` — the OpenPose control image, drawn at `latent` | **authored**: a built-in standing pose, `"stand_sides"` or `"stand_clasp"`, or (issue #198) any other string, read as a path relative to the config file's directory to a pose file `{"width": W, "height": H, "points": {"nose": [x, y], "neck": [x, y], …}}` — `width` x `height` is the canvas and must be `generation.latent` (the points are not scaled; `CONFIG_POSE_CANVAS`), and `points` holds the 18 body-18 keypoints of `src/skeleton.ts` by name (`nose`, `neck`, `r_shoulder`, `r_elbow`, `r_wrist`, `l_shoulder`, `l_elbow`, `l_wrist`, `r_hip`, `r_knee`, `r_ankle`, `l_hip`, `l_knee`, `l_ankle`, `r_eye`, `l_eye`, `r_ear`, `l_ear`; `r`/`l` the subject's sides), each `[x, y]` in canvas px, x right, y down, `0 <= x <= W`, `0 <= y <= H`. The image is drawn from the file exactly as from a built-in (same renderer, same size), written as `control_pose-<first 12 hex of its sha256>.png`. A pose file carries no words, so `generation.pose` is required beside it (`CONFIG_FIELD_PRESENT`). The file is read wherever the config is read from a path, every problem at once: no such file — a misspelt built-in lands here too — or one that cannot be read (`CONFIG_FILE_PRESENT`), not JSON (`CONFIG_IS_JSON`), not an object, a size that is not a whole positive px count, a point that is not two numbers (`CONFIG_FIELD_TYPE`), a key besides the three (`CONFIG_KEY_KNOWN`) or written twice (`CONFIG_KEY_UNIQUE`), `points` holding other than the 18 names (`CONFIG_POSE_KEYPOINTS`, with the count found and required), a point off the canvas (`CONFIG_POSE_IN_CANVAS`, naming the point and the canvas size) |
123
123
  | `seethrough.resolution` | assemble — each run's canvas must be `resolution` square (`ASSEMBLE_RUN_CANVAS`); with one run (no `--head`, issue #366) the file may be smaller on either side, and is padded to the `resolution` square, centred | recorded from the See-through runs; 1024 in both examples. With one run it is the square the file is read on: at least the file's longer side (`ASSEMBLE_RUN_CANVAS` otherwise), and nothing a part records depends on how much larger |
124
- | `seethrough.steps`, `.seed`, `.offload` | no CPU stage | recorded from the runs |
124
+ | `seethrough.steps`, `.seed`, `.offload` | `comfy seethrough --config` | run inputs when `--config <config.json>` is given; explicit CLI flags override them, including `--no-offload` for false |
125
125
  | `seethrough.head_box` | inputs (cuts the head image there; optional at the first call); assemble — where the head run sits on the painting | **proposed** by `propose --head-box` from the full run, square, source pixels, shifted inside the painting when needed; the head run must then be fed exactly that crop. With one run (no `--head`, issue #359: an artist's own file, §4 *For artists*) it is left out — there is no crop to place — and a config that sets it is refused (`ASSEMBLE_SINGLE_RUN_HEAD_BOX`) |
126
126
  | `seethrough.arm_split` | assemble, `assemble --propose-plan` — separates a single full-run `handwear-r` or `handwear-l` layer that holds both overlapping arms into both arm tags | **authored**, optional (issue #439): `{x?: number, line?: [[x, y], …], order: ["handwear-r", "handwear-l"] \| ["handwear-l", "handwear-r"]}` in `seethrough.resolution` full-run pixels. Exactly one of `x` (image column, `0 <= x <= resolution`) or `line` (a polyline of two or more `[x, y]` points in `[0, resolution]`, interpolated in x along y and clamped above/below its endpoints) is required (`CONFIG_FIELD_PRESENT`, `CONFIG_FIELD_TYPE`), and `order` is `[back_tag, front_tag]`, the draw order of the two separated arm layers (`CONFIG_FIELD_PRESENT`, `CONFIG_FIELD_TYPE`). Pixels at `< splitX(y)` go to `handwear-r` (image left, the subject's right arm) and pixels at `>= splitX(y)` go to `handwear-l` (image right, the subject's left arm). A split line that cuts a horizontal opaque run of the arm layer into more than two segments is refused (`ASSEMBLE_ARM_SPLIT_CUTS_ARM`). Without the declaration, when one arm layer's 8-connected component reaches both wrists under `propose --keypoints`, `propose` emits an `overlapping-arms` `LINT` naming the part, both wrists and `seethrough.arm_split`; absent, no byte of any output moves |
127
127
  | `assemble.rig_scale` | assemble — the rig is `trunc(w × rig_scale)` x `trunc(h × rig_scale)`, and every rig-px value after it (`bones`, `meshes`, `motion`, `patches`, `cuts`) is in that rig's pixels; `check --source` (`CHECK_SOURCE_SIZE`) and `compose` (`SCENE_RIG_SCALE_AGREES`) read it back off `parts.json` | authored; rig pixels per source pixel. 0.5 in both examples (a 1664x2432 painting makes an 832x1216 rig). **Keep the figure about 1,100 to 1,200 rig px tall** — the `H` of `propose`'s `mesh spacing:` note, the height of the parts' boxes together — so for another painting, about 1,150 over the figure's height in painting px: that is the size the proposer's spacing divisor was calibrated at (H 1106–1185, the `mesh spacing` note says so) and the size of the two examples `check`'s bars are derived from, and the proposer and `check` also hold fixed rig-px values that do not scale with it (the fringe's 10 px step, the trunk segments' 18, 20, 30 and 100 px, the 15 px wrist tolerance, the 10-row pendant floor, the seam bar's 50 rig px over 40). What else it trades, measured on `demo` with the README loop from a fresh config at 0.25, 0.5 and 1 (issue #345, rig-c 2.47.1): the same plan and the same ten chains; every bar but the one the uncorrected `demo` always fails (`bottomwear` `TIP_OVER_ROOT`, the README loop's `RL01`) passing at all three; the atlas page 418x606, 832x1205 and 1825x2047; the figure's mesh spacing 16, 32 and 64, so 830, 868 and 932 triangles; the breath 2.5 % of a torso that scales with it; and the proposed bones, scaled to 0.5, off the 0.5 proposal's by up to 38 px at 0.25 and 22.5 px at 1 (the hairpin's origin; the skirt roots 20 and 10.5) — the fixed-px values above. `propose` records it on the proposal as `proposed_rig_scale` (issue #354), and changing `assemble.rig_scale` after the rig sections are written is refused (`CONFIG_PROPOSED_RIG_SCALE`): without that refusal `demo`'s tracked config built at 0.25 gated green and `check` failed only `TIP_OVER_ROOT` on both sleeves (`propose --from-config` named 54 `LINT` lines, links off the art) — re-run `assemble` and `propose` at the new scale. Absent: `CONFIG_FIELD_PRESENT`; 0, negative or not a number: `CONFIG_FIELD_TYPE`; a rig under 1x1: `ASSEMBLE_RIG_SIZE` |
@@ -4323,6 +4323,18 @@ says why each requirement exists and what breaks without it.
4323
4323
 
4324
4324
  ### The optional ComfyUI adapter (`comfy paint`, `comfy seethrough`)
4325
4325
 
4326
+ `rig-parts comfy seethrough --image <png> --out <dir> --host <url> --config <config.json>`
4327
+ reads `seethrough.resolution`, `.steps`, `.seed` and `.offload` through the early
4328
+ layers config loader. Explicit `--resolution`, `--steps`, `--seed` and
4329
+ `--offload` / `--no-offload` win over config values; the two offload switches
4330
+ cannot be combined. The resolved resolution must be an integer of at least 64,
4331
+ including config values; `--resolution 64` overrides a smaller configured
4332
+ resolution for this run. Without `--config`, the defaults are resolution 1024,
4333
+ steps 30, seed 42 and offload false. No config is discovered automatically,
4334
+ even beside the command. The command prints every resolved value's source and,
4335
+ when no config is loaded, names `--config <config.json>` as the route to use
4336
+ those settings. Changing a config seed alone cannot change a no-config run.
4337
+
4326
4338
  | rule | means | change |
4327
4339
  | --- | --- | --- |
4328
4340
  | <a id="COMFY_HOST_GIVEN"></a><a id="COMFY_REACHABLE"></a><a id="COMFY_REQUEST_OK"></a>`COMFY_HOST_GIVEN`, `COMFY_REACHABLE`, `COMFY_REQUEST_OK` | no `--host`/`COMFY_HOST`, nothing answering there, or a non-200 answer | the host, or the box |
@@ -4346,8 +4358,8 @@ says why each requirement exists and what breaks without it.
4346
4358
  | <a id="ASSEMBLE_SINGLE_RUN_PLAN"></a>`ASSEMBLE_SINGLE_RUN_PLAN` | with no `--head`, a plan row takes `"head"`, or an `extend_below_crop` entry continues a part below a crop there is not | `"full"` in the row; remove the entry |
4347
4359
  | <a id="ASSEMBLE_SINGLE_RUN_HEAD_BOX"></a>`ASSEMBLE_SINGLE_RUN_HEAD_BOX` | with no `--head`, the config sets `seethrough.head_box`, which places a head run there is not | remove `head_box`, or give the head run with `--head` |
4348
4360
  | <a id="ASSEMBLE_ARM_SPLIT_CUTS_ARM"></a>`ASSEMBLE_ARM_SPLIT_CUTS_ARM` | `seethrough.arm_split` cuts a horizontal opaque run of the arm layer into more than two segments (issue #439; the detail gives the row, the run and the split x) | `seethrough.arm_split`: move `x` or `line` so each horizontal opaque run of the arm layer is split at most once |
4349
- | <a id="SEETHROUGH_ARM_RUN_MERGED"></a>`SEETHROUGH_ARM_RUN_MERGED` | a full-run `handwear-r` or `handwear-l` layer merges sleeve, bare hand (`>= 40` skin run px around `<s>_wrist`, `GHOST_MIN_AREA`) and overgarment into one arm layer with non-skin pixels reaching more than `1.0x` the forearm length (`<s>_elbow -> <s>_wrist`) below `<s>_wrist` (measured `-0.15x..0.45x` on the 6 clean standees vs `1.25x..2.02x` on the 3 merged standees), and the sleeve above `<s>_wrist` and the drape below `<s>_wrist` have Euclidean RGB distance `< 80` (`ARM_DRAPE_COLOR_DISTANCE`, measured `20.8..28.2` when same-coloured vs `103.6..236.0` when distinct) so the stage cannot split them by colour (issue #490; the detail gives the hand px, the non-skin span, the forearm length and both RGB medians) | follow [Source before scissors](#source-before-scissors): select another layer/run, then a tighter run, then correct depth/role; if no separate source exists and sleeve and overgarment must move independently, a structural `author:` layer or `assemble.cuts` entry separates them |
4350
- | <a id="SEETHROUGH_HEAD_RUN_HOLLOW"></a>`SEETHROUGH_HEAD_RUN_HOLLOW` | `full:face` has at least `200` opaque run px (`PROPOSE_MIN_PX`) and `head:face` covers less than `75 %` (`HEAD_FACE_COVERAGE_FLOOR`, measured `0.0 %..48.6 %` on hollow/omitted head runs vs `84.8 %..99.6 %` on clean head runs across the 4 public examples and 9-standee corpus) of `fullLayerToHead(full:face)`'s hole-filled silhouette (`alpha > 8`) in the head canvas while `config.assemble.head_face_underfill: true` is not declared, or `head:face` has fewer than `200` opaque pixels so there is no head-run `face` layer to under-fill (issue #492; the detail gives the full-run mapped count, the head-run overlap and upper/lower half shares) | re-seed `config.seethrough.seed`, or set `config.assemble.head_face_underfill: true` when `head:face` exists so the stage composites `fullLayerToHead(full:face)` under `head:face` on the head canvas (the fill restores transparent pixels only and leaves the cut's own edge where it is — a hollow whose edge is not under hair stays visible; follow [Source before scissors](#source-before-scissors) for its source remedy) |
4361
+ | <a id="SEETHROUGH_ARM_RUN_MERGED"></a>`SEETHROUGH_ARM_RUN_MERGED` | a full-run `handwear-r` or `handwear-l` layer merges sleeve, bare hand (`>= 40` skin run px around `<s>_wrist`, `GHOST_MIN_AREA`) and overgarment into one arm layer with non-skin pixels reaching more than `1.0x` the forearm length (`<s>_elbow -> <s>_wrist`) below `<s>_wrist` (measured `-0.15x..0.45x` on the 6 clean standees vs `1.25x..2.02x` on the 3 merged standees), and the sleeve above `<s>_wrist` and the drape below `<s>_wrist` have Euclidean RGB distance `< 80` (`ARM_DRAPE_COLOR_DISTANCE`, measured `20.8..28.2` when same-coloured vs `103.6..236.0` when distinct) so the stage cannot split them by colour (issue #490; the detail gives the hand px, the non-skin span, the forearm length and both RGB medians) | follow [Source before scissors](#source-before-scissors): select another layer/run, then a tighter run (`comfy seethrough --config <config.json>` to read changed `seethrough` settings, or explicit `--seed <n>`), then correct depth/role; if no separate source exists and sleeve and overgarment must move independently, a structural `author:` layer or `assemble.cuts` entry separates them |
4362
+ | <a id="SEETHROUGH_HEAD_RUN_HOLLOW"></a>`SEETHROUGH_HEAD_RUN_HOLLOW` | `full:face` has at least `200` opaque run px (`PROPOSE_MIN_PX`) and `head:face` covers less than `75 %` (`HEAD_FACE_COVERAGE_FLOOR`, measured `0.0 %..48.6 %` on hollow/omitted head runs vs `84.8 %..99.6 %` on clean head runs across the 4 public examples and 9-standee corpus) of `fullLayerToHead(full:face)`'s hole-filled silhouette (`alpha > 8`) in the head canvas while `config.assemble.head_face_underfill: true` is not declared, or `head:face` has fewer than `200` opaque pixels so there is no head-run `face` layer to under-fill (issue #492; the detail gives the full-run mapped count, the head-run overlap and upper/lower half shares) | change `config.seethrough.seed` and re-run `comfy seethrough --config <config.json>` (or pass `--seed <n>`), or set `config.assemble.head_face_underfill: true` when `head:face` exists so the stage composites `fullLayerToHead(full:face)` under `head:face` on the head canvas (the fill restores transparent pixels only and leaves the cut's own edge where it is — a hollow whose edge is not under hair stays visible; follow [Source before scissors](#source-before-scissors) for its source remedy) |
4351
4363
  | <a id="ASSEMBLE_PLAN_TAG_IN_RUN"></a><a id="ASSEMBLE_EXTEND_TAG_IN_RUN"></a>`ASSEMBLE_PLAN_TAG_IN_RUN`, `ASSEMBLE_EXTEND_TAG_IN_RUN` | an entry takes a tag its run does not hold (the detail lists what it does hold) | that entry's run or tag |
4352
4364
  | <a id="ASSEMBLE_PAINTING_BAND_INSIDE"></a>`ASSEMBLE_PAINTING_BAND_INSIDE` | an extension band reaches past the rig canvas | supply an in-canvas half-open band in rig pixels; no bound is clipped |
4353
4365
  | <a id="CONFIG_ORDER_UNIQUE"></a>`CONFIG_ORDER_UNIQUE` | two `assemble.extend_painting` entries declare the same precedence order | give every entry a unique nonnegative safe integer `order`; lower orders claim first, no implicit tie break |
package/docs/STABILITY.md CHANGED
@@ -53,7 +53,7 @@ defaults are the help's too, and none is guessed from the art.
53
53
  | `sheet` | `--source`, `--layers` (repeatable), `--out`; optional `--cell`, `--cols` |
54
54
  | `inputs` | `--source`, `--config`, `--out` |
55
55
  | `comfy` | `paint`: `--config`, `--out`; optional `--seeds`, `--seed0`, `--host`, `--wait`, `--timeout`, `--poll` |
56
- | `comfy` | `seethrough`: `--image`, `--out`; optional `--resolution`, `--steps`, `--seed`, `--prefix`, `--offload`, `--lama`, `--nf4`, `--host`, `--wait`, `--timeout`, `--poll`, `--config` (optional depth block), `--depth-run` (`full` or `head`, required with the block) |
56
+ | `comfy` | `seethrough`: `--image`, `--out`; optional `--resolution`, `--steps`, `--seed`, `--prefix`, `--offload`, `--no-offload`, `--lama`, `--nf4`, `--host`, `--wait`, `--timeout`, `--poll`, `--config` (See-through settings and optional depth block), `--depth-run` (`full` or `head`, required with the block) |
57
57
  | `assemble` | `--propose-plan` with `--source`, `--full`, `--config`, optional `--head`, `--write-config` (must name `--config` itself, issue #356); or `--source`, `--full`, `--config`, `--out`, optional `--head` (without it, one run: issue #359), `--seam` (near-white, silhouette), `--project` (core, visible), `--alt` (repeatable `<name>=<source>:<full>[:<head>]`, issue #454) |
58
58
  | `propose` | `--head-box` with `--full`, `--canvas`; optional `--no-back-hair`, `--write-config` (existing config, issue #356) |
59
59
  | `propose` | `--parts`, `--source`, `--out`; optional `--compare` or `--from-config` (one of them), `--keypoints`, `--person` and `--wrist-snap` (each with `--keypoints`), `--full`, `--head` (the turn control's depths; not with `--from-config`), `--grid-rule` (`figure` or `part`, the drafted lattice's spacing; not with `--from-config`), `--cloth` (a config whose `cloth` block is the recipe, issue #364; not with `--from-config`), `--write-config` (existing config for an ordinary proposal, issue #356; a new file with `--cloth`, issue #537; not with `--from-config` — additive: without it nothing `propose` writes changes), `--from` (the config the recipe is changed from, only with `--write-config`, issue #571 — additive: without it nothing `--write-config` writes changes), `--only-missing` (only with `--parts` and `--write-config`, not with `--cloth` or `--from-config`, issue #671 — additive: without it nothing `--write-config` writes changes) |
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "rig-parts",
3
- "version": "1.82.0",
3
+ "version": "1.82.1",
4
4
  "description": "AI-authored 2D character parts from one anime painting and its See-through layer decomposition: measured parts, weighted-mesh rig specs, verified through rig-c before anything is written. A CLI for agents that cannot see the image.",
5
5
  "type": "module",
6
6
  "bin": {
package/src/assemble.ts CHANGED
@@ -1751,7 +1751,7 @@ export function splitMergedArmRunsWithNotes(
1751
1751
  object: `the full run (${set.source}) layer "${tag}"`,
1752
1752
  detail:
1753
1753
  `merges the sleeve, the hand (${handPx} skin px around ${s}_wrist at (${Math.round(wr.x)}, ${Math.round(wr.y)}), rows y=${handMinY}..${handMaxY}) and the overgarment into one arm layer: non-skin pixels reach y=${nonSkinMaxY}, ${spanBelowWrist.toFixed(1)} px (${(spanBelowWrist / forearm).toFixed(2)}x the forearm length ${forearm.toFixed(1)} px from ${s}_elbow to ${s}_wrist) below ${s}_wrist, and the sleeve above ${s}_wrist (rgb(${sleeveRGB.join(', ')})) and the drape below ${s}_wrist (rgb(${drapeShown.join(', ')})) have Euclidean RGB distance ${bestDist.toFixed(1)} (< ${ARM_DRAPE_COLOR_DISTANCE}); ` +
1754
- `non-skin pixels reaching at most 1.0x the forearm length (${forearm.toFixed(1)} px) below ${s}_wrist, or a sleeve-to-drape Euclidean RGB distance of at least ${ARM_DRAPE_COLOR_DISTANCE} so the stage can split "${tag}" into "drape-${s}", "${tag}" and "hand-${s}", is required — re-seed config.seethrough.seed, split the merged layer into author: layers in the full run, or cut the overgarment from the sleeve in config.assemble.cuts`,
1754
+ `non-skin pixels reaching at most 1.0x the forearm length (${forearm.toFixed(1)} px) below ${s}_wrist, or a sleeve-to-drape Euclidean RGB distance of at least ${ARM_DRAPE_COLOR_DISTANCE} so the stage can split "${tag}" into "drape-${s}", "${tag}" and "hand-${s}", is required — change config.seethrough.seed and re-run comfy seethrough --config <config.json> (or pass --seed <n>), split the merged layer into author: layers in the full run, or cut the overgarment from the sleeve in config.assemble.cuts`,
1755
1755
  });
1756
1756
  continue;
1757
1757
  }
@@ -2126,8 +2126,8 @@ function prepareHeadFace(
2126
2126
  const floorStr = `${(HEAD_FACE_COVERAGE_FLOOR * 100).toFixed(1)}% (HEAD_FACE_COVERAGE_FLOOR = ${HEAD_FACE_COVERAGE_FLOOR})`;
2127
2127
  const detail =
2128
2128
  headFaceLayer === undefined || headRawOpaquePx < minPx
2129
- ? `${headFaceLayer === undefined ? 'holds no layer "face"' : `holds ${headRawOpaquePx} opaque px (alpha > ${OPAQUE_ALPHA_ABOVE}, below PROPOSE_MIN_PX = ${minPx})`}, covering ${covStr} of the full run's "face" silhouette on the head canvas (${fullOpaqueRunPx} full-run px); at least ${floorStr} is required — the head run omitted the face layer (so config.assemble.head_face_underfill cannot supply a jawline); re-run See-through with a different config.seethrough.seed`
2130
- : `covers ${covStr} of the full run's "face" silhouette on the head canvas (${headRawOpaquePx} head-run px vs ${fullOpaqueRunPx} full-run px) — See-through left bare skin inside the face silhouette transparent; at least ${floorStr} is required — re-run See-through with a different config.seethrough.seed, or set "head_face_underfill": true in config.assemble to composite full:face under head:face on the head canvas`;
2129
+ ? `${headFaceLayer === undefined ? 'holds no layer "face"' : `holds ${headRawOpaquePx} opaque px (alpha > ${OPAQUE_ALPHA_ABOVE}, below PROPOSE_MIN_PX = ${minPx})`}, covering ${covStr} of the full run's "face" silhouette on the head canvas (${fullOpaqueRunPx} full-run px); at least ${floorStr} is required — the head run omitted the face layer (so config.assemble.head_face_underfill cannot supply a jawline); change config.seethrough.seed and re-run comfy seethrough --config <config.json> (or pass --seed <n>)`
2130
+ : `covers ${covStr} of the full run's "face" silhouette on the head canvas (${headRawOpaquePx} head-run px vs ${fullOpaqueRunPx} full-run px) — See-through left bare skin inside the face silhouette transparent; at least ${floorStr} is required — change config.seethrough.seed and re-run comfy seethrough --config <config.json> (or pass --seed <n>), or set "head_face_underfill": true in config.assemble to composite full:face under head:face on the head canvas`;
2131
2131
  refuseIfAny([
2132
2132
  {
2133
2133
  code: 'SEETHROUGH_HEAD_RUN_HOLLOW',