version 0.2.0

Added Inpainting function in Mesh Editor - 1 projection
Added ComfyUI workflow examples
This commit is contained in:
Bruno Fargnoli 2026-04-24 20:38:05 +02:00
parent cf04fbcfba
commit 95c5a2f241
21 changed files with 4625 additions and 147 deletions

376
.kilo/package-lock.json generated Normal file
View file

@ -0,0 +1,376 @@
{
"name": ".kilo",
"lockfileVersion": 3,
"requires": true,
"packages": {
"": {
"dependencies": {
"@kilocode/plugin": "7.2.20"
}
},
"node_modules/@kilocode/plugin": {
"version": "7.2.20",
"resolved": "https://registry.npmjs.org/@kilocode/plugin/-/plugin-7.2.20.tgz",
"integrity": "sha512-M5lMc58Mu9j1zveH+E3ZUKRHefzh+acNAqHGSG3TuF6K2l16KrZlCl38CZlgj2R5Qgaig6Jec/F2p9Rbn3BhCQ==",
"license": "MIT",
"dependencies": {
"@kilocode/sdk": "7.2.20",
"effect": "4.0.0-beta.48",
"zod": "4.1.8"
},
"peerDependencies": {
"@opentui/core": ">=0.1.99",
"@opentui/solid": ">=0.1.99"
},
"peerDependenciesMeta": {
"@opentui/core": {
"optional": true
},
"@opentui/solid": {
"optional": true
}
}
},
"node_modules/@kilocode/sdk": {
"version": "7.2.20",
"resolved": "https://registry.npmjs.org/@kilocode/sdk/-/sdk-7.2.20.tgz",
"integrity": "sha512-KUpu1fyzcAyZWpiv//834zGLN+PYzIH65crs15VTtUJ9CDvGqcj08EM0XlkF9jMuGQAjHjfRbvCfml3+YO31+Q==",
"license": "MIT",
"dependencies": {
"cross-spawn": "7.0.6"
}
},
"node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz",
"integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz",
"integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"darwin"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz",
"integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==",
"cpu": [
"arm"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz",
"integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==",
"cpu": [
"arm64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz",
"integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"linux"
]
},
"node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz",
"integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==",
"cpu": [
"x64"
],
"license": "MIT",
"optional": true,
"os": [
"win32"
]
},
"node_modules/@standard-schema/spec": {
"version": "1.1.0",
"resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz",
"integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==",
"license": "MIT"
},
"node_modules/cross-spawn": {
"version": "7.0.6",
"resolved": "https://registry.npmjs.org/cross-spawn/-/cross-spawn-7.0.6.tgz",
"integrity": "sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==",
"license": "MIT",
"dependencies": {
"path-key": "^3.1.0",
"shebang-command": "^2.0.0",
"which": "^2.0.1"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/detect-libc": {
"version": "2.1.2",
"resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz",
"integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==",
"license": "Apache-2.0",
"optional": true,
"engines": {
"node": ">=8"
}
},
"node_modules/effect": {
"version": "4.0.0-beta.48",
"resolved": "https://registry.npmjs.org/effect/-/effect-4.0.0-beta.48.tgz",
"integrity": "sha512-MMAM/ZabuNdNmgXiin+BAanQXK7qM8mlt7nfXDoJ/Gn9V8i89JlCq+2N0AiWmqFLXjGLA0u3FjiOjSOYQk5uMw==",
"license": "MIT",
"dependencies": {
"@standard-schema/spec": "^1.1.0",
"fast-check": "^4.6.0",
"find-my-way-ts": "^0.1.6",
"ini": "^6.0.0",
"kubernetes-types": "^1.30.0",
"msgpackr": "^1.11.9",
"multipasta": "^0.2.7",
"toml": "^4.1.1",
"uuid": "^13.0.0",
"yaml": "^2.8.3"
}
},
"node_modules/fast-check": {
"version": "4.7.0",
"resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.7.0.tgz",
"integrity": "sha512-NsZRtqvSSoCP0HbNjUD+r1JH8zqZalyp6gLY9e7OYs7NK9b6AHOs2baBFeBG7bVNsuoukh89x2Yg3rPsul8ziQ==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/dubzzz"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fast-check"
}
],
"license": "MIT",
"dependencies": {
"pure-rand": "^8.0.0"
},
"engines": {
"node": ">=12.17.0"
}
},
"node_modules/find-my-way-ts": {
"version": "0.1.6",
"resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz",
"integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==",
"license": "MIT"
},
"node_modules/ini": {
"version": "6.0.0",
"resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz",
"integrity": "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==",
"license": "ISC",
"engines": {
"node": "^20.17.0 || >=22.9.0"
}
},
"node_modules/isexe": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz",
"integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",
"license": "ISC"
},
"node_modules/kubernetes-types": {
"version": "1.30.0",
"resolved": "https://registry.npmjs.org/kubernetes-types/-/kubernetes-types-1.30.0.tgz",
"integrity": "sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q==",
"license": "Apache-2.0"
},
"node_modules/msgpackr": {
"version": "1.11.10",
"resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.10.tgz",
"integrity": "sha512-iCZNq+HszvF+fC3anCm4nBmWEnbeIAfpDs6IStAEKhQ2YSgkjzVG2FF9XJqwwQh5bH3N9OUTUt4QwVN6MLMLtA==",
"license": "MIT",
"optionalDependencies": {
"msgpackr-extract": "^3.0.2"
}
},
"node_modules/msgpackr-extract": {
"version": "3.0.3",
"resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz",
"integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==",
"hasInstallScript": true,
"license": "MIT",
"optional": true,
"dependencies": {
"node-gyp-build-optional-packages": "5.2.2"
},
"bin": {
"download-msgpackr-prebuilds": "bin/download-prebuilds.js"
},
"optionalDependencies": {
"@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3",
"@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3",
"@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3",
"@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3",
"@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3",
"@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3"
}
},
"node_modules/multipasta": {
"version": "0.2.7",
"resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.7.tgz",
"integrity": "sha512-KPA58d68KgGil15oDqXjkUBEBYc00XvbPj5/X+dyzeo/lWm9Nc25pQRlf1D+gv4OpK7NM0J1odrbu9JNNGvynA==",
"license": "MIT"
},
"node_modules/node-gyp-build-optional-packages": {
"version": "5.2.2",
"resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz",
"integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==",
"license": "MIT",
"optional": true,
"dependencies": {
"detect-libc": "^2.0.1"
},
"bin": {
"node-gyp-build-optional-packages": "bin.js",
"node-gyp-build-optional-packages-optional": "optional.js",
"node-gyp-build-optional-packages-test": "build-test.js"
}
},
"node_modules/path-key": {
"version": "3.1.1",
"resolved": "https://registry.npmjs.org/path-key/-/path-key-3.1.1.tgz",
"integrity": "sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/pure-rand": {
"version": "8.4.0",
"resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.0.tgz",
"integrity": "sha512-IoM8YF/jY0hiugFo/wOWqfmarlE6J0wc6fDK1PhftMk7MGhVZl88sZimmqBBFomLOCSmcCCpsfj7wXASCpvK9A==",
"funding": [
{
"type": "individual",
"url": "https://github.com/sponsors/dubzzz"
},
{
"type": "opencollective",
"url": "https://opencollective.com/fast-check"
}
],
"license": "MIT"
},
"node_modules/shebang-command": {
"version": "2.0.0",
"resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz",
"integrity": "sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==",
"license": "MIT",
"dependencies": {
"shebang-regex": "^3.0.0"
},
"engines": {
"node": ">=8"
}
},
"node_modules/shebang-regex": {
"version": "3.0.0",
"resolved": "https://registry.npmjs.org/shebang-regex/-/shebang-regex-3.0.0.tgz",
"integrity": "sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==",
"license": "MIT",
"engines": {
"node": ">=8"
}
},
"node_modules/toml": {
"version": "4.1.1",
"resolved": "https://registry.npmjs.org/toml/-/toml-4.1.1.tgz",
"integrity": "sha512-EBJnVBr3dTXdA89WVFoAIPUqkBjxPMwRqsfuo1r240tKFHXv3zgca4+NJib/h6TyvGF7vOawz0jGuryJCdNHrw==",
"license": "MIT",
"engines": {
"node": ">=20"
}
},
"node_modules/uuid": {
"version": "13.0.0",
"resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz",
"integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==",
"funding": [
"https://github.com/sponsors/broofa",
"https://github.com/sponsors/ctavan"
],
"license": "MIT",
"bin": {
"uuid": "dist-node/bin/uuid"
}
},
"node_modules/which": {
"version": "2.0.2",
"resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz",
"integrity": "sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==",
"license": "ISC",
"dependencies": {
"isexe": "^2.0.0"
},
"bin": {
"node-which": "bin/node-which"
},
"engines": {
"node": ">= 8"
}
},
"node_modules/yaml": {
"version": "2.8.3",
"resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz",
"integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==",
"license": "ISC",
"bin": {
"yaml": "bin.mjs"
},
"engines": {
"node": ">= 14.6"
},
"funding": {
"url": "https://github.com/sponsors/eemeli"
}
},
"node_modules/zod": {
"version": "4.1.8",
"license": "MIT",
"funding": {
"url": "https://github.com/sponsors/colinhacks"
}
}
}
}

View file

