diff --git a/example_workflows/hy3d_multiview_example_01.json b/example_workflows/hy3d_multiview_example_01.json new file mode 100644 index 0000000..2926f60 --- /dev/null +++ b/example_workflows/hy3d_multiview_example_01.json @@ -0,0 +1,3730 @@ +{ + "id": "5d70fb4d-16ed-44a1-b502-bf201947d5ef", + "revision": 0, + "last_node_id": 194, + "last_link_id": 350, + "nodes": [ + { + "id": 64, + "type": "ImageCompositeMasked", + "pos": [ + -993.1152954101562, + 1152.86962890625 + ], + "size": [ + 315, + 146 + ], + "flags": {}, + "order": 50, + "mode": 0, + "inputs": [ + { + "name": "destination", + "type": "IMAGE", + "link": 330 + }, + { + "name": "source", + "type": "IMAGE", + "link": 241 + }, + { + "name": "mask", + "shape": 7, + "type": "MASK", + "link": 231 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 99 + ] + } + ], + "properties": { + "Node name for S&R": "ImageCompositeMasked" + }, + "widgets_values": [ + 0, + 0, + false + ] + }, + { + "id": 116, + "type": "PreviewImage", + "pos": [ + 940, + 1490 + ], + "size": [ + 534.0819091796875, + 375.8153991699219 + ], + "flags": {}, + "order": 53, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 199 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 119, + "type": "UpscaleModelLoader", + "pos": [ + 2335.203857421875, + 728.801025390625 + ], + "size": [ + 315, + 58 + ], + "flags": {}, + "order": 0, + "mode": 2, + "inputs": [], + "outputs": [ + { + "name": "UPSCALE_MODEL", + "type": "UPSCALE_MODEL", + "links": [ + 204 + ] + } + ], + "properties": { + "Node name for S&R": "UpscaleModelLoader" + }, + "widgets_values": [ + "4x_foolhardy_Remacri.pth" + ] + }, + { + "id": 98, + "type": "Hy3DApplyTexture", + "pos": [ + 3778.609130859375, + 1248.801025390625 + ], + "size": [ + 226.79998779296875, + 46 + ], + "flags": {}, + "order": 69, + "mode": 0, + "inputs": [ + { + "name": "texture", + "type": "IMAGE", + "link": 185 + }, + { + "name": "renderer", + "type": "MESHRENDER", + "link": 223 + } + ], + "outputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "slot_index": 0, + "links": [ + 163 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DApplyTexture" + }, + "widgets_values": [] + }, + { + "id": 104, + "type": "CV2InpaintTexture", + "pos": [ + 3428.609130859375, + 1058.801025390625 + ], + "size": [ + 239.40000915527344, + 102 + ], + "flags": {}, + "order": 68, + "mode": 0, + "inputs": [ + { + "name": "texture", + "type": "IMAGE", + "link": 220 + }, + { + "name": "mask", + "type": "MASK", + "link": 222 + } + ], + "outputs": [ + { + "name": "texture", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 185, + 209 + ] + } + ], + "properties": { + "Node name for S&R": "CV2InpaintTexture" + }, + "widgets_values": [ + 3, + "ns" + ] + }, + { + "id": 126, + "type": "PreviewImage", + "pos": [ + 3198.609130859375, + 1378.801025390625 + ], + "size": [ + 491.2337341308594, + 523.9635620117188 + ], + "flags": {}, + "order": 67, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 221 + } + ], + "outputs": [], + "title": "Preview Image: vertex inpainted texture", + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 120, + "type": "Note", + "pos": [ + 2725.203857421875, + 738.801025390625 + ], + "size": [ + 354.4071044921875, + 125.7635726928711 + ], + "flags": {}, + "order": 1, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "You can upscale the multiviews at this point for more texture details" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 118, + "type": "ImageUpscaleWithModel", + "pos": [ + 2315.634033203125, + 851.9907836914062 + ], + "size": [ + 340.20001220703125, + 46 + ], + "flags": {}, + "order": 63, + "mode": 2, + "inputs": [ + { + "name": "upscale_model", + "type": "UPSCALE_MODEL", + "link": 204 + }, + { + "name": "image", + "type": "IMAGE", + "link": 205 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": null + } + ], + "properties": { + "Node name for S&R": "ImageUpscaleWithModel" + }, + "widgets_values": [] + }, + { + "id": 92, + "type": "Hy3DBakeFromMultiview", + "pos": [ + 2662.9970703125, + 1228.801025390625 + ], + "size": [ + 302.4000244140625, + 66 + ], + "flags": {}, + "order": 64, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 203 + }, + { + "name": "renderer", + "type": "MESHRENDER", + "link": 339 + }, + { + "name": "camera_config", + "shape": 7, + "type": "HY3DCAMERA", + "link": 337 + } + ], + "outputs": [ + { + "name": "texture", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 207, + 217 + ] + }, + { + "name": "mask", + "type": "MASK", + "slot_index": 1, + "links": [ + 218 + ] + }, + { + "name": "renderer", + "type": "MESHRENDER", + "slot_index": 2, + "links": [ + 219 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DBakeFromMultiview" + }, + "widgets_values": [] + }, + { + "id": 129, + "type": "Hy3DMeshVerticeInpaintTexture", + "pos": [ + 3060.599365234375, + 1227.6019287109375 + ], + "size": [ + 277.20001220703125, + 66 + ], + "flags": {}, + "order": 66, + "mode": 0, + "inputs": [ + { + "name": "texture", + "type": "IMAGE", + "link": 217 + }, + { + "name": "mask", + "type": "MASK", + "link": 218 + }, + { + "name": "renderer", + "type": "MESHRENDER", + "link": 219 + } + ], + "outputs": [ + { + "name": "texture", + "type": "IMAGE", + "links": [ + 220, + 221 + ] + }, + { + "name": "mask", + "type": "MASK", + "links": [ + 222 + ] + }, + { + "name": "renderer", + "type": "MESHRENDER", + "links": [ + 223 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DMeshVerticeInpaintTexture" + }, + "widgets_values": [] + }, + { + "id": 73, + "type": "Note", + "pos": [ + -593.11572265625, + 1252.86962890625 + ], + "size": [ + 259.3616943359375, + 99.84209442138672 + ], + "flags": {}, + "order": 2, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "The level of the background affects the delighting a lot, fully black generally doesn't work, too dark makes the image red, fully white can be overbright, adjust the background level to your liking with the mask value level" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 111, + "type": "PreviewImage", + "pos": [ + 1828.6090087890625, + 1388.801025390625 + ], + "size": [ + 801.6017456054688, + 562.7461547851562 + ], + "flags": {}, + "order": 61, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 192 + } + ], + "outputs": [], + "title": "Preview Image: Multiview results", + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 125, + "type": "PreviewImage", + "pos": [ + 2658.609130859375, + 1378.801025390625 + ], + "size": [ + 503.22430419921875, + 521.7835083007812 + ], + "flags": {}, + "order": 65, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 207 + } + ], + "outputs": [], + "title": "Preview Image: Initial baked texture", + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 127, + "type": "PreviewImage", + "pos": [ + 3738.609130859375, + 1378.801025390625 + ], + "size": [ + 471.61279296875, + 520.6934204101562 + ], + "flags": {}, + "order": 70, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 209 + } + ], + "outputs": [], + "title": "Preview Image: fully inpainted texture", + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 99, + "type": "Hy3DExportMesh", + "pos": [ + 4053.56396484375, + 1224.027099609375 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 71, + "mode": 0, + "inputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "link": 163 + } + ], + "outputs": [ + { + "name": "glb_path", + "type": "STRING", + "slot_index": 0, + "links": [ + 276 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DExportMesh" + }, + "widgets_values": [ + "3D/Hy3D_textured", + "glb", + true + ] + }, + { + "id": 28, + "type": "DownloadAndLoadHy3DDelightModel", + "pos": [ + -993.1152954101562, + 982.869873046875 + ], + "size": [ + 307.71990966796875, + 58 + ], + "flags": {}, + "order": 3, + "mode": 0, + "inputs": [ + { + "name": "compile_args", + "shape": 7, + "type": "HY3DCOMPILEARGS", + "link": null + } + ], + "outputs": [ + { + "name": "delight_pipe", + "type": "HY3DDIFFUSERSPIPE", + "slot_index": 0, + "links": [ + 30, + 266 + ] + } + ], + "properties": { + "Node name for S&R": "DownloadAndLoadHy3DDelightModel" + }, + "widgets_values": [ + "hunyuan3d-delight-v2-0" + ] + }, + { + "id": 148, + "type": "Hy3DDiffusersSchedulerConfig", + "pos": [ + -620.48388671875, + 839.521484375 + ], + "size": [ + 288.13494873046875, + 82 + ], + "flags": {}, + "order": 20, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "HY3DDIFFUSERSPIPE", + "link": 266 + } + ], + "outputs": [ + { + "name": "diffusers_scheduler", + "type": "NOISESCHEDULER", + "links": [ + 265 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DDiffusersSchedulerConfig" + }, + "widgets_values": [ + "Euler A", + "default" + ] + }, + { + "id": 117, + "type": "ImageResize+", + "pos": [ + 2288.609130859375, + 958.801025390625 + ], + "size": [ + 315, + 218 + ], + "flags": {}, + "order": 62, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 202 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 203 + ] + }, + { + "name": "width", + "type": "INT", + "links": null + }, + { + "name": "height", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "ImageResize+" + }, + "widgets_values": [ + 2048, + 2048, + "lanczos", + "stretch", + "always", + 0 + ] + }, + { + "id": 115, + "type": "Note", + "pos": [ + 330, + 1290 + ], + "size": [ + 244.82861328125, + 119.78506469726562 + ], + "flags": {}, + "order": 4, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "These are the default camera views used, customizing is fully experimental. To customize." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 156, + "type": "Note", + "pos": [ + 4580.03173828125, + 445.3966064453125 + ], + "size": [ + 317.4715270996094, + 108.64700317382812 + ], + "flags": {}, + "order": 5, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "If the Preview3D node doesn't work, right click on it and select \"fix node\" or re-create the whole node. It's part of ComfyUI and often gets updated causing mismatch with the version that's in the workflow." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 17, + "type": "Hy3DExportMesh", + "pos": [ + 608.8285522460938, + -610.6996459960938 + ], + "size": [ + 315.6768493652344, + 106 + ], + "flags": {}, + "order": 44, + "mode": 0, + "inputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "link": 86 + } + ], + "outputs": [ + { + "name": "glb_path", + "type": "STRING", + "slot_index": 0, + "links": [ + 283 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DExportMesh" + }, + "widgets_values": [ + "3D/Hy3D", + "glb", + true + ] + }, + { + "id": 59, + "type": "Hy3DPostprocessMesh", + "pos": [ + 588.8284912109375, + -430.69952392578125 + ], + "size": [ + 315, + 174 + ], + "flags": {}, + "order": 42, + "mode": 0, + "inputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "link": 251 + }, + { + "name": "mask", + "shape": 7, + "type": "MASK", + "link": null + } + ], + "outputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "slot_index": 0, + "links": [ + 86, + 133, + 284 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DPostprocessMesh" + }, + "widgets_values": [ + true, + true, + true, + 50000, + false + ] + }, + { + "id": 163, + "type": "Hy3DRenderSingleView", + "pos": [ + 988.8281860351562, + -570.6998901367188 + ], + "size": [ + 315, + 294 + ], + "flags": {}, + "order": 46, + "mode": 0, + "inputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "link": 284 + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "links": [] + }, + { + "name": "mask", + "type": "MASK", + "links": null + } + ], + "properties": { + "Node name for S&R": "Hy3DRenderSingleView" + }, + "widgets_values": [ + "normal", + 1024, + "orth", + 1.45, + 0, + 0, + 1.2, + 146.666748046875, + 0, + "128, 128, 255" + ] + }, + { + "id": 140, + "type": "Hy3DVAEDecode", + "pos": [ + 248.82911682128906, + -430.69952392578125 + ], + "size": [ + 315, + 174 + ], + "flags": {}, + "order": 37, + "mode": 0, + "inputs": [ + { + "name": "vae", + "type": "HY3DVAE", + "link": 250 + }, + { + "name": "latents", + "type": "HY3DLATENT", + "link": 297 + } + ], + "outputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "slot_index": 0, + "links": [ + 251 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DVAEDecode" + }, + "widgets_values": [ + 1.01, + 256, + 32000, + 0, + "mc" + ] + }, + { + "id": 155, + "type": "Note", + "pos": [ + 1478.8289794921875, + -980.6998291015625 + ], + "size": [ + 317.4715270996094, + 108.64700317382812 + ], + "flags": {}, + "order": 6, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "If the Preview3D node doesn't work, right click on it and select \"fix node\" or re-create the whole node. It's part of ComfyUI and often gets updated causing mismatch with the version that's in the workflow." + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 157, + "type": "LoadImage", + "pos": [ + -1459.9996337890625, + -1250.7413330078125 + ], + "size": [ + 315, + 314 + ], + "flags": {}, + "order": 7, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 292 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Load Image: Front", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "pasted/image (734).png", + "image", + "" + ] + }, + { + "id": 160, + "type": "LoadImage", + "pos": [ + -1479.517822265625, + -699.76123046875 + ], + "size": [ + 315, + 314 + ], + "flags": {}, + "order": 8, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 307 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Load Image: Left", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "pasted/image (736).png", + "image", + "" + ] + }, + { + "id": 171, + "type": "ImageResize+", + "pos": [ + -1025.0584716796875, + -723.0029907226562 + ], + "size": [ + 315, + 218 + ], + "flags": {}, + "order": 22, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 307 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 308 + ] + }, + { + "name": "width", + "type": "INT", + "links": null + }, + { + "name": "height", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "ImageResize+" + }, + "widgets_values": [ + 518, + 518, + "lanczos", + "pad", + "always", + 2 + ] + }, + { + "id": 56, + "type": "ImageRemoveBackground+", + "pos": [ + -990.0001831054688, + -970.7413330078125 + ], + "size": [ + 327.5999755859375, + 46 + ], + "flags": {}, + "order": 28, + "mode": 0, + "inputs": [ + { + "name": "rembg_session", + "type": "REMBG_SESSION", + "link": 74 + }, + { + "name": "image", + "type": "IMAGE", + "link": 306 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 302 + ] + }, + { + "name": "MASK", + "type": "MASK", + "slot_index": 1, + "links": [ + 244 + ] + } + ], + "properties": { + "Node name for S&R": "ImageRemoveBackground+" + }, + "widgets_values": [] + }, + { + "id": 138, + "type": "MaskPreview+", + "pos": [ + -610.0001831054688, + -1230.7413330078125 + ], + "size": [ + 210, + 246 + ], + "flags": {}, + "order": 32, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 244 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "MaskPreview+" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 170, + "type": "ImageRemoveBackground+", + "pos": [ + -1015.0584106445312, + -463.00274658203125 + ], + "size": [ + 327.5999755859375, + 46 + ], + "flags": {}, + "order": 29, + "mode": 0, + "inputs": [ + { + "name": "rembg_session", + "type": "REMBG_SESSION", + "link": 309 + }, + { + "name": "image", + "type": "IMAGE", + "link": 308 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 310 + ] + }, + { + "name": "MASK", + "type": "MASK", + "slot_index": 1, + "links": [ + 315 + ] + } + ], + "properties": { + "Node name for S&R": "ImageRemoveBackground+" + }, + "widgets_values": [] + }, + { + "id": 176, + "type": "ImageResize+", + "pos": [ + -990, + 280 + ], + "size": [ + 315, + 218 + ], + "flags": {}, + "order": 23, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 319 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 317 + ] + }, + { + "name": "width", + "type": "INT", + "links": null + }, + { + "name": "height", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "ImageResize+" + }, + "widgets_values": [ + 518, + 518, + "lanczos", + "pad", + "always", + 2 + ] + }, + { + "id": 159, + "type": "LoadImage", + "pos": [ + -1430, + 250 + ], + "size": [ + 315, + 314 + ], + "flags": {}, + "order": 9, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 319 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Load Image: Back", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "pasted/image (735).png", + "image", + "" + ] + }, + { + "id": 178, + "type": "MaskPreview+", + "pos": [ + -610, + 290 + ], + "size": [ + 210, + 246 + ], + "flags": {}, + "order": 34, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 318 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "MaskPreview+" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 177, + "type": "ImageRemoveBackground+", + "pos": [ + -970, + 540 + ], + "size": [ + 327.5999755859375, + 46 + ], + "flags": {}, + "order": 30, + "mode": 0, + "inputs": [ + { + "name": "rembg_session", + "type": "REMBG_SESSION", + "link": 322 + }, + { + "name": "image", + "type": "IMAGE", + "link": 317 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 320 + ] + }, + { + "name": "MASK", + "type": "MASK", + "slot_index": 1, + "links": [ + 318 + ] + } + ], + "properties": { + "Node name for S&R": "ImageRemoveBackground+" + }, + "widgets_values": [] + }, + { + "id": 167, + "type": "LoadImage", + "pos": [ + -1417.82861328125, + -261.56158447265625 + ], + "size": [ + 315, + 314 + ], + "flags": {}, + "order": 10, + "mode": 2, + "inputs": [], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 312 + ] + }, + { + "name": "MASK", + "type": "MASK", + "links": null + } + ], + "title": "Load Image: Right", + "properties": { + "Node name for S&R": "LoadImage" + }, + "widgets_values": [ + "pasted/image (736).png", + "image", + "" + ] + }, + { + "id": 172, + "type": "ImageResize+", + "pos": [ + -1061.1597900390625, + -268.5885925292969 + ], + "size": [ + 315, + 218 + ], + "flags": {}, + "order": 24, + "mode": 2, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 312 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 313 + ] + }, + { + "name": "width", + "type": "INT", + "links": null + }, + { + "name": "height", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "ImageResize+" + }, + "widgets_values": [ + 518, + 518, + "lanczos", + "pad", + "always", + 2 + ] + }, + { + "id": 173, + "type": "ImageRemoveBackground+", + "pos": [ + -1051.0694580078125, + -0.7513542771339417 + ], + "size": [ + 327.5999755859375, + 46 + ], + "flags": {}, + "order": 31, + "mode": 2, + "inputs": [ + { + "name": "rembg_session", + "type": "REMBG_SESSION", + "link": 324 + }, + { + "name": "image", + "type": "IMAGE", + "link": 313 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 314 + ] + }, + { + "name": "MASK", + "type": "MASK", + "slot_index": 1, + "links": [ + 316 + ] + } + ], + "properties": { + "Node name for S&R": "ImageRemoveBackground+" + }, + "widgets_values": [] + }, + { + "id": 52, + "type": "ImageResize+", + "pos": [ + -1010.0001831054688, + -1220.7413330078125 + ], + "size": [ + 315, + 218 + ], + "flags": {}, + "order": 21, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 292 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 306 + ] + }, + { + "name": "width", + "type": "INT", + "links": null + }, + { + "name": "height", + "type": "INT", + "links": null + } + ], + "properties": { + "Node name for S&R": "ImageResize+" + }, + "widgets_values": [ + 518, + 518, + "lanczos", + "pad", + "always", + 2 + ] + }, + { + "id": 174, + "type": "MaskPreview+", + "pos": [ + -615.648681640625, + -711.6758422851562 + ], + "size": [ + 210, + 246 + ], + "flags": {}, + "order": 33, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 315 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "MaskPreview+" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 175, + "type": "MaskPreview+", + "pos": [ + -624.568359375, + -242.4359893798828 + ], + "size": [ + 210, + 246 + ], + "flags": {}, + "order": 36, + "mode": 2, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 316 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "MaskPreview+" + }, + "widgets_values": [] + }, + { + "id": 136, + "type": "Reroute", + "pos": [ + -1113.115234375, + 1172.86962890625 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 39, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 327 + } + ], + "outputs": [ + { + "name": "", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 241, + 332 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 132, + "type": "SolidMask", + "pos": [ + -1049.6239013671875, + 1504.7666015625 + ], + "size": [ + 315, + 106 + ], + "flags": {}, + "order": 11, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "MASK", + "type": "MASK", + "slot_index": 0, + "links": [ + 226 + ] + } + ], + "properties": { + "Node name for S&R": "SolidMask" + }, + "widgets_values": [ + 0.8, + 512, + 512 + ] + }, + { + "id": 133, + "type": "MaskToImage", + "pos": [ + -1039.8006591796875, + 1454.34326171875 + ], + "size": [ + 264.5999755859375, + 26 + ], + "flags": { + "collapsed": true + }, + "order": 25, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 226 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 329 + ] + } + ], + "properties": { + "Node name for S&R": "MaskToImage" + }, + "widgets_values": [] + }, + { + "id": 185, + "type": "BatchCount+", + "pos": [ + -1037.3975830078125, + 1406.447509765625 + ], + "size": [ + 210, + 26 + ], + "flags": { + "collapsed": true + }, + "order": 43, + "mode": 0, + "inputs": [ + { + "name": "batch", + "type": "*", + "link": 332 + } + ], + "outputs": [ + { + "name": "INT", + "type": "INT", + "links": [ + 333 + ] + } + ], + "properties": { + "Node name for S&R": "BatchCount+" + } + }, + { + "id": 184, + "type": "RepeatImageBatch", + "pos": [ + -862.4347534179688, + 1406.447998046875 + ], + "size": [ + 315, + 58 + ], + "flags": { + "collapsed": true + }, + "order": 47, + "mode": 0, + "inputs": [ + { + "name": "image", + "type": "IMAGE", + "link": 329 + }, + { + "name": "amount", + "type": "INT", + "widget": { + "name": "amount" + }, + "link": 333 + } + ], + "outputs": [ + { + "name": "IMAGE", + "type": "IMAGE", + "links": [ + 330 + ] + } + ], + "properties": { + "Node name for S&R": "RepeatImageBatch" + }, + "widgets_values": [ + 3 + ] + }, + { + "id": 154, + "type": "Preview3D", + "pos": [ + 4520, + 640 + ], + "size": [ + 977.4424438476562, + 1298.644287109375 + ], + "flags": {}, + "order": 72, + "mode": 0, + "inputs": [ + { + "name": "model_file", + "type": "STRING", + "widget": { + "name": "model_file" + }, + "link": 276 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "Preview3D", + "Camera Info": { + "position": { + "x": -12.827358019815739, + "y": 4.092098582481394, + "z": -4.747348229973779 + }, + "target": { + "x": 0, + "y": 2.5, + "z": 0 + }, + "zoom": 1, + "cameraType": "perspective" + } + }, + "widgets_values": [ + "3D/Hy3D_textured_00169_.glb", + "" + ] + }, + { + "id": 182, + "type": "PreviewImage", + "pos": [ + 368.3902282714844, + -109.37601470947266 + ], + "size": [ + 618.2745971679688, + 258 + ], + "flags": {}, + "order": 38, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 325 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 183, + "type": "MaskPreview+", + "pos": [ + 372.8946228027344, + 197.82089233398438 + ], + "size": [ + 633.1389770507812, + 258 + ], + "flags": {}, + "order": 40, + "mode": 0, + "inputs": [ + { + "name": "mask", + "type": "MASK", + "link": 326 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "MaskPreview+" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 45, + "type": "PreviewImage", + "pos": [ + -283.1155090332031, + 1222.86962890625 + ], + "size": [ + 387.0841979980469, + 384.5358581542969 + ], + "flags": {}, + "order": 57, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 57 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 90, + "type": "PreviewImage", + "pos": [ + 330, + 1500 + ], + "size": [ + 534.0819091796875, + 375.8153991699219 + ], + "flags": {}, + "order": 51, + "mode": 0, + "inputs": [ + { + "name": "images", + "type": "IMAGE", + "link": 148 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "PreviewImage" + }, + "widgets_values": [ + "" + ] + }, + { + "id": 83, + "type": "Hy3DMeshUVWrap", + "pos": [ + 318.4924011230469, + 830.156494140625 + ], + "size": [ + 214.20001220703125, + 26 + ], + "flags": {}, + "order": 45, + "mode": 0, + "inputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "link": 133 + } + ], + "outputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "slot_index": 0, + "links": [ + 134 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DMeshUVWrap" + }, + "widgets_values": [] + }, + { + "id": 61, + "type": "Hy3DCameraConfig", + "pos": [ + 606.9365234375, + 1280 + ], + "size": [ + 342.9443054199219, + 154 + ], + "flags": {}, + "order": 12, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "camera_config", + "type": "HY3DCAMERA", + "slot_index": 0, + "links": [ + 272, + 335 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DCameraConfig" + }, + "widgets_values": [ + "0, 90, 180, 270, 0, 180", + "0, 0, 0, 0, 90, -90", + "1, 0.1, 0.5, 0.1, 0.05, 0.05", + 1.45, + 1.2 + ] + }, + { + "id": 187, + "type": "Reroute", + "pos": [ + 1528.113525390625, + 1317.30029296875 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 26, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 335 + } + ], + "outputs": [ + { + "name": "", + "type": "HY3DCAMERA", + "links": [ + 336, + 337 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 149, + "type": "Hy3DDiffusersSchedulerConfig", + "pos": [ + 1960.146484375, + 769.616943359375 + ], + "size": [ + 288.13494873046875, + 82 + ], + "flags": {}, + "order": 27, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "HY3DDIFFUSERSPIPE", + "link": 268 + } + ], + "outputs": [ + { + "name": "diffusers_scheduler", + "type": "NOISESCHEDULER", + "slot_index": 0, + "links": [ + 267 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DDiffusersSchedulerConfig" + }, + "widgets_values": [ + "Euler A", + "default" + ] + }, + { + "id": 85, + "type": "DownloadAndLoadHy3DPaintModel", + "pos": [ + 1610.1817626953125, + 778.4324340820312 + ], + "size": [ + 327.5999755859375, + 58 + ], + "flags": {}, + "order": 13, + "mode": 0, + "inputs": [ + { + "name": "compile_args", + "shape": 7, + "type": "HY3DCOMPILEARGS", + "link": null + } + ], + "outputs": [ + { + "name": "multiview_pipe", + "type": "HY3DDIFFUSERSPIPE", + "links": [ + 139, + 268 + ] + } + ], + "properties": { + "Node name for S&R": "DownloadAndLoadHy3DPaintModel" + }, + "widgets_values": [ + "hunyuan3d-paint-v2-0" + ] + }, + { + "id": 188, + "type": "Reroute", + "pos": [ + 1526.332275390625, + 1262.0638427734375 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 55, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 338 + } + ], + "outputs": [ + { + "name": "", + "type": "MESHRENDER", + "links": [ + 339 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 79, + "type": "Hy3DRenderMultiView", + "pos": [ + 611.52685546875, + 1060.3057861328125 + ], + "size": [ + 342.5999755859375, + 170 + ], + "flags": {}, + "order": 49, + "mode": 0, + "inputs": [ + { + "name": "trimesh", + "type": "TRIMESH", + "link": 134 + }, + { + "name": "camera_config", + "shape": 7, + "type": "HY3DCAMERA", + "link": 272 + } + ], + "outputs": [ + { + "name": "normal_maps", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 148, + 340 + ] + }, + { + "name": "position_maps", + "type": "IMAGE", + "slot_index": 1, + "links": [ + 199, + 342 + ] + }, + { + "name": "renderer", + "type": "MESHRENDER", + "links": [ + 338 + ] + }, + { + "name": "masks", + "type": "MASK", + "links": null + } + ], + "properties": { + "Node name for S&R": "Hy3DRenderMultiView" + }, + "widgets_values": [ + 1024, + 2048, + "world" + ] + }, + { + "id": 189, + "type": "Reroute", + "pos": [ + 1531.2459716796875, + 1056.501708984375 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 52, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 340 + } + ], + "outputs": [ + { + "name": "", + "type": "IMAGE", + "links": [ + 341 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 190, + "type": "Reroute", + "pos": [ + 1533.702880859375, + 1094.174560546875 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 54, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 342 + } + ], + "outputs": [ + { + "name": "", + "type": "IMAGE", + "links": [ + 343 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 88, + "type": "Hy3DSampleMultiView", + "pos": [ + 1917.5408935546875, + 897.4906005859375 + ], + "size": [ + 311.7241516113281, + 286 + ], + "flags": {}, + "order": 60, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "HY3DDIFFUSERSPIPE", + "link": 139 + }, + { + "name": "ref_image", + "type": "IMAGE", + "link": 345 + }, + { + "name": "normal_maps", + "type": "IMAGE", + "link": 341 + }, + { + "name": "position_maps", + "type": "IMAGE", + "link": 343 + }, + { + "name": "camera_config", + "shape": 7, + "type": "HY3DCAMERA", + "link": 336 + }, + { + "name": "scheduler", + "shape": 7, + "type": "NOISESCHEDULER", + "link": 267 + }, + { + "name": "view_size", + "type": "INT", + "widget": { + "name": "view_size" + }, + "link": 264 + }, + { + "name": "samples", + "shape": 7, + "type": "LATENT", + "link": null + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 192, + 202, + 205 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DSampleMultiView" + }, + "widgets_values": [ + 512, + 25, + 1024, + "fixed", + 1 + ] + }, + { + "id": 191, + "type": "Reroute", + "pos": [ + 1530.4268798828125, + 961.5006103515625 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 59, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 347 + } + ], + "outputs": [ + { + "name": "", + "type": "IMAGE", + "links": [ + 345 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 35, + "type": "Hy3DDelightImage", + "pos": [ + -613.11572265625, + 982.869873046875 + ], + "size": [ + 278.7183837890625, + 222 + ], + "flags": {}, + "order": 56, + "mode": 0, + "inputs": [ + { + "name": "delight_pipe", + "type": "HY3DDIFFUSERSPIPE", + "link": 30 + }, + { + "name": "image", + "type": "IMAGE", + "link": 99 + }, + { + "name": "scheduler", + "shape": 7, + "type": "NOISESCHEDULER", + "link": 265 + }, + { + "name": "width", + "type": "INT", + "widget": { + "name": "width" + }, + "link": 262 + }, + { + "name": "height", + "type": "INT", + "widget": { + "name": "height" + }, + "link": 263 + } + ], + "outputs": [ + { + "name": "image", + "type": "IMAGE", + "slot_index": 0, + "links": [ + 57, + 346 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DDelightImage" + }, + "widgets_values": [ + 50, + 512, + 512, + 1, + 0, + "fixed" + ] + }, + { + "id": 192, + "type": "Reroute", + "pos": [ + 151.35789489746094, + 985.5498657226562 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 58, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 346 + } + ], + "outputs": [ + { + "name": "", + "type": "IMAGE", + "links": [ + 347 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 144, + "type": "PrimitiveNode", + "pos": [ + -79.741455078125, + 634.9743041992188 + ], + "size": [ + 260.3999938964844, + 84.1800765991211 + ], + "flags": {}, + "order": 14, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "INT", + "type": "INT", + "widget": { + "name": "width" + }, + "slot_index": 0, + "links": [ + 262, + 263, + 264 + ] + } + ], + "title": "Primitive: reference image size", + "properties": { + "Run widget replace on values": false + }, + "widgets_values": [ + 512, + "fixed" + ] + }, + { + "id": 10, + "type": "Hy3DModelLoader", + "pos": [ + -230.4511260986328, + -594.7503662109375 + ], + "size": [ + 435.4117431640625, + 126 + ], + "flags": {}, + "order": 15, + "mode": 0, + "inputs": [ + { + "name": "compile_args", + "shape": 7, + "type": "HY3DCOMPILEARGS", + "link": null + } + ], + "outputs": [ + { + "name": "pipeline", + "type": "HY3DMODEL", + "slot_index": 0, + "links": [ + 293 + ] + }, + { + "name": "vae", + "type": "HY3DVAE", + "slot_index": 1, + "links": [ + 250 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DModelLoader" + }, + "widgets_values": [ + "hy3dgen\\hunyuan3d-dit-v2-0-mv-fast-fp16.safetensors", + "sdpa", + false + ] + }, + { + "id": 193, + "type": "MarkdownNote", + "pos": [ + -223.60067749023438, + -828.5628662109375 + ], + "size": [ + 427.3851013183594, + 159.76593017578125 + ], + "flags": {}, + "order": 16, + "mode": 0, + "inputs": [], + "outputs": [], + "title": "Model download links", + "properties": {}, + "widgets_values": [ + "Fast MultiView model:\n\n[https://huggingface.co/tencent/Hunyuan3D-2mv/blob/main/hunyuan3d-dit-v2-mv-fast/model.fp16.safetensors](https://huggingface.co/tencent/Hunyuan3D-2mv/blob/main/hunyuan3d-dit-v2-mv-fast/model.fp16.safetensors)\n\nNormal:\n\n[https://huggingface.co/tencent/Hunyuan3D-2mv/blob/main/hunyuan3d-dit-v2-mv/model.fp16.safetensors](https://huggingface.co/tencent/Hunyuan3D-2mv/blob/main/hunyuan3d-dit-v2-mv/model.fp16.safetensors)" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 146, + "type": "Note", + "pos": [ + -1993.8355712890625, + -672.2684936523438 + ], + "size": [ + 312.0663146972656, + 88 + ], + "flags": {}, + "order": 17, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "The image encoder used works at 518x518, every input is resized to that automatically, but better to do it here first in controlled fashion" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 55, + "type": "TransparentBGSession+", + "pos": [ + -2029.4261474609375, + -436.9068603515625 + ], + "size": [ + 340.20001220703125, + 82 + ], + "flags": {}, + "order": 18, + "mode": 0, + "inputs": [], + "outputs": [ + { + "name": "REMBG_SESSION", + "type": "REMBG_SESSION", + "slot_index": 0, + "links": [ + 74, + 309, + 322, + 324 + ] + } + ], + "properties": { + "Node name for S&R": "TransparentBGSession+" + }, + "widgets_values": [ + "base", + true + ] + }, + { + "id": 168, + "type": "Note", + "pos": [ + -158.47628784179688, + -386.1087341308594 + ], + "size": [ + 283.68896484375, + 102.6112060546875 + ], + "flags": {}, + "order": 19, + "mode": 0, + "inputs": [], + "outputs": [], + "properties": {}, + "widgets_values": [ + "The input should be either already with background removed or RGBA image" + ], + "color": "#432", + "bgcolor": "#653" + }, + { + "id": 135, + "type": "Reroute", + "pos": [ + -1108.565673828125, + 1224.8599853515625 + ], + "size": [ + 75, + 26 + ], + "flags": {}, + "order": 41, + "mode": 0, + "inputs": [ + { + "name": "", + "type": "*", + "link": 350 + } + ], + "outputs": [ + { + "name": "", + "type": "MASK", + "slot_index": 0, + "links": [ + 231 + ] + } + ], + "properties": { + "showOutputText": false, + "horizontal": false + } + }, + { + "id": 166, + "type": "Hy3DGenerateMeshMultiView", + "pos": [ + -161.1708221435547, + -240.69961547851562 + ], + "size": [ + 315, + 210 + ], + "flags": {}, + "order": 35, + "mode": 0, + "inputs": [ + { + "name": "pipeline", + "type": "HY3DMODEL", + "link": 293 + }, + { + "name": "front", + "shape": 7, + "type": "IMAGE", + "link": 302 + }, + { + "name": "left", + "shape": 7, + "type": "IMAGE", + "link": 310 + }, + { + "name": "right", + "shape": 7, + "type": "IMAGE", + "link": 314 + }, + { + "name": "back", + "shape": 7, + "type": "IMAGE", + "link": 320 + } + ], + "outputs": [ + { + "name": "latents", + "type": "HY3DLATENT", + "links": [ + 297 + ] + }, + { + "name": "image", + "type": "IMAGE", + "links": [ + 325, + 327 + ] + }, + { + "name": "mask", + "type": "MASK", + "links": [ + 326, + 350 + ] + } + ], + "properties": { + "Node name for S&R": "Hy3DGenerateMeshMultiView" + }, + "widgets_values": [ + 5.5, + 30, + 416935455784444, + "fixed" + ] + }, + { + "id": 162, + "type": "Preview3D", + "pos": [ + 1448.8289794921875, + -740.6997680664062 + ], + "size": [ + 536.2473754882812, + 612.539794921875 + ], + "flags": {}, + "order": 48, + "mode": 0, + "inputs": [ + { + "name": "model_file", + "type": "STRING", + "widget": { + "name": "model_file" + }, + "link": 283 + } + ], + "outputs": [], + "properties": { + "Node name for S&R": "Preview3D", + "Camera Info": { + "position": { + "x": 12.511550331859612, + "y": 4.435124730190543, + "z": 4.673577718847704 + }, + "target": { + "x": 0, + "y": 2.5, + "z": 0 + }, + "zoom": 1, + "cameraType": "perspective" + }, + "FOV": 31, + "Light Intensity": 7, + "Material Mode": "normal" + }, + "widgets_values": [ + "3D/Hy3D_00679_.glb", + "" + ] + } + ], + "links": [ + [ + 30, + 28, + 0, + 35, + 0, + "DELIGHTMODEL" + ], + [ + 57, + 35, + 0, + 45, + 0, + "IMAGE" + ], + [ + 74, + 55, + 0, + 56, + 0, + "REMBG_SESSION" + ], + [ + 86, + 59, + 0, + 17, + 0, + "HY3DMESH" + ], + [ + 99, + 64, + 0, + 35, + 1, + "IMAGE" + ], + [ + 133, + 59, + 0, + 83, + 0, + "HY3DMESH" + ], + [ + 134, + 83, + 0, + 79, + 0, + "HY3DMESH" + ], + [ + 139, + 85, + 0, + 88, + 0, + "HY3DPAINTMODEL" + ], + [ + 148, + 79, + 0, + 90, + 0, + "IMAGE" + ], + [ + 163, + 98, + 0, + 99, + 0, + "HY3DMESH" + ], + [ + 185, + 104, + 0, + 98, + 0, + "IMAGE" + ], + [ + 192, + 88, + 0, + 111, + 0, + "IMAGE" + ], + [ + 199, + 79, + 1, + 116, + 0, + "IMAGE" + ], + [ + 202, + 88, + 0, + 117, + 0, + "IMAGE" + ], + [ + 203, + 117, + 0, + 92, + 0, + "IMAGE" + ], + [ + 204, + 119, + 0, + 118, + 0, + "UPSCALE_MODEL" + ], + [ + 205, + 88, + 0, + 118, + 1, + "IMAGE" + ], + [ + 207, + 92, + 0, + 125, + 0, + "IMAGE" + ], + [ + 209, + 104, + 0, + 127, + 0, + "IMAGE" + ], + [ + 217, + 92, + 0, + 129, + 0, + "IMAGE" + ], + [ + 218, + 92, + 1, + 129, + 1, + "MASK" + ], + [ + 219, + 92, + 2, + 129, + 2, + "MESHRENDER" + ], + [ + 220, + 129, + 0, + 104, + 0, + "IMAGE" + ], + [ + 221, + 129, + 0, + 126, + 0, + "IMAGE" + ], + [ + 222, + 129, + 1, + 104, + 1, + "MASK" + ], + [ + 223, + 129, + 2, + 98, + 1, + "MESHRENDER" + ], + [ + 226, + 132, + 0, + 133, + 0, + "MASK" + ], + [ + 231, + 135, + 0, + 64, + 2, + "MASK" + ], + [ + 241, + 136, + 0, + 64, + 1, + "IMAGE" + ], + [ + 244, + 56, + 1, + 138, + 0, + "MASK" + ], + [ + 250, + 10, + 1, + 140, + 0, + "HY3DVAE" + ], + [ + 251, + 140, + 0, + 59, + 0, + "HY3DMESH" + ], + [ + 262, + 144, + 0, + 35, + 3, + "INT" + ], + [ + 263, + 144, + 0, + 35, + 4, + "INT" + ], + [ + 264, + 144, + 0, + 88, + 6, + "INT" + ], + [ + 265, + 148, + 0, + 35, + 2, + "NOISESCHEDULER" + ], + [ + 266, + 28, + 0, + 148, + 0, + "HY3DDIFFUSERSPIPE" + ], + [ + 267, + 149, + 0, + 88, + 5, + "NOISESCHEDULER" + ], + [ + 268, + 85, + 0, + 149, + 0, + "HY3DDIFFUSERSPIPE" + ], + [ + 272, + 61, + 0, + 79, + 1, + "HY3DCAMERA" + ], + [ + 276, + 99, + 0, + 154, + 0, + "STRING" + ], + [ + 283, + 17, + 0, + 162, + 0, + "STRING" + ], + [ + 284, + 59, + 0, + 163, + 0, + "TRIMESH" + ], + [ + 292, + 157, + 0, + 52, + 0, + "IMAGE" + ], + [ + 293, + 10, + 0, + 166, + 0, + "HY3DMODEL" + ], + [ + 297, + 166, + 0, + 140, + 1, + "HY3DLATENT" + ], + [ + 302, + 56, + 0, + 166, + 1, + "IMAGE" + ], + [ + 306, + 52, + 0, + 56, + 1, + "IMAGE" + ], + [ + 307, + 160, + 0, + 171, + 0, + "IMAGE" + ], + [ + 308, + 171, + 0, + 170, + 1, + "IMAGE" + ], + [ + 309, + 55, + 0, + 170, + 0, + "REMBG_SESSION" + ], + [ + 310, + 170, + 0, + 166, + 2, + "IMAGE" + ], + [ + 312, + 167, + 0, + 172, + 0, + "IMAGE" + ], + [ + 313, + 172, + 0, + 173, + 1, + "IMAGE" + ], + [ + 314, + 173, + 0, + 166, + 3, + "IMAGE" + ], + [ + 315, + 170, + 1, + 174, + 0, + "MASK" + ], + [ + 316, + 173, + 1, + 175, + 0, + "MASK" + ], + [ + 317, + 176, + 0, + 177, + 1, + "IMAGE" + ], + [ + 318, + 177, + 1, + 178, + 0, + "MASK" + ], + [ + 319, + 159, + 0, + 176, + 0, + "IMAGE" + ], + [ + 320, + 177, + 0, + 166, + 4, + "IMAGE" + ], + [ + 322, + 55, + 0, + 177, + 0, + "REMBG_SESSION" + ], + [ + 324, + 55, + 0, + 173, + 0, + "REMBG_SESSION" + ], + [ + 325, + 166, + 1, + 182, + 0, + "IMAGE" + ], + [ + 326, + 166, + 2, + 183, + 0, + "MASK" + ], + [ + 327, + 166, + 1, + 136, + 0, + "*" + ], + [ + 329, + 133, + 0, + 184, + 0, + "IMAGE" + ], + [ + 330, + 184, + 0, + 64, + 0, + "IMAGE" + ], + [ + 332, + 136, + 0, + 185, + 0, + "*" + ], + [ + 333, + 185, + 0, + 184, + 1, + "INT" + ], + [ + 335, + 61, + 0, + 187, + 0, + "*" + ], + [ + 336, + 187, + 0, + 88, + 4, + "HY3DCAMERA" + ], + [ + 337, + 187, + 0, + 92, + 2, + "HY3DCAMERA" + ], + [ + 338, + 79, + 2, + 188, + 0, + "*" + ], + [ + 339, + 188, + 0, + 92, + 1, + "MESHRENDER" + ], + [ + 340, + 79, + 0, + 189, + 0, + "*" + ], + [ + 341, + 189, + 0, + 88, + 2, + "IMAGE" + ], + [ + 342, + 79, + 1, + 190, + 0, + "*" + ], + [ + 343, + 190, + 0, + 88, + 3, + "IMAGE" + ], + [ + 345, + 191, + 0, + 88, + 1, + "IMAGE" + ], + [ + 346, + 35, + 0, + 192, + 0, + "*" + ], + [ + 347, + 192, + 0, + 191, + 0, + "*" + ], + [ + 350, + 166, + 2, + 135, + 0, + "*" + ] + ], + "groups": [ + { + "id": 1, + "title": "MeshGen", + "bounding": [ + -265.7271423339844, + -1264.5260009765625, + 2408.53173828125, + 1764.44873046875 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 2, + "title": "Delight", + "bounding": [ + -1219.79931640625, + 740.5906372070312, + 1369.6767578125, + 888.11328125 + ], + "color": "#b58b2a", + "font_size": 24, + "flags": {} + }, + { + "id": 3, + "title": "RenderTextures", + "bounding": [ + 216.74928283691406, + 632.1493530273438, + 1327.30810546875, + 1491.8914794921875 + ], + "color": "#b06634", + "font_size": 24, + "flags": {} + }, + { + "id": 4, + "title": "TextureSampling", + "bounding": [ + 1591.5169677734375, + 633.6101684570312, + 2813.541015625, + 1487.335205078125 + ], + "color": "#a1309b", + "font_size": 24, + "flags": {} + }, + { + "id": 5, + "title": "Front", + "bounding": [ + -1531.630615234375, + -1362.462890625, + 1171.3104248046875, + 463.4588623046875 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 6, + "title": "Left", + "bounding": [ + -1535.9649658203125, + -865.2572631835938, + 1186.451171875, + 498.18414306640625 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 7, + "title": "Right", + "bounding": [ + -1534.1051025390625, + -333.5830383300781, + 1181.991943359375, + 430.79888916015625 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + }, + { + "id": 8, + "title": "Back", + "bounding": [ + -1531.593505859375, + 130.9738006591797, + 1177.730712890625, + 473.5091552734375 + ], + "color": "#3f789e", + "font_size": 24, + "flags": {} + } + ], + "config": {}, + "extra": { + "ds": { + "scale": 0.45949729863574706, + "offset": [ + 2276.6208892516206, + 1480.2905534146025 + ] + }, + "node_versions": { + "comfy-core": "0.3.26", + "ComfyUI-Hunyuan3DWrapper": "7ff9ad9ea064a432709cdbd4216d62376c2263c1", + "ComfyUI_essentials": "76e9d1e4399bd025ce8b12c290753d58f9f53e93" + }, + "VHS_latentpreview": true, + "VHS_latentpreviewrate": 0, + "VHS_MetadataImage": true, + "VHS_KeepIntermediate": true + }, + "version": 0.4 +} \ No newline at end of file diff --git a/nodes.py b/nodes.py index 4e10b19..1430001 100644 --- a/nodes.py +++ b/nodes.py @@ -222,7 +222,7 @@ class Hy3DDelightImage: device = mm.get_torch_device() offload_device = mm.unet_offload_device() - + print("image in shape", image.shape) if scheduler is not None: if not hasattr(self, "default_scheduler"): self.default_scheduler = delight_pipe.scheduler @@ -233,21 +233,25 @@ class Hy3DDelightImage: image = image.permute(0, 3, 1, 2).to(device) image = common_upscale(image, width, height, "lanczos", "disabled") + - image = delight_pipe( - prompt="", - image=image, - generator=torch.manual_seed(seed), - height=height, - width=width, - num_inference_steps=steps, - image_guidance_scale=cfg_image, - guidance_scale=1.0 if cfg_image == 1.0 else 1.01, #enable cfg for image, value doesn't matter as it do anything for text anyway - output_type="pt", - - ).images[0] + images_list = [] + for img in image: + out = delight_pipe( + prompt="", + image=img, + generator=torch.manual_seed(seed), + height=height, + width=width, + num_inference_steps=steps, + image_guidance_scale=cfg_image, + guidance_scale=1.0 if cfg_image == 1.0 else 1.01, #enable cfg for image, value doesn't matter as it do anything for text anyway + output_type="pt", + + ).images[0] + images_list.append(out) - out_tensor = image.unsqueeze(0).permute(0, 2, 3, 1).cpu().float() + out_tensor = torch.stack(images_list).permute(0, 2, 3, 1).cpu().float() return (out_tensor, ) @@ -1092,8 +1096,8 @@ class Hy3DGenerateMeshMultiView(Hy3DGenerateMesh): } } - RETURN_TYPES = ("HY3DLATENT",) - RETURN_NAMES = ("latents",) + RETURN_TYPES = ("HY3DLATENT", "IMAGE", "MASK",) + RETURN_NAMES = ("latents", "image", "mask") FUNCTION = "process" CATEGORY = "Hunyuan3DWrapper" @@ -1141,10 +1145,24 @@ class Hy3DGenerateMeshMultiView(Hy3DGenerateMesh): torch.cuda.reset_peak_memory_stats(device) except: pass + + images = [] + masks = [] + for view_tag, view_image in view_dict.items(): + if view_image is not None: + if view_image.shape[1] == 4: + rgb = view_image[:, :3, :, :] + alpha = view_image[:, 3:4, :, :] + mask = alpha + masks.append(mask) + images.append(rgb) + + image_tensors = torch.cat(images, 0).permute(0, 2, 3, 1).cpu().float() + mask_tensors = torch.cat(masks, 0).squeeze(1).cpu().float() pipeline.to(offload_device) - return (latents, ) + return (latents, image_tensors, mask_tensors) class Hy3DVAEDecode: @classmethod