@melite/3d-img-to-mesh 0.1.5-pre-alpha → 0.2.2-alpha
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/LICENSE +561 -457
- package/README.md +3 -8
- package/lib/card.js +9 -9
- package/package.json +29 -25
package/README.md
CHANGED
|
@@ -1,15 +1,10 @@
|
|
|
1
|
-
---
|
|
2
|
-
description: Image-to-mesh card that boards three mesh families — pixal3d, trellis2-native, and transfer_rig — plus the mesh studio client.
|
|
3
|
-
kind: package-library
|
|
4
|
-
---
|
|
5
|
-
|
|
6
1
|
# @melite/3d-img-to-mesh
|
|
7
2
|
|
|
8
|
-
`@melite/3d-img-to-mesh` is the image-to-mesh card. One card serves three families, each with its own declared action: `pixal3d` and `trellis2-native` run the `mesh` action (image in, mesh out); `
|
|
3
|
+
`@melite/3d-img-to-mesh` is the image-to-mesh card. One card serves three families, each with its own declared action: `pixal3d` and `trellis2-native` run the `mesh` action (image in, mesh out); `transfer-rig` runs `transfer` (rig transfers between two GLBs). The cardPackages SSOT composes the card from `./card`; the browser studio rides `./client`.
|
|
9
4
|
|
|
10
5
|
## Contract
|
|
11
6
|
|
|
12
|
-
- `./card` — the card definition (`id: 'img-to-mesh'`). Family dispatch keys on `model.family ?? model.id`; an unbound family refuses loudly. Per-family requirements: pixal3d needs the `ComfyUI-MoGe` pack,
|
|
7
|
+
- `./card` — the card definition (`id: 'img-to-mesh'`). Family dispatch keys on `model.family ?? model.id`; an unbound family refuses loudly. Per-family requirements: pixal3d needs the `ComfyUI-MoGe` pack, transfer-rig needs `melite-autorig-nodes`, trellis2-native needs none; the card-level `requires` is the union. Flow seats: `input_image` (image), `rigged_glb` and `target_glb` (mesh) in; mesh out, bound to `Save3DAdvanced.0` or `SaveRiggedModel.0` per action. Autofill literals (RemeshMesh band/project_back, ImageCropToMask background/grow_mask, MoGeInference apply_mask/batch_size/force_projection/fov_x_degrees) ride the compose; `remesh_qef`, `remesh_drop_inverted`, `remesh_drop_enclosed`, and `remesh_fix_poles` are card params.
|
|
13
8
|
- `./client` — `ImgToMeshStudio`, a DeclarativeStudio registration exposing the `input` and `generation` stages with the mesh preview; the plugin injects into `slots`.
|
|
14
9
|
- `.` — the row-mounted host face; it registers nothing.
|
|
15
10
|
- `./package.json` — the manifest.
|
|
@@ -34,5 +29,5 @@ independent — nothing here appends to or reshapes a session cache.
|
|
|
34
29
|
|
|
35
30
|
## Known Limitations and Deferred Work
|
|
36
31
|
|
|
37
|
-
- **Per-family surfaces differ** — only pixal3d and
|
|
32
|
+
- **Per-family surfaces differ** — only pixal3d and transfer-rig carry pack requirements today; a new family must declare both its action and its slice.
|
|
38
33
|
- **Studio exposure is fixed** — `ImgToMeshStudio` folds the input and generation stages; other stages are not exposed yet.
|
package/lib/card.js
CHANGED
|
@@ -2,7 +2,7 @@ import z from '@deepseek-ai/schemastery';
|
|
|
2
2
|
import { declaredAction, instantiateAction, MESH_RESOLUTIONS, MESH_PIXAL_FOVS, MESH_ATLAS_SIZES, MESH_AO_SIZES, MESH_NORMAL_SIZES } from '@melite/comfyui-card-kit';
|
|
3
3
|
import { DECL as pixal3dDecl } from '@melite/models-pixal3d';
|
|
4
4
|
import { DECL as trellis2NativeDecl } from '@melite/models-trellis2-native';
|
|
5
|
-
import { DECL as transferRigDecl } from '@melite/models-
|
|
5
|
+
import { DECL as transferRigDecl } from '@melite/models-transfer-rig';
|
|
6
6
|
import { SAMPLERS, SCHEDULERS, vocabulary } from '@melite/comfyui-card-kit/vocab';
|
|
7
7
|
import { bag } from '@melite/contracts/extraKeys';
|
|
8
8
|
import { ComposeRefusal } from '@melite/comfyui-card-kit/errors';
|
|
@@ -11,20 +11,20 @@ import { callableSchema, gatedResolve } from '@melite/comfyui-card-kit/admission
|
|
|
11
11
|
const schema = z.object({
|
|
12
12
|
// Ride keys (no .default — the compose-door cascade overlays model
|
|
13
13
|
// defaults, then explicit params): input_image is required; the
|
|
14
|
-
// rig GLBs are ABSENT/defaultless (
|
|
14
|
+
// rig GLBs are ABSENT/defaultless (transfer-rig's model row
|
|
15
15
|
// carries no defaults either) and refused per-arm in compose, so a
|
|
16
16
|
// lift call never names them and a rig call names both. Bare
|
|
17
17
|
// z.string() is the image-gen prompt precedent (optional at parse,
|
|
18
18
|
// refused loud at compose).
|
|
19
|
-
input_image: z.string().role('path').description("Source image").extra('extra', bag({ order: 0, group: "input", columns: 1, tooltip: "One clear object, tight framing — the
|
|
20
|
-
rigged_glb: z.string().role('path').description("Rigged source GLB").extra('extra', bag({ order: 0, group: "input", columns: 1, tooltip: "The SOMA-rigged clean mesh — JOINTS_0/WEIGHTS_0 + armature. The rig donor.", families: ['
|
|
21
|
-
target_glb: z.string().role('path').description("Target GLB").extra('extra', bag({ order: 1, group: "input", columns: 1, tooltip: "The clothed mesh — geometry + textures, no rig. Receives the rig.", families: ['
|
|
19
|
+
input_image: z.string().role('path').description("Source image").extra('extra', bag({ order: 0, group: "input", columns: 1, tooltip: "One clear object, tight framing — the card crops it to a square and conditions on it directly.", required: true, families: ['pixal3d', 'trellis2-native'], wtype: 'image', })),
|
|
20
|
+
rigged_glb: z.string().role('path').description("Rigged source GLB").extra('extra', bag({ order: 0, group: "input", columns: 1, tooltip: "The SOMA-rigged clean mesh — JOINTS_0/WEIGHTS_0 + armature. The rig donor.", families: ['transfer-rig'], wtype: 'mesh' })),
|
|
21
|
+
target_glb: z.string().role('path').description("Target GLB").extra('extra', bag({ order: 1, group: "input", columns: 1, tooltip: "The clothed mesh — geometry + textures, no rig. Receives the rig.", families: ['transfer-rig'], wtype: 'mesh' })),
|
|
22
22
|
seed: z.number().description("Seed").step(1).extra('extra', bag(seedExtra({ order: 1, group: 'input', width: 1, tooltip: 'Same seed + image = same mesh take.', families: ['pixal3d', 'trellis2-native'] }))),
|
|
23
23
|
// Select knobs coerce wire strings at compose (the skin map_size
|
|
24
24
|
// precedent) — enum hints ride extra.options, never validation.
|
|
25
25
|
resolution: vocabulary(MESH_RESOLUTIONS).description("Resolution").extra('extra', bag({ order: 0, group: "generation", width: 1, tooltip: "Upsample target (the live node accepts 1024–2048; the family routes serve 1024 and 1536). All tiers run the full official chain — upsample + both texture passes + remesh tail.", families: ['pixal3d', 'trellis2-native'], wtype: 'select' })),
|
|
26
26
|
steps: z.number().description("Steps").min(4).max(60).step(1).extra('extra', bag({ order: 1, group: "generation", width: 1, tooltip: "STRUCTURE stage steps (the lift). Shape + texture stages ride their own knobs in the Stage section.", families: ['pixal3d', 'trellis2-native'], wtype: 'number' })),
|
|
27
|
-
cfg: z.number().description("CFG").min(1).max(15).step(0.5).extra('extra', bag({ order: 2, group: "generation", width: 1, tooltip: "Structure-stage guidance. 7.5 is the official template calibration (
|
|
27
|
+
cfg: z.number().description("CFG").min(1).max(15).step(0.5).extra('extra', bag({ order: 2, group: "generation", width: 1, tooltip: "Structure-stage guidance. 7.5 is the official template calibration (the 3.0 default under-samples the coarse shape). Lower runs looser.", families: ['pixal3d', 'trellis2-native'] })),
|
|
28
28
|
camera_fov: vocabulary(MESH_PIXAL_FOVS).description("Camera FoV").extra('extra', bag({ order: 4, group: "generation", width: 1, tooltip: "Pixal3D only — per-image horizontal FoV feeding the camera transform matrix. auto: MoGeInference estimates from the source image (recommended); a literal degree value skips MoGe (operator-vouched camera, e.g. calibrated).", families: ['pixal3d'], wtype: 'select' })),
|
|
29
29
|
shape_steps: z.number().description("Shape steps").min(4).max(60).step(1).extra('extra', bag({ order: 0, group: "stage", width: 1, tooltip: "Shape-stage steps. 20 is the official template calibration.", families: ['pixal3d', 'trellis2-native'], wtype: 'number' })),
|
|
30
30
|
shape_cfg: z.number().description("Shape CFG").min(1).max(15).step(0.5).extra('extra', bag({ order: 1, group: "stage", width: 1, tooltip: "Shape-stage guidance. 7.5 is the official template calibration.", families: ['pixal3d', 'trellis2-native'] })),
|
|
@@ -68,7 +68,7 @@ export const inject = ['comfyui'];
|
|
|
68
68
|
// identity ring; the card owns its label/description/genre/icon).
|
|
69
69
|
export const identity = {
|
|
70
70
|
label: 'Generate 3D',
|
|
71
|
-
description: 'The 3D lane — lift one image into a textured mesh (.glb) on native TRELLIS.2 (DINOv3 conditioning) or native Pixal3D (pixel-aligned + MoGe camera FOV, hero tier), or copy a rig onto a target GLB (
|
|
71
|
+
description: 'The 3D lane — lift one image into a textured mesh (.glb) on native TRELLIS.2 (DINOv3 conditioning) or native Pixal3D (pixel-aligned + MoGe camera FOV, hero tier), or copy a rig onto a target GLB (transfer-rig); one surface, one arm per family.',
|
|
72
72
|
genre: '3d',
|
|
73
73
|
icon: 'box',
|
|
74
74
|
};
|
|
@@ -135,7 +135,7 @@ export function apply(ctx) {
|
|
|
135
135
|
requiresByFamily: {
|
|
136
136
|
'trellis2-native': [],
|
|
137
137
|
pixal3d: ['ComfyUI-MoGe'],
|
|
138
|
-
|
|
138
|
+
'transfer-rig': ['melite-autorig-nodes'],
|
|
139
139
|
},
|
|
140
140
|
schema: schemaFn,
|
|
141
141
|
compose(p, model, g, runId) {
|
|
@@ -173,7 +173,7 @@ export function apply(ctx) {
|
|
|
173
173
|
// that owns none refuses HERE — a multi-family card never
|
|
174
174
|
// guesses a sibling's lane silently (the kit arms stay as
|
|
175
175
|
// the byte-oracles until the final interlock retires them).
|
|
176
|
-
throw new Error(`no declared action for family '${String(model.family ?? model.id)}' on the img-to-mesh card — every boarded family (pixal3d, trellis2-native,
|
|
176
|
+
throw new Error(`no declared action for family '${String(model.family ?? model.id)}' on the img-to-mesh card — every boarded family (pixal3d, trellis2-native, transfer-rig) composes its own segment; this address owns none`);
|
|
177
177
|
}
|
|
178
178
|
},
|
|
179
179
|
}));
|
package/package.json
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
{
|
|
2
|
-
"version": "0.
|
|
3
|
-
"license": "
|
|
2
|
+
"version": "0.2.2-alpha",
|
|
3
|
+
"license": "AGPL-3.0-or-later",
|
|
4
4
|
"type": "module",
|
|
5
|
-
"description": "
|
|
5
|
+
"description": "Image-to-mesh card that boards three mesh families — pixal3d, trellis2-native, and transfer-rig — plus the mesh studio client.",
|
|
6
6
|
"exports": {
|
|
7
7
|
".": {
|
|
8
8
|
"types": "./lib/index.d.ts",
|
|
@@ -16,28 +16,16 @@
|
|
|
16
16
|
"./package.json": "./package.json"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@deepseek-ai/dsh-client-ui-
|
|
20
|
-
"@deepseek-ai/
|
|
21
|
-
"@deepseek-ai/schemastery": "3.18.4",
|
|
19
|
+
"@deepseek-ai/dsh-client-ui-renderer": "0.2.1-rc.2",
|
|
20
|
+
"@deepseek-ai/schemastery": "^3.18.5",
|
|
22
21
|
"react": "^19.3.0",
|
|
23
|
-
"@melite-plugin/melite-run-wire": "0.
|
|
24
|
-
"@melite/card-base": "0.
|
|
25
|
-
"@melite/
|
|
26
|
-
"@melite/
|
|
27
|
-
"@melite/models-
|
|
28
|
-
"@melite/models-
|
|
29
|
-
"@melite/models-trellis2-native": "0.
|
|
30
|
-
},
|
|
31
|
-
"devDependencies": {
|
|
32
|
-
"@testing-library/jest-dom": "*",
|
|
33
|
-
"@testing-library/react": "*",
|
|
34
|
-
"@testing-library/user-event": "*",
|
|
35
|
-
"@types/node": "^22.20.0",
|
|
36
|
-
"@types/react": "^19.3.0",
|
|
37
|
-
"@types/react-dom": "^19.3.0",
|
|
38
|
-
"tsdown": "^0.22.14",
|
|
39
|
-
"typescript": "~6.0.3",
|
|
40
|
-
"@deepseek-ai/cordis": "^4.0.4"
|
|
22
|
+
"@melite-plugin/melite-run-wire": "0.2.2-alpha",
|
|
23
|
+
"@melite/card-base": "0.2.2-alpha",
|
|
24
|
+
"@melite/contracts": "0.2.2-alpha",
|
|
25
|
+
"@melite/comfyui-card-kit": "0.2.2-alpha",
|
|
26
|
+
"@melite/models-transfer-rig": "0.2.2-alpha",
|
|
27
|
+
"@melite/models-pixal3d": "0.2.2-alpha",
|
|
28
|
+
"@melite/models-trellis2-native": "0.2.2-alpha"
|
|
41
29
|
},
|
|
42
30
|
"name": "@melite/3d-img-to-mesh",
|
|
43
31
|
"dsh": {
|
|
@@ -54,12 +42,28 @@
|
|
|
54
42
|
"lib/**/*.d.ts"
|
|
55
43
|
],
|
|
56
44
|
"peerDependencies": {
|
|
57
|
-
"@deepseek-ai/cordis": "^4.0.
|
|
45
|
+
"@deepseek-ai/cordis": "^4.0.5"
|
|
46
|
+
},
|
|
47
|
+
"repository": {
|
|
48
|
+
"type": "git",
|
|
49
|
+
"url": "https://github.com/JayDataEngineer/melite.git",
|
|
50
|
+
"directory": "packages/3d/img-to-mesh"
|
|
58
51
|
},
|
|
52
|
+
"keywords": [
|
|
53
|
+
"melite",
|
|
54
|
+
"comfyui",
|
|
55
|
+
"cordis",
|
|
56
|
+
"agent",
|
|
57
|
+
"media-generation",
|
|
58
|
+
"library"
|
|
59
|
+
],
|
|
59
60
|
"scripts": {
|
|
60
61
|
"build": "tsc -p tsconfig.build.json",
|
|
61
62
|
"typecheck": "tsc --noEmit -p tsconfig.host.json && tsc --noEmit -p tsconfig.client.json"
|
|
62
63
|
},
|
|
64
|
+
"engines": {
|
|
65
|
+
"node": ">=22.18.0"
|
|
66
|
+
},
|
|
63
67
|
"publishConfig": {
|
|
64
68
|
"access": "public"
|
|
65
69
|
}
|