@ -19,6 +19,7 @@
| Date | Description |
| --- | --- |
| **2026-04-24** | Added Inpainting function in Mesh Editor<br>Added ComfyUI workflow examples |
| **2026-04-21** | Added Graph Node "Image Compare"<br>Improved a bit the "Mesh Editor" (not good yet) |
| **2026-04-19** | Improve the way to import ComfyUI workflows<br>Added a draft version of Mesh Editor<br>Added Change Log in Projects page |
| **2026-04-19** | First release |

View file

@ -0,0 +1,222 @@
{
"139": {
"inputs": {
"shift": 3.1,
"model": [
"152",
0
]
},
"class_type": "ModelSamplingAuraFlow",
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"140": {
"inputs": {
"strength": 1,
"model": [
"139",
0
]
},
"class_type": "CFGNorm",
"_meta": {
"title": "CFGNorm"
}
},
"141": {
"inputs": {
"prompt": "",
"clip": [
"154",
0
],
"vae": [
"151",
0
],
"image1": [
"146",
0
]
},
"class_type": "TextEncodeQwenImageEditPlus",
"_meta": {
"title": "TextEncodeQwenImageEditPlus"
}
},
"143": {
"inputs": {
"seed": 945859508372931,
"steps": 4,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1,
"model": [
"140",
0
],
"positive": [
"149",
0
],
"negative": [
"150",
0
],
"latent_image": [
"153",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"145": {
"inputs": {
"unet_name": "qwen-image-edit-2511-Q4_K_M.gguf"
},
"class_type": "UnetLoaderGGUF",
"_meta": {
"title": "Unet Loader (GGUF)"
}
},
"146": {
"inputs": {
"image": "Image_1024_00126_.png"
},
"class_type": "LoadImage",
"_meta": {
"title": "Load Image"
}
},
"147": {
"inputs": {
"tile_size": 128,
"overlap": 64,
"temporal_size": 64,
"temporal_overlap": 8,
"samples": [
"143",
0
],
"vae": [
"151",
0
]
},
"class_type": "VAEDecodeTiled",
"_meta": {
"title": "VAE Decode (Tiled)"
}
},
"148": {
"inputs": {
"prompt": "Generate a highly detailed normal map of the image",
"clip": [
"154",
0
],
"vae": [
"151",
0
],
"image1": [
"146",
0
]
},
"class_type": "TextEncodeQwenImageEditPlus",
"_meta": {
"title": "TextEncodeQwenImageEditPlus (Positive)"
}
},
"149": {
"inputs": {
"reference_latents_method": "index_timestep_zero",
"conditioning": [
"148",
0
]
},
"class_type": "FluxKontextMultiReferenceLatentMethod",
"_meta": {
"title": "Edit Model Reference Method"
}
},
"150": {
"inputs": {
"reference_latents_method": "index_timestep_zero",
"conditioning": [
"141",
0
]
},
"class_type": "FluxKontextMultiReferenceLatentMethod",
"_meta": {
"title": "Edit Model Reference Method"
}
},
"151": {
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"class_type": "VAELoader",
"_meta": {
"title": "Load VAE"
}
},
"152": {
"inputs": {
"lora_name": "Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors",
"strength_model": 1,
"model": [
"145",
0
]
},
"class_type": "LoraLoaderModelOnly",
"_meta": {
"title": "Load LoRA"
}
},
"153": {
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 1
},
"class_type": "EmptyLatentImage",
"_meta": {
"title": "Empty Latent Image"
}
},
"154": {
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"type": "qwen_image",
"device": "default"
},
"class_type": "CLIPLoader",
"_meta": {
"title": "Load CLIP"
}
},
"155": {
"inputs": {
"filename_prefix": "Images/Image",
"images": [
"147",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
}
}

View file

@ -0,0 +1,127 @@
{
"43": {
"inputs": {
"filename_prefix": "z-image",
"images": [
"34:8",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
"34:29": {
"inputs": {
"vae_name": "ae.safetensors"
},
"class_type": "VAELoader",
"_meta": {
"title": "Load VAE"
}
},
"34:33": {
"inputs": {
"conditioning": [
"34:27",
0
]
},
"class_type": "ConditioningZeroOut",
"_meta": {
"title": "ConditioningZeroOut"
}
},
"34:8": {
"inputs": {
"samples": [
"34:3",
0
],
"vae": [
"34:29",
0
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"34:27": {
"inputs": {
"text": "A highly detailed elf sorcerer in A-Pose, front view, gray background",
"clip": [
"34:30",
0
]
},
"class_type": "CLIPTextEncode",
"_meta": {
"title": "CLIP Text Encode (Prompt)"
}
},
"34:13": {
"inputs": {
"width": 1024,
"height": 1024,
"batch_size": 1
},
"class_type": "EmptySD3LatentImage",
"_meta": {
"title": "EmptySD3LatentImage"
}
},
"34:30": {
"inputs": {
"clip_name": "qwen_3_4b.safetensors",
"type": "lumina2",
"device": "default"
},
"class_type": "CLIPLoader",
"_meta": {
"title": "Load CLIP"
}
},
"34:46": {
"inputs": {
"unet_name": "z_image_turbo_bf16.safetensors",
"weight_dtype": "default"
},
"class_type": "UNETLoader",
"_meta": {
"title": "Load Diffusion Model"
}
},
"34:3": {
"inputs": {
"seed": 91319876217533,
"steps": 10,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "linear_quadratic",
"denoise": 1,
"model": [
"34:46",
0
],
"positive": [
"34:27",
0
],
"negative": [
"34:33",
0
],
"latent_image": [
"34:13",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
}
}

View file

@ -0,0 +1,281 @@
{
"6": {
"inputs": {
"image": "Normal_00001_.png"
},
"class_type": "Trellis2LoadImageWithTransparency",
"_meta": {
"title": "Source Image"
}
},
"39": {
"inputs": {
"modelname": "microsoft/TRELLIS.2-4B",
"backend": "flash_attn",
"device": "cuda",
"low_vram": true,
"keep_models_loaded": false,
"conv_backend": "flex_gemm",
"sparse_backend": "flash_attn",
"use_reconviagen": false
},
"class_type": "Trellis2LoadModel",
"_meta": {
"title": "Trellis2 - LoadModel"
}
},
"161": {
"inputs": {
"remesh_band": 1,
"resolution": 1024,
"remove_floaters": true,
"remove_inner_faces": true,
"mesh": [
"193",
0
]
},
"class_type": "Trellis2ReconstructMeshWithQuad",
"_meta": {
"title": "Trellis2 - Reconstruct Mesh With Quad"
}
},
"193": {
"inputs": {
"max_permieters": 1,
"mesh": [
"217",
0
]
},
"class_type": "Trellis2FillHolesWithCuMesh",
"_meta": {
"title": "Trellis2 - Fill Holes with CuMesh"
}
},
"194": {
"inputs": {
"padding": 10,
"remove_background": false,
"max_size": 1024,
"image": [
"6",
2
]
},
"class_type": "Trellis2PreProcessImage",
"_meta": {
"title": "Trellis2 - PreProcess Image"
}
},
"202": {
"inputs": {
"reorient_vertices": "90 degrees",
"mesh": [
"257",
0
]
},
"class_type": "Trellis2MeshWithVoxelToTrimesh",
"_meta": {
"title": "Trellis2 - Mesh With Voxel To Trimesh"
}
},
"203": {
"inputs": {
"filename_prefix": [
"219",
0
],
"file_format": "glb",
"trimesh": [
"202",
0
]
},
"class_type": "Trellis2ExportMesh",
"_meta": {
"title": "Trellis2 - Export Mesh"
}
},
"209": {
"inputs": {
"value": 1000000
},
"class_type": "PrimitiveInt",
"_meta": {
"title": "Target Face Number"
}
},
"213": {
"inputs": {
"max_views": 1,
"pipeline": [
"39",
0
],
"image": [
"194",
0
]
},
"class_type": "Trellis2ImageCondGenerator",
"_meta": {
"title": "Trellis2 - ImageCond Generator"
}
},
"214": {
"inputs": {
"seed": 12345,
"sparse_structure_steps": 50,
"sparse_structure_guidance_strength": 7.5,
"sparse_structure_guidance_rescale": 0.01,
"sparse_structure_rescale_t": 5,
"sparse_structure_sampler": "heun",
"sparse_structure_resolution": 64,
"sparse_structure_guidance_interval_start": 0.1,
"sparse_structure_guidance_interval_end": 1,
"fill_holes": true,
"hole_iterations": 1,
"verbose": false,
"dino_lock": 0.6,
"dino_substeps": 2,
"hole_fill_algorithm": "flood_fill",
"dino_foundation_cap": 0.92,
"keep_only_shell": true,
"pipeline": [
"213",
2
],
"image_cond": [
"213",
0
]
},
"class_type": "Trellis2SparseGenerator",
"_meta": {
"title": "Trellis2 - Sparse Generator"
}
},
"215": {
"inputs": {
"resolution": 1024,
"shape_steps": 25,
"shape_guidance_strength": 7.5,
"shape_guidance_rescale": 0.01,
"shape_rescale_t": 3,
"shape_sampler": "heun",
"shape_guidance_interval_start": 0.1,
"shape_guidance_interval_end": 1,
"verbose": false,
"dino_lock": 0.35,
"dino_substeps": 2,
"dino_foundation_cap": 0.92,
"pipeline": [
"214",
2
],
"image_cond": [
"213",
1
],
"coords": [
"214",
0
]
},
"class_type": "Trellis2ShapeGenerator",
"_meta": {
"title": "Trellis2 - Shape Generator"
}
},
"217": {
"inputs": {
"resolution": [
"215",
1
],
"use_tiled_decoder": true,
"pipeline": [
"215",
2
],
"shape_slat": [
"215",
0
]
},
"class_type": "Trellis2DecodeLatents",
"_meta": {
"title": "Trellis2 - Decode Latents"
}
},
"218": {
"inputs": {
"target_face_num": [
"209",
0
],
"method": "Cumesh",
"mesh": [
"161",
0
]
},
"class_type": "Trellis2SimplifyMesh",
"_meta": {
"title": "Trellis2 - Simplify Mesh"
}
},
"219": {
"inputs": {
"value": "DwarfSorcerer"
},
"class_type": "PrimitiveString",
"_meta": {
"title": "Name"
}
},
"232": {
"inputs": {
"model_file": [
"203",
0
],
"image": ""
},
"class_type": "Preview3D",
"_meta": {
"title": "Preview 3D & Animation"
}
},
"250": {
"inputs": {
"mesh": [
"218",
0
]
},
"class_type": "Trellis2FillHolesNicelyWithMeshlib",
"_meta": {
"title": "Trellis2 - Fill Holes Nicely With Meshlib"
}
},
"257": {
"inputs": {
"target_face_num": [
"209",
0
],
"method": "Cumesh",
"mesh": [
"250",
0
]
},
"class_type": "Trellis2SimplifyMesh",
"_meta": {
"title": "Trellis2 - Simplify Mesh"
}
}
}

View file

@ -0,0 +1,330 @@
{
"6": {
"inputs": {
"image": "Normal_00001_.png"
},
"class_type": "Trellis2LoadImageWithTransparency",
"_meta": {
"title": "Source Image"
}
},
"39": {
"inputs": {
"modelname": "microsoft/TRELLIS.2-4B",
"backend": "flash_attn",
"device": "cuda",
"low_vram": true,
"keep_models_loaded": false,
"conv_backend": "flex_gemm",
"sparse_backend": "flash_attn",
"use_reconviagen": false
},
"class_type": "Trellis2LoadModel",
"_meta": {
"title": "Trellis2 - LoadModel"
}
},
"161": {
"inputs": {
"remesh_band": 1,
"resolution": 1024,
"remove_floaters": true,
"remove_inner_faces": true,
"mesh": [
"193",
0
]
},
"class_type": "Trellis2ReconstructMeshWithQuad",
"_meta": {
"title": "Trellis2 - Reconstruct Mesh With Quad"
}
},
"193": {
"inputs": {
"max_permieters": 1,
"mesh": [
"217",
0
]
},
"class_type": "Trellis2FillHolesWithCuMesh",
"_meta": {
"title": "Trellis2 - Fill Holes with CuMesh"
}
},
"194": {
"inputs": {
"padding": 10,
"remove_background": false,
"max_size": 1024,
"image": [
"6",
2
]
},
"class_type": "Trellis2PreProcessImage",
"_meta": {
"title": "Trellis2 - PreProcess Image"
}
},
"203": {
"inputs": {
"filename_prefix": [
"219",
0
],
"file_format": "glb",
"trimesh": [
"272",
0
]
},
"class_type": "Trellis2ExportMesh",
"_meta": {
"title": "Trellis2 - Export Mesh"
}
},
"209": {
"inputs": {
"value": 1000000
},
"class_type": "PrimitiveInt",
"_meta": {
"title": "Target Face Number"
}
},
"213": {
"inputs": {
"max_views": 1,
"pipeline": [
"39",
0
],
"image": [
"194",
0
]
},
"class_type": "Trellis2ImageCondGenerator",
"_meta": {
"title": "Trellis2 - ImageCond Generator"
}
},
"214": {
"inputs": {
"seed": 12345,
"sparse_structure_steps": 50,
"sparse_structure_guidance_strength": 7.5,
"sparse_structure_guidance_rescale": 0.01,
"sparse_structure_rescale_t": 5,
"sparse_structure_sampler": "heun",
"sparse_structure_resolution": 64,
"sparse_structure_guidance_interval_start": 0.1,
"sparse_structure_guidance_interval_end": 1,
"fill_holes": true,
"hole_iterations": 1,
"verbose": false,
"dino_lock": 0.6,
"dino_substeps": 2,
"hole_fill_algorithm": "flood_fill",
"dino_foundation_cap": 0.92,
"keep_only_shell": true,
"pipeline": [
"213",
2
],
"image_cond": [
"213",
0
]
},
"class_type": "Trellis2SparseGenerator",
"_meta": {
"title": "Trellis2 - Sparse Generator"
}
},
"215": {
"inputs": {
"resolution": 1024,
"shape_steps": 25,
"shape_guidance_strength": 7.5,
"shape_guidance_rescale": 0.01,
"shape_rescale_t": 3,
"shape_sampler": "heun",
"shape_guidance_interval_start": 0.1,
"shape_guidance_interval_end": 1,
"verbose": false,
"dino_lock": 0.35,
"dino_substeps": 2,
"dino_foundation_cap": 0.92,
"pipeline": [
"214",
2
],
"image_cond": [
"213",
1
],
"coords": [
"214",
0
]
},
"class_type": "Trellis2ShapeGenerator",
"_meta": {
"title": "Trellis2 - Shape Generator"
}
},
"217": {
"inputs": {
"resolution": [
"215",
1
],
"use_tiled_decoder": true,
"pipeline": [
"271",
1
],
"shape_slat": [
"215",
0
],
"texture_slat": [
"271",
0
]
},
"class_type": "Trellis2DecodeLatents",
"_meta": {
"title": "Trellis2 - Decode Latents"
}
},
"218": {
"inputs": {
"target_face_num": [
"209",
0
],
"method": "Cumesh",
"mesh": [
"161",
0
]
},
"class_type": "Trellis2SimplifyMesh",
"_meta": {
"title": "Trellis2 - Simplify Mesh"
}
},
"219": {
"inputs": {
"value": "3DGenStudio"
},
"class_type": "PrimitiveString",
"_meta": {
"title": "Name"
}
},
"232": {
"inputs": {
"model_file": [
"203",
0
],
"image": ""
},
"class_type": "Preview3D",
"_meta": {
"title": "Preview 3D & Animation"
}
},
"250": {
"inputs": {
"mesh": [
"218",
0
]
},
"class_type": "Trellis2FillHolesNicelyWithMeshlib",
"_meta": {
"title": "Trellis2 - Fill Holes Nicely With Meshlib"
}
},
"257": {
"inputs": {
"target_face_num": [
"209",
0
],
"method": "Cumesh",
"mesh": [
"250",
0
]
},
"class_type": "Trellis2SimplifyMesh",
"_meta": {
"title": "Trellis2 - Simplify Mesh"
}
},
"271": {
"inputs": {
"resolution": 1024,
"texture_steps": 25,
"texture_guidance_strength": 7.5,
"texture_guidance_rescale": 0.01,
"texture_rescale_t": 3,
"texture_sampler": "euler",
"texture_guidance_interval_start": 0,
"texture_guidance_interval_end": 0.9,
"verbose": false,
"dino_lock": 0.35,
"dino_substeps": 2,
"dino_foundation_cap": 0.92,
"pipeline": [
"215",
2
],
"image_cond": [
"213",
1
],
"shape_slat": [
"215",
0
]
},
"class_type": "Trellis2TexSlatGenerator",
"_meta": {
"title": "Trellis2 - Tex Slat Generator"
}
},
"272": {
"inputs": {
"mesh_cluster_threshold_cone_half_angle_rad": 60,
"mesh_cluster_refine_iterations": 0,
"mesh_cluster_global_iterations": 1,
"mesh_cluster_smooth_strength": 1,
"texture_size": 2048,
"texture_alpha_mode": "OPAQUE",
"double_side_material": false,
"bake_on_vertices": false,
"use_custom_normals": false,
"inpainting": "telea",
"mesh": [
"257",
0
],
"bvh": [
"217",
1
]
},
"class_type": "Trellis2UnWrapAndRasterizer",
"_meta": {
"title": "Trellis2 - UV Unwrap and Rasterize"
}
}
}

View file

@ -0,0 +1,363 @@
{
"1": {
"inputs": {
"prompt": "Make a gold face",
"clip": [
"33",
0
],
"vae": [
"10",
0
],
"image1": [
"158",
0
]
},
"class_type": "TextEncodeQwenImageEditPlus",
"_meta": {
"title": "TextEncodeQwenImageEditPlus (Positive Prompt)"
}
},
"10": {
"inputs": {
"vae_name": "qwen_image_vae.safetensors"
},
"class_type": "VAELoader",
"_meta": {
"title": "Load VAE"
}
},
"11": {
"inputs": {
"image": "clipspace/clipspace-painted-masked-1777042923407.png [input]"
},
"class_type": "LoadImage",
"_meta": {
"title": "Load Image 1"
}
},
"13": {
"inputs": {
"samples": [
"152",
0
],
"vae": [
"10",
0
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"14": {
"inputs": {
"filename_prefix": "ComfyUI",
"images": [
"13",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
"24": {
"inputs": {
"lora_name": "Qwen-Image-Edit-2511-Lightning-4steps-V1.0-bf16.safetensors",
"strength_model": 1,
"model": [
"160",
0
]
},
"class_type": "LoraLoaderModelOnly",
"_meta": {
"title": "Load LoRA"
}
},
"30": {
"inputs": {
"shift": 3.1,
"model": [
"24",
0
]
},
"class_type": "ModelSamplingAuraFlow",
"_meta": {
"title": "ModelSamplingAuraFlow"
}
},
"33": {
"inputs": {
"clip_name": "qwen_2.5_vl_7b_fp8_scaled.safetensors",
"type": "qwen_image",
"device": "default"
},
"class_type": "CLIPLoader",
"_meta": {
"title": "Load CLIP"
}
},
"39": {
"inputs": {
"prompt": "",
"clip": [
"33",
0
],
"vae": [
"10",
0
],
"image1": [
"158",
0
]
},
"class_type": "TextEncodeQwenImageEditPlus",
"_meta": {
"title": "TextEncodeQwenImageEditPlus (Negative Prompt)"
}
},
"51": {
"inputs": {
"rgthree_comparer": {
"images": [
{
"name": "A",
"selected": true,
"url": "/api/view?filename=rgthree.compare._temp_hulpi_00003_.png&type=temp&subfolder=&rand=0.4879672000794206"
},
{
"name": "B",
"selected": true,
"url": "/api/view?filename=rgthree.compare._temp_hulpi_00004_.png&type=temp&subfolder=&rand=0.17245221973947011"
}
]
},
"image_a": [
"11",
0
],
"image_b": [
"13",
0
]
},
"class_type": "Image Comparer (rgthree)",
"_meta": {
"title": "Image Comparer (rgthree)"
}
},
"119": {
"inputs": {
"pixels": [
"158",
0
],
"vae": [
"10",
0
]
},
"class_type": "VAEEncode",
"_meta": {
"title": "VAE Encode"
}
},
"126": {
"inputs": {
"samples": [
"119",
0
],
"mask": [
"148",
0
]
},
"class_type": "SetLatentNoiseMask",
"_meta": {
"title": "Set Latent Noise Mask"
}
},
"128": {
"inputs": {
"expand": 0,
"incremental_expandrate": 0,
"tapered_corners": true,
"flip_input": false,
"blur_radius": 31.3,
"lerp_alpha": 1,
"decay_factor": 1,
"fill_holes": false,
"mask": [
"161",
0
]
},
"class_type": "GrowMaskWithBlur",
"_meta": {
"title": "Grow Mask With Blur"
}
},
"129": {
"inputs": {
"pixels": [
"138",
0
],
"vae": [
"10",
0
]
},
"class_type": "VAEEncode",
"_meta": {
"title": "VAE Encode"
}
},
"130": {
"inputs": {
"samples": [
"129",
0
],
"vae": [
"10",
0
]
},
"class_type": "VAEDecode",
"_meta": {
"title": "VAE Decode"
}
},
"132": {
"inputs": {
"image": [
"130",
0
]
},
"class_type": "GetImageSize",
"_meta": {
"title": "Get Image Size"
}
},
"138": {
"inputs": {
"upscale_method": "lanczos",
"largest_size": 1024,
"image": [
"11",
0
]
},
"class_type": "ImageScaleToMaxDimension",
"_meta": {
"title": "ImageScaleToMaxDimension"
}
},
"148": {
"inputs": {
"width": [
"132",
0
],
"height": [
"132",
1
],
"keep_proportions": true,
"upscale_method": "lanczos",
"crop": "center",
"mask": [
"128",
0
]
},
"class_type": "ResizeMask",
"_meta": {
"title": "Resize Mask"
}
},
"152": {
"inputs": {
"seed": 258107651719923,
"steps": 4,
"cfg": 1,
"sampler_name": "euler",
"scheduler": "simple",
"denoise": 1,
"model": [
"30",
0
],
"positive": [
"1",
0
],
"negative": [
"39",
0
],
"latent_image": [
"126",
0
]
},
"class_type": "KSampler",
"_meta": {
"title": "KSampler"
}
},
"158": {
"inputs": {
"upscale_method": "lanczos",
"width": [
"132",
0
],
"height": [
"132",
1
],
"crop": "center",
"image": [
"11",
0
]
},
"class_type": "ImageScale",
"_meta": {
"title": "Upscale Image"
}
},
"160": {
"inputs": {
"unet_name": "qwen-image-edit-2511-Q4_K_M.gguf"
},
"class_type": "UnetLoaderGGUF",
"_meta": {
"title": "Unet Loader (GGUF)"
}
},
"161": {
"inputs": {
"image": "Textured - 2048-mask.png",
"channel": "red"
},
"class_type": "LoadImageMask",
"_meta": {
"title": "Load Image (as Mask)"
}
}
}

View file

@ -0,0 +1,98 @@
{
"59": {
"inputs": {
"filename_prefix": [
"62",
0
],
"images": [
"60",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
"60": {
"inputs": {
"model": "RMBG-2.0",
"sensitivity": 1,
"process_res": 1024,
"mask_blur": 0,
"mask_offset": 0,
"invert_output": false,
"refine_foreground": false,
"background": "Alpha",
"background_color": "#000000",
"image": [
"71",
0
]
},
"class_type": "RMBG",
"_meta": {
"title": "Remove Background (RMBG)"
}
},
"61": {
"inputs": {
"string": "NoBg/Image_"
},
"class_type": "StringConstant",
"_meta": {
"title": "String Constant"
}
},
"62": {
"inputs": {
"delimiter": "",
"string1": [
"61",
0
],
"string2": [
"66",
0
]
},
"class_type": "JoinStrings",
"_meta": {
"title": "Join Strings"
}
},
"63": {
"inputs": {
"image": [
"71",
0
]
},
"class_type": "GetImageSize+",
"_meta": {
"title": "🔧 Get Image Size"
}
},
"66": {
"inputs": {
"input1": [
"63",
0
]
},
"class_type": "ConvertAny2String",
"_meta": {
"title": "Convert to String"
}
},
"71": {
"inputs": {
"image": "Image_00001_.png"
},
"class_type": "Trellis2LoadImageWithTransparency",
"_meta": {
"title": "Source Image"
}
}
}

View file

@ -0,0 +1,131 @@
{
"1": {
"inputs": {
"image": "Image_1024_00062_.png"
},
"class_type": "Trellis2LoadImageWithTransparency",
"_meta": {
"title": "Trellis2 - Load Image with Transparency"
}
},
"2": {
"inputs": {
"modelname": "microsoft/TRELLIS.2-4B",
"backend": "flash_attn",
"device": "cuda",
"low_vram": true,
"keep_models_loaded": false,
"conv_backend": "flex_gemm",
"sparse_backend": "flash_attn",
"use_reconviagen": false
},
"class_type": "Trellis2LoadModel",
"_meta": {
"title": "Trellis2 - LoadModel"
}
},
"3": {
"inputs": {
"seed": 12345,
"texture_steps": 25,
"texture_guidance_strength": 7.5,
"texture_guidance_rescale": 0.01,
"texture_rescale_t": 3,
"resolution": 1024,
"texture_size": 2048,
"texture_alpha_mode": "OPAQUE",
"double_side_material": false,
"texture_guidance_interval_start": 0,
"texture_guidance_interval_end": 0.9,
"max_views": 1,
"bake_on_vertices": false,
"use_custom_normals": false,
"mesh_cluster_threshold_cone_half_angle_rad": 60,
"sampler": "heun",
"inpainting": "telea",
"verbose": false,
"dino_lock": 0.35,
"dino_substeps": 2,
"dino_foundation_cap": 0.92,
"pipeline": [
"2",
0
],
"image": [
"18",
0
],
"trimesh": [
"8",
0
]
},
"class_type": "Trellis2MeshTexturing",
"_meta": {
"title": "Trellis2 - Mesh Texturing"
}
},
"8": {
"inputs": {
"glb_path": "SourceMesh.glb"
},
"class_type": "Trellis2LoadMesh",
"_meta": {
"title": "Trellis2 - Load Mesh"
}
},
"11": {
"inputs": {
"filename_prefix": "3DGenStudio",
"file_format": "glb",
"trimesh": [
"34",
0
]
},
"class_type": "Trellis2ExportMesh",
"_meta": {
"title": "Trellis2 - Export Mesh"
}
},
"12": {
"inputs": {
"model_file": [
"11",
0
],
"image": ""
},
"class_type": "Preview3D",
"_meta": {
"title": "Preview 3D & Animation"
}
},
"18": {
"inputs": {
"padding": 5,
"remove_background": false,
"max_size": 1024,
"image": [
"1",
2
]
},
"class_type": "Trellis2PreProcessImage",
"_meta": {
"title": "Trellis2 - PreProcess Image"
}
},
"34": {
"inputs": {
"trimesh": [
"3",
0
]
},
"class_type": "Trellis2SmoothNormals",
"_meta": {
"title": "Trellis2 - Smooth Normals"
}
}
}

View file

@ -0,0 +1,112 @@
{
"1": {
"inputs": {
"sd_model": "stabilityai/sd-turbo",
"invsr_model": "noise_predictor_sd_turbo_v5_diftune.pth",
"dtype": "fp16",
"tiled_vae": true
},
"class_type": "LoadInvSRModels",
"_meta": {
"title": "Load InvSR Models"
}
},
"5": {
"inputs": {
"filename_prefix": [
"22",
0
],
"images": [
"18",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
"18": {
"inputs": {
"num_steps": 1,
"cfg": 1,
"batch_size": 1,
"chopping_batch_size": 6,
"chopping_size": 128,
"color_fix": "none",
"seed": 1132694053,
"invsr_pipe": [
"1",
0
],
"images": [
"29",
0
]
},
"class_type": "InvSRSampler",
"_meta": {
"title": "InvSRSampler"
}
},
"20": {
"inputs": {
"image": [
"18",
0
]
},
"class_type": "GetImageSize+",
"_meta": {
"title": "🔧 Get Image Size"
}
},
"22": {
"inputs": {
"delimiter": "",
"string1": [
"23",
0
],
"string2": [
"26",
0
]
},
"class_type": "JoinStrings",
"_meta": {
"title": "Join Strings"
}
},
"23": {
"inputs": {
"string": "Images/Upscaled_InvSR_"
},
"class_type": "StringConstant",
"_meta": {
"title": "String Constant"
}
},
"26": {
"inputs": {
"input1": [
"20",
0
]
},
"class_type": "ConvertAny2String",
"_meta": {
"title": "Convert to String"
}
},
"29": {
"inputs": {
"image": "1776079347596-175571888.png"
},
"class_type": "LoadImage",
"_meta": {
"title": "Load Image"
}
}
}

View file

@ -0,0 +1,102 @@
{
"1": {
"inputs": {
"image": "Image_312_00001_.png"
},
"class_type": "LoadImage",
"_meta": {
"title": "Load Image"
}
},
"2": {
"inputs": {
"model_name": "4x_foolhardy_Remacri.pth"
},
"class_type": "UpscaleModelLoader",
"_meta": {
"title": "Load Upscale Model"
}
},
"3": {
"inputs": {
"upscale_model": [
"2",
0
],
"image": [
"1",
0
]
},
"class_type": "ImageUpscaleWithModel",
"_meta": {
"title": "Upscale Image (using Model)"
}
},
"4": {
"inputs": {
"filename_prefix": [
"6",
0
],
"images": [
"3",
0
]
},
"class_type": "SaveImage",
"_meta": {
"title": "Save Image"
}
},
"5": {
"inputs": {
"string": "Images/Image_"
},
"class_type": "StringConstant",
"_meta": {
"title": "String Constant"
}
},
"6": {
"inputs": {
"delimiter": "",
"string1": [
"5",
0
],
"string2": [
"9",
0
]
},
"class_type": "JoinStrings",
"_meta": {
"title": "Join Strings"
}
},
"7": {
"inputs": {
"image": [
"3",
0
]
},
"class_type": "GetImageSize+",
"_meta": {
"title": "🔧 Get Image Size"
}
},
"9": {
"inputs": {
"input1": [
"7",
0
]
},
"class_type": "ConvertAny2String",
"_meta": {
"title": "Convert to String"
}
}
}

155
server.js
View file

@ -52,6 +52,7 @@ import {
replaceAssetFileById,
renameAssetEditByFilePath,
saveSettings,
toAssetUrlPath,
setCardProcessingState,
toAbsoluteStoragePath,
toStoredAssetPath,
@ -75,6 +76,7 @@ console.log('DEBUG: DB_FILE is', path.join(DATA_DIR, 'app.db'));
// Middleware
app.use(cors());
app.use('/api/meshes/editor/save', express.json({ limit: '50mb' }));
app.use(express.json({ limit: '10mb' }));
app.use('/assets', express.static(ASSETS_DIR));
@ -276,6 +278,7 @@ const upload = multer({ storage });
const workflowExecutionUpload = multer({ storage: multer.memoryStorage() });
const libraryImportUpload = multer({ storage: multer.memoryStorage() });
const thumbnailUpload = multer({ storage: multer.memoryStorage() });
const meshEditorSaveUpload = multer({ storage: multer.memoryStorage() });
const INITIAL_SCHEMA = {
projects: [
@ -412,7 +415,7 @@ function sanitizeFileSegment(value = '', fallback = 'mesh') {
}
function createMeshEditorFilePath(name = 'mesh') {
return `assets/meshes/edited/${sanitizeFileSegment(name)}-${Date.now()}.obj`;
return `data/assets/meshes/${sanitizeFileSegment(name)}-${Date.now()}.glb`;
}
async function resolveEditableMeshAsset({ assetId, filePath }) {
@ -1803,11 +1806,19 @@ app.post('/api/comfyui/workflows/run', workflowExecutionUpload.any(), async (req
try {
const { projectId, workflowId, cardId, name } = req.body;
const normalizedProjectId = Number(projectId);
const hasProjectId = Number.isFinite(normalizedProjectId) && normalizedProjectId > 0;
const trimmedName = String(name || '').trim();
const inputValues = JSON.parse(req.body.inputValues || '{}');
const persistProcessingCard = String(req.body.persistProcessingCard || '').toLowerCase() !== 'false';
const persistGeneratedAssets = String(req.body.persistGeneratedAssets || '').toLowerCase() !== 'false';
if (!projectId || !workflowId) {
return res.status(400).json({ error: 'projectId and workflowId are required' });
if (!workflowId) {
return res.status(400).json({ error: 'workflowId is required' });
}
if (!hasProjectId && (persistProcessingCard || persistGeneratedAssets)) {
return res.status(400).json({ error: 'projectId is required when persisting workflow results' });
}
const workflowRecord = await getWorkflowRecordById(Number(workflowId));
@ -1817,8 +1828,8 @@ app.post('/api/comfyui/workflows/run', workflowExecutionUpload.any(), async (req
return res.status(404).json({ error: 'ComfyUI workflow not found in library' });
}
processingProjectId = Number(projectId);
processingCardId = cardId || randomUUID();
processingProjectId = hasProjectId ? normalizedProjectId : null;
processingCardId = persistProcessingCard ? (cardId || randomUUID()) : null;
processingCardName = trimmedName || workflow.name;
processingWorkflowId = workflow.id;
processingWorkflowName = workflow.name;
@ -1842,12 +1853,16 @@ app.post('/api/comfyui/workflows/run', workflowExecutionUpload.any(), async (req
}
if (['image', 'mesh'].includes(parameterValueType)) {
if (!hasProjectId) {
throw new Error(`A project-linked reference is required for ${parameter.name}`);
}
const sourceReference = isPlainObject(fileMarker)
? (fileMarker.source || fileMarker.filePath || fileMarker.assetId)
: fileMarker;
const resolvedSource = parameterValueType === 'mesh'
? await resolveProjectMeshSource(Number(projectId), sourceReference)
: await resolveProjectImageSource(Number(projectId), sourceReference);
? await resolveProjectMeshSource(normalizedProjectId, sourceReference)
: await resolveProjectImageSource(normalizedProjectId, sourceReference);
if (!resolvedSource?.asset || resolvedSource.asset.type !== parameterValueType) {
throw new Error(`A reference file is required for ${parameter.name}`);
@ -1870,20 +1885,22 @@ app.post('/api/comfyui/workflows/run', workflowExecutionUpload.any(), async (req
executionPromptId = String(req.body.promptId || '').trim() || randomUUID();
processingStartedAt = Date.now();
await updateCardProcessingSnapshot(processingProjectId, processingCardId, {
columnName: 'Images',
name: processingCardName,
status: 'processing',
progressPercent: 0,
detail: 'Preparing ComfyUI workflow',
currentNodeLabel: 'Waiting for ComfyUI execution to start',
promptId: executionPromptId,
source: 'ComfyUI',
operationType: 'workflow',
workflowId: processingWorkflowId,
workflowName: processingWorkflowName,
startedAt: processingStartedAt
});
if (persistProcessingCard) {
await updateCardProcessingSnapshot(processingProjectId, processingCardId, {
columnName: 'Images',
name: processingCardName,
status: 'processing',
progressPercent: 0,
detail: 'Preparing ComfyUI workflow',
currentNodeLabel: 'Waiting for ComfyUI execution to start',
promptId: executionPromptId,
source: 'ComfyUI',
operationType: 'workflow',
workflowId: processingWorkflowId,
workflowName: processingWorkflowName,
startedAt: processingStartedAt
});
}
executionMonitor = createComfyExecutionMonitor(baseUrl, {
clientId: executionClientId,
@ -1891,6 +1908,10 @@ app.post('/api/comfyui/workflows/run', workflowExecutionUpload.any(), async (req
workflowJson: promptWorkflow,
selectedOutputs: workflow.outputs,
onProgress: (payload) => {
if (!persistProcessingCard) {
return;
}
updateCardProcessingSnapshot(processingProjectId, processingCardId, {
columnName: 'Images',
name: processingCardName,
@ -1930,7 +1951,7 @@ app.post('/api/comfyui/workflows/run', workflowExecutionUpload.any(), async (req
return res.status(502).json({ error: 'The ComfyUI workflow finished but no compatible files were returned' });
}
const imageCardId = processingCardId;
const imageCardId = persistProcessingCard ? processingCardId : null;
const baseTimestamp = Date.now();
const generatedAssets = [];
@ -1949,13 +1970,9 @@ app.post('/api/comfyui/workflows/run', workflowExecutionUpload.any(), async (req
: { width: 0, height: 0 };
const filename = `${Date.now()}-${Math.round(Math.random() * 1E9)}.${extension}`;
const storedFilePath = toStoredAssetPath(inferredAssetType, filename);
const absoluteFilePath = toAbsoluteStoragePath(storedFilePath);
await fs.mkdir(path.dirname(absoluteFilePath), { recursive: true });
await fs.writeFile(absoluteFilePath, downloadedFile.buffer);
generatedAssets.push(await createProjectAsset({
projectId: Number(projectId),
const generatedAssetPayload = {
projectId: normalizedProjectId,
type: inferredAssetType,
name: inferredAssetType === 'mesh'
? processingCardName
@ -1974,15 +1991,51 @@ app.post('/api/comfyui/workflows/run', workflowExecutionUpload.any(), async (req
outputNodeId: workflowFile.nodeId,
outputFilename: workflowFile.filename,
savedOutputs: workflowFiles.length,
cardId: imageCardId
...(imageCardId ? { cardId: imageCardId } : {})
},
createdAt: baseTimestamp + index
}));
};
if (persistGeneratedAssets) {
const absoluteFilePath = toAbsoluteStoragePath(storedFilePath);
await fs.mkdir(path.dirname(absoluteFilePath), { recursive: true });
await fs.writeFile(absoluteFilePath, downloadedFile.buffer);
const persistedAsset = await createProjectAsset(generatedAssetPayload);
generatedAssets.push({
...persistedAsset,
url: `http://localhost:${PORT}/assets/${encodeURI(toAssetUrlPath(storedFilePath))}`,
outputKey: workflowFile.outputKey,
outputNodeId: workflowFile.nodeId,
expectedType: workflowFile.expectedType,
temporary: false
});
continue;
}
generatedAssets.push({
type: generatedAssetPayload.type,
name: generatedAssetPayload.name,
filename: workflowFile.filename,
filePath: workflowFile.filename,
url: `data:${downloadedFile.contentType};base64,${downloadedFile.buffer.toString('base64')}`,
width: generatedAssetPayload.width,
height: generatedAssetPayload.height,
metadata: generatedAssetPayload.metadata,
createdAt: generatedAssetPayload.createdAt,
outputKey: workflowFile.outputKey,
outputNodeId: workflowFile.nodeId,
expectedType: workflowFile.expectedType,
temporary: true
});
}
await clearCardProcessingState(processingProjectId, processingCardId, {
name: processingCardName
});
if (persistProcessingCard) {
await clearCardProcessingState(processingProjectId, processingCardId, {
name: processingCardName
});
}
res.status(201).json(generatedAssets);
} catch (err) {
@ -2626,13 +2679,15 @@ app.get('/api/assets/library', async (req, res) => {
app.delete('/api/assets/library', async (req, res) => {
try {
const { type, filename } = req.query;
const { type, filename, force } = req.query;
if (!type || !filename) {
return res.status(400).json({ error: 'type and filename are required' });
}
const result = await deleteLibraryAssetByFilePath(String(type), String(filename));
const result = await deleteLibraryAssetByFilePath(String(type), String(filename), {
force: String(force || '').toLowerCase() === 'true'
});
if (result.status === 'linked') {
return res.status(409).json({
@ -2832,12 +2887,17 @@ app.post('/api/assets/:id/thumbnail', thumbnailUpload.single('thumbnail'), async
}
});
app.post('/api/meshes/editor/save', async (req, res) => {
app.post('/api/meshes/editor/save', meshEditorSaveUpload.single('meshFile'), async (req, res) => {
try {
const { assetId, filePath, name, saveMode = 'replace', objText } = req.body;
const { assetId, filePath, name, saveMode = 'replace' } = req.body || {};
const meshFile = req.file;
if (!objText || !String(objText).trim()) {
return res.status(400).json({ error: 'objText is required' });
if (!meshFile?.buffer?.length) {
return res.status(400).json({ error: 'meshFile is required' });
}
if (!assetId && !filePath) {
return res.status(400).json({ error: 'assetId or filePath is required' });
}
if (!['replace', 'version'].includes(saveMode)) {
@ -2855,11 +2915,16 @@ app.post('/api/meshes/editor/save', async (req, res) => {
}
const nextName = sanitizeDisplayName(name || sourceAsset.name, sourceAsset.name || 'Mesh');
const nextFilePath = createMeshEditorFilePath(nextName);
const absoluteMeshPath = toAbsoluteStoragePath(nextFilePath);
const sourceExtension = path.extname(String(sourceAsset.filePath || '')).toLowerCase();
const storedMeshPath = saveMode === 'version'
? toStoredAssetPath('mesh', createMeshEditorFilePath(nextName))
: (sourceExtension === '.glb'
? toStoredAssetPath('mesh', sourceAsset.filePath)
: toStoredAssetPath('mesh', createMeshEditorFilePath(nextName)));
const absoluteMeshPath = toAbsoluteStoragePath(storedMeshPath);
await fs.mkdir(path.dirname(absoluteMeshPath), { recursive: true });
await fs.writeFile(absoluteMeshPath, String(objText), 'utf8');
await fs.writeFile(absoluteMeshPath, meshFile.buffer);
const metadata = {
...JSON.parse(sourceAsset.metadata || '{}'),
@ -2874,7 +2939,7 @@ app.post('/api/meshes/editor/save', async (req, res) => {
assetId: sourceAsset.id,
name: nextName,
type: 'mesh',
filePath: nextFilePath,
filePath: storedMeshPath,
width: 0,
height: 0,
metadata,
@ -2883,13 +2948,13 @@ app.post('/api/meshes/editor/save', async (req, res) => {
: await replaceAssetFileById(sourceAsset.id, {
name: nextName,
type: 'mesh',
filePath: nextFilePath,
filePath: storedMeshPath,
width: 0,
height: 0,
metadata
});
if (saveMode === 'replace' && sourceAsset.filePath && sourceAsset.filePath !== savedAsset.filePath) {
if (saveMode === 'replace' && sourceAsset.filePath && sourceAsset.filePath !== storedMeshPath) {
await fs.rm(toAbsoluteStoragePath(sourceAsset.filePath), { force: true }).catch(() => null);
}

View file

@ -454,10 +454,19 @@ export function ProjectProvider({ children }) {
}
const saveMeshEdit = async (payload) => {
const formData = new FormData()
formData.append('assetId', payload?.assetId ?? '')
formData.append('filePath', payload?.filePath ?? '')
formData.append('name', payload?.name ?? '')
formData.append('saveMode', payload?.saveMode ?? 'replace')
if (payload?.meshFile) {
formData.append('meshFile', payload.meshFile)
}
const res = await fetch(`${API_BASE}/meshes/editor/save`, {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify(payload)
body: formData
})
const data = await res.json().catch(() => ({}))
@ -499,8 +508,11 @@ export function ProjectProvider({ children }) {
return data
}
const deleteLibraryAsset = async ({ type, filename }) => {
const deleteLibraryAsset = async ({ type, filename, force = false }) => {
const params = new URLSearchParams({ type, filename })
if (force) {
params.set('force', 'true')
}
const res = await fetch(`${API_BASE}/assets/library?${params.toString()}`, {
method: 'DELETE'
})
@ -648,7 +660,9 @@ export function ProjectProvider({ children }) {
const formData = new FormData()
const inputValues = {}
formData.append('projectId', projectId)
if (projectId !== null && projectId !== undefined && String(projectId) !== '') {
formData.append('projectId', projectId)
}
formData.append('workflowId', workflowData.workflowId)
if (workflowData.clientId) {
formData.append('clientId', workflowData.clientId)
@ -662,6 +676,12 @@ export function ProjectProvider({ children }) {
if (workflowData.name) {
formData.append('name', workflowData.name)
}
if (workflowData.persistProcessingCard === false) {
formData.append('persistProcessingCard', 'false')
}
if (workflowData.persistGeneratedAssets === false) {
formData.append('persistGeneratedAssets', 'false')
}
Object.entries(workflowData.inputs || {}).forEach(([key, value]) => {
if (typeof File !== 'undefined' && value instanceof File) {

View file

@ -515,7 +515,7 @@
}
.assets-grid--meshes {
grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
grid-template-columns: repeat(auto-fill, minmax(265px, 1fr));
}
.asset-card {
@ -843,6 +843,11 @@
color: var(--on-primary);
}
.assets-dialog__btn--danger {
background: #a93232;
color: #fff;
}
.assets-dialog__btn:disabled {
opacity: 0.5;
cursor: not-allowed;

View file

@ -138,11 +138,13 @@ function getAssetChildren(asset) {
function buildMeshEditorPath(asset, returnTo = '/assets') {
const assetIdMatch = String(asset.id || '').match(/^library:(\d+)$/) || String(asset.id || '').match(/^(\d+)$/)
const inheritedProjectId = asset.projectId || asset.parentProjectId || null
const query = new URLSearchParams({
assetId: assetIdMatch?.[1] || '',
filePath: asset.filePath || asset.filename || '',
url: asset.url || '',
name: asset.name || 'Mesh',
projectId: inheritedProjectId ? String(inheritedProjectId) : '',
returnTo
})
@ -586,6 +588,7 @@ export default function AssetsPage() {
} catch (err) {
if (err.status === 409) {
setLinkedAssetDialog({
asset,
assetName: asset.name,
projectId: err.details?.projectId,
projectName: err.details?.projectName || null
@ -610,6 +613,39 @@ export default function AssetsPage() {
setLinkedAssetDialog(null)
}
const handleForceDeleteLinkedAsset = async () => {
if (!linkedAssetDialog?.asset) {
return
}
const asset = linkedAssetDialog.asset
const assetKey = `${asset.type}:${asset.filename}`
setDeletingAssetKey(assetKey)
setImportFeedback(null)
try {
await deleteLibraryAsset({
type: asset.type,
filename: asset.filename,
force: true
})
await loadLibrary()
setLinkedAssetDialog(null)
setImportFeedback({
type: 'success',
message: `${asset.name} deleted.`
})
} catch (err) {
setImportFeedback({
type: 'error',
message: err.message || 'Failed to delete asset.'
})
} finally {
setDeletingAssetKey(null)
}
}
const handleDeleteWorkflow = async (workflow) => {
setDeletingWorkflowId(workflow.id)
setWorkflowFeedback('')
@ -772,6 +808,14 @@ export default function AssetsPage() {
<button type="button" className="assets-dialog__btn assets-dialog__btn--secondary" onClick={() => setLinkedAssetDialog(null)}>
Close
</button>
<button
type="button"
className="assets-dialog__btn assets-dialog__btn--danger"
onClick={handleForceDeleteLinkedAsset}
disabled={deletingAssetKey === `${linkedAssetDialog.asset?.type}:${linkedAssetDialog.asset?.filename}`}
>
Delete Anyway
</button>
<button type="button" className="assets-dialog__btn assets-dialog__btn--primary" onClick={handleGoToProject} disabled={!linkedAssetDialog.projectId}>
Go to project
</button>
@ -859,9 +903,18 @@ export default function AssetsPage() {
<div className="asset-edits-grid">
{getAssetChildren(meshVersionsAsset).map((version, index) => (
<article key={`${version.filePath}-${index}`} className="asset-edit-card">
<div className="asset-edit-card__preview asset-card__preview--mesh">
<span className="material-symbols-outlined asset-card__mesh-icon">view_in_ar</span>
<span className="asset-card__mesh-label font-label">VERSION</span>
<div className={`asset-edit-card__preview asset-card__preview--mesh ${version.thumbnailUrl ? 'asset-card__preview--mesh-thumbnail' : ''}`}>
{version.thumbnailUrl ? (
<>
<img src={version.thumbnailUrl} alt={`${version.name?.trim() || `Version ${index + 1}`} thumbnail`} className="asset-card__image" />
<span className="asset-card__mesh-tag font-label">VERSION</span>
</>
) : (
<>
<span className="material-symbols-outlined asset-card__mesh-icon">view_in_ar</span>
<span className="asset-card__mesh-label font-label">VERSION</span>
</>
)}
</div>
<div className="asset-edit-card__body">
<div className="asset-edit-card__details">

View file

@ -40,7 +40,7 @@
align-items: center;
justify-content: space-between;
gap: 1rem;
padding: 1rem 1.25rem;
padding: 0.55rem 0.85rem;
}
.mesh-editor-toolbar__group {
@ -54,22 +54,22 @@
.mesh-editor-toolbar__title-group {
display: flex;
flex-direction: column;
gap: 0.25rem;
gap: 0;
}
.mesh-editor-toolbar__name-field {
min-width: 260px;
max-width: 360px;
min-width: 220px;
max-width: 300px;
display: flex;
flex-direction: column;
gap: 0.45rem;
gap: 0.3rem;
}
.mesh-editor-toolbar__save-panel {
display: flex;
flex-direction: column;
gap: 0.45rem;
min-width: 220px;
gap: 0.3rem;
min-width: 200px;
}
.mesh-editor-toolbar__save-actions {
@ -102,14 +102,14 @@
}
.mesh-editor-toolbar__back {
padding: 0.7rem 0.9rem;
padding: 0.55rem 0.8rem;
border-radius: var(--radius-md);
background: rgba(143, 245, 255, 0.1);
color: var(--primary);
}
.mesh-editor-page__title {
font-size: 1.6rem;
font-size: 1.28rem;
color: var(--on-surface);
}
@ -123,7 +123,7 @@
flex: 1;
min-height: 0;
display: grid;
grid-template-columns: 280px minmax(0, 1fr);
grid-template-columns: 250px minmax(0, 1fr);
gap: 1rem;
align-items: start;
}
@ -136,10 +136,15 @@
}
.mesh-editor-panel {
display: flex;
flex-direction: column;
gap: 0.75rem;
padding: 1rem;
display: flex;
flex-direction: column;
gap: 0.75rem;
padding: 1rem;
}
.mesh-editor-panel--compact {
gap: 0.9rem;
padding: 0.9rem;
}
.mesh-editor-panel__label {
@ -156,14 +161,121 @@
.mesh-editor-panel__input {
width: 100%;
min-height: 44px;
padding: 0.8rem 0.9rem;
min-height: 38px;
padding: 0.65rem 0.8rem;
border-radius: var(--radius-md);
border: 1px solid rgba(71, 72, 74, 0.18);
background: var(--surface-container-high);
color: var(--on-surface);
}
.mesh-editor-panel__select {
appearance: none;
}
.mesh-editor-panel__textarea {
min-height: 92px;
resize: vertical;
}
.mesh-editor-panel__section {
display: flex;
flex-direction: column;
gap: 0.7rem;
}
.mesh-editor-panel__section-title {
font-size: 0.72rem;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--on-surface-variant);
}
.mesh-editor-panel__notes {
display: flex;
flex-direction: column;
gap: 0.45rem;
}
.mesh-editor-mode-menu {
display: grid;
grid-template-columns: repeat(2, minmax(0, 1fr));
gap: 0.55rem;
}
.mesh-editor-mode-btn,
.mesh-editor-icon-btn {
display: flex;
align-items: center;
justify-content: center;
gap: 0.4rem;
min-height: 42px;
padding: 0.65rem 0.75rem;
border: none;
border-radius: var(--radius-md);
background: var(--surface-container-high);
color: var(--on-surface-variant);
cursor: pointer;
transition: background var(--transition-base), color var(--transition-base), opacity var(--transition-base), transform var(--transition-base);
}
.mesh-editor-mode-btn {
flex-direction: column;
font-size: 0.76rem;
}
.mesh-editor-mode-btn .material-symbols-outlined,
.mesh-editor-icon-btn .material-symbols-outlined {
font-size: 1.15rem;
}
.mesh-editor-mode-btn--active,
.mesh-editor-icon-btn--active {
background: rgba(143, 245, 255, 0.14);
color: var(--primary);
}
.mesh-editor-icon-grid {
display: grid;
gap: 0.55rem;
}
.mesh-editor-icon-grid--double {
grid-template-columns: repeat(2, minmax(0, 1fr));
}
.mesh-editor-icon-btn {
flex-direction: column;
font-size: 0.75rem;
text-align: center;
}
.mesh-editor-range-field,
.mesh-editor-workflow-field {
display: flex;
flex-direction: column;
gap: 0.4rem;
color: var(--on-surface-variant);
font-size: 0.78rem;
}
.mesh-editor-range-field strong {
color: var(--on-surface);
font-size: 0.76rem;
}
.mesh-editor-range-field input[type='range'] {
width: 100%;
}
.mesh-editor-texture-workflow-meta {
display: flex;
flex-direction: column;
gap: 0.25rem;
font-size: 0.74rem;
color: var(--on-surface-variant);
}
.mesh-editor-toggle-group,
.mesh-editor-actions {
display: flex;
@ -197,8 +309,8 @@
.mesh-editor-toggle,
.mesh-editor-btn {
min-height: 40px;
padding: 0.7rem 0.9rem;
min-height: 38px;
padding: 0.6rem 0.8rem;
border-radius: var(--radius-md);
background: var(--surface-container-high);
color: var(--on-surface-variant);
@ -219,8 +331,15 @@
color: var(--secondary);
}
.mesh-editor-btn--ghost {
background: rgba(255, 255, 255, 0.04);
color: var(--on-surface);
}
.mesh-editor-btn:disabled,
.mesh-editor-toggle:disabled {
.mesh-editor-toggle:disabled,
.mesh-editor-mode-btn:disabled,
.mesh-editor-icon-btn:disabled {
opacity: 0.45;
cursor: not-allowed;
}
@ -240,7 +359,7 @@
.mesh-editor-canvas-shell {
position: relative;
min-height: 760px;
height: clamp(760px, calc(100vh - 210px), 1400px);
height: clamp(760px, calc(100vh - 185px), 1400px);
overflow: hidden;
border-radius: var(--radius-xl);
border: 1px solid rgba(71, 72, 74, 0.18);
@ -249,6 +368,10 @@
linear-gradient(180deg, rgba(24, 26, 29, 0.96), rgba(16, 17, 20, 0.98));
}
.mesh-editor-canvas-shell--texturing {
cursor: crosshair;
}
.mesh-editor-selection-box {
position: absolute;
z-index: 3;
@ -258,6 +381,22 @@
pointer-events: none;
}
.mesh-editor-projection-mask {
position: absolute;
inset: 0;
z-index: 2;
width: 100%;
height: 100%;
pointer-events: none;
opacity: 0;
transition: opacity var(--transition-base);
mix-blend-mode: screen;
}
.mesh-editor-projection-mask--active {
opacity: 0.42;
}
.mesh-editor-canvas-shell canvas {
display: block;
width: 100% !important;
@ -298,7 +437,7 @@
}
.mesh-editor-workspace {
grid-template-columns: 240px minmax(0, 1fr);
grid-template-columns: 220px minmax(0, 1fr);
}
}

File diff suppressed because it is too large Load diff

View file

@ -18,6 +18,14 @@ const STATUS_MAP = {
}
const CHANGE_LOG_ENTRIES = [
{
version: 'v0.2.0',
date: '2026-04-24',
items: [
'Added Inpainting function in Mesh Editor',
'Added ComfyUI workflow examples'
],
},
{
version: 'v0.1.1',
date: '2026-04-21',

View file

@ -1,4 +1,5 @@
import * as THREE from 'three'
import { GLTFExporter } from 'three/examples/jsm/exporters/GLTFExporter.js'
import { FBXLoader } from 'three/examples/jsm/loaders/FBXLoader.js'
import { GLTFLoader } from 'three/examples/jsm/loaders/GLTFLoader.js'
import { OBJLoader } from 'three/examples/jsm/loaders/OBJLoader.js'
@ -1177,3 +1178,38 @@ export function exportGeometryToObj(geometry) {
return `${lines.join('\n')}\n`
}
export function exportGeometryToGlb(geometry) {
return new Promise((resolve, reject) => {
if (!geometry) {
reject(new Error('Geometry is required to export a GLB mesh.'))
return
}
const exporter = new GLTFExporter()
const exportMesh = new THREE.Mesh(
geometry.clone(),
new THREE.MeshStandardMaterial({ color: '#cfd8ff', metalness: 0.08, roughness: 0.62 })
)
exportMesh.name = 'MeshEditorResult'
exporter.parse(
exportMesh,
result => {
if (!(result instanceof ArrayBuffer)) {
reject(new Error('Failed to export the mesh as a binary GLB file.'))
return
}
resolve(result)
},
error => {
reject(error instanceof Error ? error : new Error('Failed to export the mesh as GLB.'))
},
{
binary: true,
onlyVisible: false
}
)
})
}

1115
src/utils/meshTexturing.js Normal file

File diff suppressed because it is too large Load diff

View file

@ -329,16 +329,20 @@ function mapProjectRow(row) {
function mapChildAssetRow(row) {
const metadata = parseJson(row.metadata, {});
const thumbnail = row.thumbnail ? toAssetUrlPath(row.thumbnail) : null;
return {
id: row.id,
parentId: row.parentId ?? null,
parentProjectId: row.parentProjectId ?? null,
editId: metadata?.editId || null,
name: row.name || '',
filePath: row.filePath,
filename: toAssetUrlPath(row.filePath),
width: row.width ?? 0,
height: row.height ?? 0,
thumbnailPath: row.thumbnail || null,
thumbnail,
metadata,
createdAt: row.creationDate,
isEdit: true
@ -494,7 +498,8 @@ function groupChildAssetsByParentFilePath(rows = [], port = null) {
const childWithUrl = port
? {
...childAsset,
url: `http://localhost:${port}/assets/${encodeURI(childAsset.filename)}`
url: `http://localhost:${port}/assets/${encodeURI(childAsset.filename)}`,
thumbnailUrl: childAsset.thumbnail ? `http://localhost:${port}/assets/${encodeURI(childAsset.thumbnail)}` : null
}
: childAsset;
@ -513,9 +518,17 @@ async function listChildAssetsByParentFilePaths(db, parentFilePaths = [], assetT
return await all(
db,
`SELECT child.id, child.parentId, child.name, child.filePath, child.creationDate, child.metadata,
`SELECT child.id, child.parentId, child.name, child.filePath, child.creationDate, child.metadata, child.thumbnail,
child.width, child.height,
parent.filePath AS parentFilePath
parent.filePath AS parentFilePath,
(
SELECT c.projectId
FROM Cards_Assets ca
JOIN Cards c ON c.id = ca.cardId
WHERE ca.assetId = parent.id
ORDER BY c.creationDate DESC, c.id DESC
LIMIT 1
) AS parentProjectId
FROM Assets child
JOIN Assets parent ON parent.id = child.parentId
JOIN AssetTypes childType ON childType.id = child.assetTypeId
@ -2382,7 +2395,7 @@ export async function deleteAssetEditByFilePath(filePath) {
};
}
export async function deleteLibraryAssetByFilePath(type, filePath) {
export async function deleteLibraryAssetByFilePath(type, filePath, { force = false } = {}) {
const db = await getDb();
const storedFilePath = toStoredAssetPath(type, filePath);
const normalizedType = normalizeAssetTypeName(type);
@ -2402,7 +2415,7 @@ export async function deleteLibraryAssetByFilePath(type, filePath) {
[normalizedType, storedFilePath]
);
if (linkedProject) {
if (linkedProject && !force) {
return {
status: 'linked',
projectId: linkedProject.projectId,
@ -2438,6 +2451,13 @@ export async function deleteLibraryAssetByFilePath(type, filePath) {
: [];
if (childAssetRows.length > 0) {
await run(
db,
`DELETE FROM Cards_Assets
WHERE assetId IN (${childAssetRows.map(() => '?').join(', ')})`,
childAssetRows.map(childAsset => childAsset.id)
);
await run(
db,
`DELETE FROM Assets
@ -2446,10 +2466,47 @@ export async function deleteLibraryAssetByFilePath(type, filePath) {
);
}
const assetIds = assets.map(asset => asset.id);
const linkedCardRows = assetIds.length > 0
? await all(
db,
`SELECT cardId, assetId
FROM Cards_Assets
WHERE assetId IN (${assetIds.map(() => '?').join(', ')})`,
assetIds
)
: [];
if (linkedCardRows.length > 0) {
await run(
db,
`DELETE FROM Cards_Assets
WHERE assetId IN (${assetIds.map(() => '?').join(', ')})`,
assetIds
);
}
if (assetIds.length > 0) {
await run(
db,
`UPDATE Nodes
SET assetId = NULL
WHERE assetId IN (${assetIds.map(() => '?').join(', ')})`,
assetIds
);
}
for (const asset of assets) {
await run(db, 'DELETE FROM Assets WHERE id = ?', [asset.id]);
}
const affectedCardIds = [...new Set(linkedCardRows.map(row => row.cardId).filter(cardId => Number.isInteger(cardId)))];
for (const cardId of affectedCardIds) {
await normalizeCardAssetPositions(cardId);
}
await deleteCardsIfEmpty(affectedCardIds);
await fs.rm(toAbsoluteStoragePath(storedFilePath), { force: true }).catch(() => null);
for (const asset of assets) {
@ -2631,7 +2688,15 @@ export async function listLibraryAssetsByType(type, port) {
const canonicalAssetRows = candidateStoredPaths.length > 0
? await all(
db,
`SELECT a.id, a.name, a.filePath, a.thumbnail, a.width, a.height, a.creationDate
`SELECT a.id, a.name, a.filePath, a.thumbnail, a.width, a.height, a.creationDate,
(
SELECT c.projectId
FROM Cards_Assets ca
JOIN Cards c ON c.id = ca.cardId
WHERE ca.assetId = a.id
ORDER BY c.creationDate DESC, c.id DESC
LIMIT 1
) AS projectId
FROM Assets a
JOIN AssetTypes at ON at.id = a.assetTypeId
WHERE at.name = ?
@ -2651,6 +2716,7 @@ export async function listLibraryAssetsByType(type, port) {
}, {});
const childAssetRows = await listChildAssetsByParentFilePaths(db, candidateStoredPaths, normalizeAssetTypeName(type));
const childFilePaths = new Set(childAssetRows.map(row => row.filePath));
const childrenBySourceFilePath = groupChildAssetsByParentFilePath(childAssetRows, port);
@ -2684,6 +2750,7 @@ export async function listLibraryAssetsByType(type, port) {
name: canonicalAsset?.name || row.name,
filename,
filePath: row.filePath,
projectId: canonicalAsset?.projectId ?? null,
type,
extension: path.extname(filename).replace('.', '').toUpperCase() || type.toUpperCase(),
url: `http://localhost:${port}/assets/${encodeURI(filename)}`,
@ -2703,7 +2770,12 @@ export async function listLibraryAssetsByType(type, port) {
const knownFilenames = new Set(dbAssets.map(asset => asset.filename));
const fileAssets = fileEntries
.filter(entry => !knownFilenames.has(`${subdirectory}/${entry.name}`))
.filter(entry => {
const filename = `${subdirectory}/${entry.name}`;
const storedFilePath = toStoredAssetPath(type, filename);
return !knownFilenames.has(filename) && !childFilePaths.has(storedFilePath);
})
.sort((left, right) => right.name.localeCompare(left.name))
.map(entry => {
const filename = `${subdirectory}/${entry.name}`;
@ -2717,6 +2789,7 @@ export async function listLibraryAssetsByType(type, port) {
name: canonicalAsset?.name || entry.name,
filename,
filePath: storedFilePath,
projectId: canonicalAsset?.projectId ?? null,
type,
extension: path.extname(entry.name).replace('.', '').toUpperCase() || type.toUpperCase(),
url: `http://localhost:${port}/assets/${encodeURI(filename)}`,