Branch trellis update
I had a problem with original Trellis pipeline on Windows 11 (wasted like 6 hours to make it work with no effect). So, I replaced it with Microsoft's one, which now works like charm. For me, I had to launch microsoft/TRELLIS app.py, let it build all it needed to build, copy all microsoft/TRELLIS/trellis contents into ComfyUI-3D-Pack/Gen_3D_Modules/TRELLIS/trellis.
Also, I had to move some mesh postprocess code from trellis.postprocessing_utils into Trellis_Structured_3D_Latents_Models.save_gs as I wanted to get MESH instead of just saved file name.
I also changed Save_3D* nodes to act more like standard Save_Image node: to add index to a file name instead of replacing it. And I also made option to create entire folder, it's useful to save different formats or preview into the same place.
Great job!
A small question, maybe trellis_ folder is unnecessary?
A small question, maybe
trellis_folder is unnecessary?
True.
I also made a little clean up in nodes.py.
I just tested this PR and found some files that would be better left unchanged:
-
renderers/gaussian_render.py3D-Pack uses
diff-gaussian-rasterizationfrom ashawkey, which is incompatible with the version used by the TRELLIS official repo. Other parts of 3D-Pack are using this package as well, so it's better to stay with previous implementation. -
modules/attention/__init__.py -
modules/sparse/__init__.py3D-Pack uses
xformersby default to ensure maximum compatibility. Replacing it withflash_attnwould require providing additional options for users to choose from. -
representations/mesh/flexicubes/examplesI believe these example files are not needed in this use case.
In addition, modifying the Save 3D Mesh node will break all existing workflows. I suggest creating a new node and including it in a separate pull request.
-
Agreed.
-
I simply replaced Trellis from official Microsoft repo, without much thinking. I don't know much about
xformersandflash_attncompatibility. Seems like I have some homework to do. -
Agreed.
p.s. Gosh, markdown sometimes make me feel so miserable.
@iiiCpu Hi, thank you for your contribution, I'll take a closer look later this week
In the meantime, can you please remove some unnecessary changes and change it back to xformers, because xformers actually supports flash_attn (Although probably not v3, but in time it should), thanks again in advance :)
Have a good day 👍