r/StableDiffusion
•
u/ai_happy
•
Jan 05 '25
•
1
News "Trellis image-to-3d": I made it work with half-precision, which reduced GPU memory requirement 16GB -> 8 GB
1.3k
Upvotes
194
u/ai_happy Jan 05 '25 edited Jan 05 '25
https://github.com/IgorAherne/trellis-stable-projectorz/releases/tag/latest
This is a one-click installer for windows, which doesn't need Cuda Toolkit, no need for admin, nor powershell.
Installs like A1111 one-click installer.
Now we are using float16 instead of float32, and int32 instead of int64.
I don't see any drop in quality. Even if seed is the same, float16 just makes it take a different render-path.
The above generation is only 12 steps, but you can go up to 50 for a better quality. Memory is the same.
This is 1024 texture size, but 2048 is also possible
FishWoWater also helped to add Gradio support, thank you!
I also added API support + documentation, in api_spz folder
I'll use it for https://stableprojectorz.com/
Most of the Trellis code is under MIT license, allowing for a full-commercial use.
HOWEVER, Trellis uses several modules that disallow commercial use, and only allow for research / evaluation purposes. This means that you are NOT allowed to sell assets generated via Trellis right now.
Other people, including me (Igor) are trying to replace those modules, for alternatives.
If you want to support me / donate, please visit https://stableprojectorz.com/thanks/
17
u/Kong28 Jan 05 '25
Maybe there are others out there like me, but what is a trellis image?
6
u/LockeBlocke Jan 05 '25
Still getting out of memory errors with half precision.
"torch.cuda.OutOfMemoryError: CUDA out of memory. Tried to allocate 2067.57 GiB. GPU 0 has a total capacty of 11.00 GiB of which 8.11 GiB is free. Of the allocated memory 1.46 GiB is allocated by PyTorch, and 225.80 MiB is reserved by PyTorch but unallocated. "
4
u/latentbroadcasting Jan 11 '25
I can confirm it works amazingly well! Thanks for your efforts!!
3
u/Rickhey Jan 06 '25
Awesome! Would love to get this to work.. but unfortunately I have the same problem as some others with it trying to allocate >1TB of vram, which my 1080Ti doesn't have.
3
u/Hullefar Jan 06 '25
Thank you! It works absolutely superb on a 3080 (10 GB)! Really fast too.
On Microsofts Trellis page it mentions that you can use text prompts to change textures... like "wood texture" and it would change the existing texture on the same mesh. Is this something that could be implemented?
2
u/parabellum630 Jan 06 '25
Any reason for fp16 and not bf16?
2
u/orgodemir Jan 07 '25 edited Jan 07 '25
Got a
ModuleNotFoundError: No module named 'gsplat'when running. I tried adding to the requirements.txt and installing the venv again, but that didn't work. Was able to activate the venv after and install via pip though.edit: got some other error and looks like gsplat was disabled after not finding cuda toolkit:
2
u/[deleted] Jan 08 '25
Thanks so much for this. I am running it on a 3090 with no issues. It did say no Triton when I loaded it but then it worked anyway - I can use it just like the HF demo space. Would it be better if I did have Triton?
2
u/No-Razzmatazz9521 Jan 16 '25
It works great I made it into a blender pluggin with the api and it also works great 👍 👌 😀 😄 😁 😊 4070ti 12gb . Question about projectors, is the a way to auto separate into the perfect angels, I used a blender ai texture pluggin "$20" that about separates it into 6 views fron back to bottom left right, I have trouble getting it right in projectors and I caint seem to figure out how to use the 45degree snap in the video it said cnt key bit that dose something eles when I press it. Lastly you are creating a great set of tools caint wait to try out your shadow removal stuff 💪🏾
22
u/Mushcube Jan 06 '25
Ok, now we need an AI to Rig and Weight paint them 😁
6
u/1Neokortex1 Jan 05 '25
So dope! Hope my Rtx 3050 can handle it, thanks bro!
4
u/siegevjorn Jan 05 '25
Amazing. Thanks for sharing!
4
u/Apprehensive-Job6056 Jan 05 '25
Thank you so much... Trellis was pain to install and now I can use from your god's work. Much appriciated!
1
u/Netsuko Jan 06 '25
Oh! Curious, does this use rembg to remove the background of the image if there is no transparency in it? I just saw it on the huggingface demo.
1
u/avillabon Jan 06 '25 edited Jan 06 '25
I can't for the life of me figure out how to get a texture. I understand glb format has the texture in the same file (and i do see it in blender) but i would like to export the model as fbx, obj or abc and have texture files to go with it. Other than that, it works really well!
1
u/zoidme Jan 06 '25
Will it run on gtx1080? Will it run on docker? Does it consume gpu memory when idle?
1
u/Fever308 Jan 06 '25
This is cool, any option to make the model generate in a t-pose, if the photo wasn't in a t-pose?
1
u/Polikosaurio Jan 07 '25
For some other dumbasses like me, remember to have git installed prior to this. Its a one click installer but some stuff must be on your machine first. Its something obvious to devs, but not that much to artists
1
u/OtherVersantNeige Jan 10 '25
Hello Im sorry Did someone have this same problem ? This happen after installation, I try to launch and fail I already reinstall by remove trellis_init_done.txt and venv folder But happen again
_ Current Python: "H:\Trellis Microsoft\code\venv\Scripts\python.exe" Virtual Env: H:\Trellis Microsoft\code\venv _ Current Python: "H:\Trellis Microsoft\code\venv\Scripts\python.exe" Virtual Env: H:\Trellis Microsoft\code\venv Starting the server, please wait... [SPARSE] Backend: spconv, Attention: xformers Traceback (most recent call last): File "H:\Trellis Microsoft\code\gradio_main.py", line 17, in <module> from trellis.pipelines import TrellisImageTo3DPipeline File "H:\Trellis Microsoft\code\trellis_init_.py", line 3, in <module> from . import pipelines File "H:\Trellis Microsoft\code\trellis\pipelines_init_.py", line 2, in <module> from .trellis_image_to_3d import TrellisImageTo3DPipeline File "H:\Trellis Microsoft\code\trellis\pipelines\trellis_image_to_3d.py", line 15, in <module> from ..representations import Gaussian, Strivec, MeshExtractResult File "H:\Trellis Microsoft\code\trellis\representations_init_.py", line 4, in <module> from .mesh import MeshExtractResult File "H:\Trellis Microsoft\code\trellis\representations\mesh_init_.py", line 1, in <module> from .cube2mesh import SparseFeatures2Mesh, MeshExtractResult File "H:\Trellis Microsoft\code\trellis\representations\mesh\cube2mesh.py", line 5, in <module> from .flexicubes.flexicubes import FlexiCubes ModuleNotFoundError: No module named 'trellis.representations.mesh.flexicubes' Something went wrong, consider removing code/trellis_init_done.txt and venv folder to re-initialize from scratch Press any key to continue...
1
u/Naive_Ostrich_5753 Jan 12 '25
The exported map is very blurry, does anyone know how to fix it into HD? If you can solve it, it's really practical!
1
u/chibitotoro0_0 Jan 20 '25
I tried running fp16 with a 2080ti with 11GB VRAM and it was trying to allocate 15-16GB of VRAM. In the docs it mentioned 8GB was good for fp16 but wondering if there is a setting I'm missing. I may be getting a 3090 if this works. Also looking at testing with others with a 3090.
1
u/NobleCrook Feb 06 '25
This is amazing, works on my RTX 4060 8gb like a charm. Super fast generations, amazing results. Only wish there was a way to retopo the final mesh somehow with ai in the future
Amazing job man!
1
u/Mysteryi0us Mar 30 '25
Does more steps help with better details? Or a higher resolution input image?
1
u/Mylaptopisburningme May 30 '25
What did I miss. When I run it I get detail: "Not Found"
8
u/lughnasadh Jan 05 '25
What would be a good way to animate those characters - say to have them walk?
8
u/PwanaZana Jan 05 '25
Cool work!
I still think trellis is not good enough for professional work, but it's very likely we'll get better models in 2025, and this kind of optimization is going to be super useful (like if a SOTA 3d model generator takes 40gb or VRAM, vs a fp16 that would take 20gb!)
3
u/Netsuko Jan 06 '25
Now we need someone to tackle high quality AI retopology!
3
u/[deleted] Jan 06 '25 edited Jan 06 '25
Amazeballs even at fp16 , Full precision is shades better and its still fast FP on 4070 12GB :D
1
u/Feisty-Detective-147 Jan 15 '25
Has anyone managed to get this repo running on linux or is there another repo for linux? The manual installation instructions in the readme appaer to be out of sznc with the repos current state.
2
u/Baatiste-e Jan 05 '25
Nice job, thank you
2
u/[deleted] Jan 06 '25
Would like to see this on comfyUI or similar UI.
2
u/Chris_in_Lijiang Jan 06 '25
Do you have any printed STLs to share?
2
u/Zuzoh Jan 06 '25
Had a lot of fun with this over the last couple of hours! Honestly I think this could be great for 3D prints!
2
u/[deleted] Jan 06 '25
Boy I love you
2
u/Much_Can_4610 Jan 07 '25
I keep getting this error:
Installation completed successfully!
Script ran successfully. Creating init_completed flag file.
Current Python: "C:\AI\trellis\code\venv\Scripts\python.exe"
Virtual Env: C:\AI\trellis\code\venv
Starting the server, please wait...
[SPARSE] Backend: spconv, Attention: xformers
Warp 1.5.1 initialized:
CUDA Toolkit 12.6, Driver 12.7
Devices:
"cpu" : "Intel64 Family 6 Model 183 Stepping 1, GenuineIntel"
"cuda:0" : "NVIDIA GeForce RTX 4060 Ti" (16 GiB, sm_89, mempool enabled)
Kernel cache:
C:\Users\user\AppData\Local\NVIDIA\warp\Cache\1.5.1
Traceback (most recent call last):
File "C:\AI\trellis\code\gradio_main.py", line 20, in <module>
from trellis.utils import render_utils, postprocessing_utils
File "C:\AI\trellis\code\trellis\utils\render_utils.py", line 7, in <module>
from ..renderers import OctreeRenderer, GaussianRenderer, MeshRenderer, GSplatRenderer
File "C:\AI\trellis\code\trellis\renderers__init__.py", line 18, in __getattr__
module = importlib.import_module(f".{module_name}", __name__)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "importlib__init__.py", line 126, in import_module
File "C:\AI\trellis\code\trellis\renderers\gsplat_renderer.py", line 1, in <module>
import gsplat as gs
ModuleNotFoundError: No module named 'gsplat'
Something went wrong, consider removing code/trellis_install_done.txt and venv folder to re-initialize from scratch
Did someone encountered (and solved) the same problem?
2
u/Aggravating_Towel_60 Jan 12 '25
Finally I can have my favorites telegram stickers in keyring format!
2
u/anatomic-interesting Jan 05 '25
I would be interested if you can create these topographic maps / nets for face-rotation of a portrait photograph too. like adding this kind of picture to a real photograph of a face
1
u/SecretlyCarl Jan 06 '25
This seems awesome but I cant get it to work! I just submitted an issue on the repo if you can take a look. Thank you 👍
1
u/Parogarr Jan 06 '25
does anybody know how we can do text->model? The download only does image->model
1
u/Far_Insurance4191 Jan 06 '25
Yaay this is awesome!
1
u/ItwasCompromised Jan 06 '25
Noob here, if I wanted to uninstall can I just delete the folder or will there be dependencies and such left over? I don't want anything left over if I decide not to use it anymore.
1
u/Meronoth Jan 06 '25
Trellis is the first piece of software in a while that's made me want a Nvidia card.
RemindMe! -7 days for ROCm port
1
u/iCTMSBICFYBitch Jan 06 '25
Very excited to try this. Turns out I've rebuilt my GPU machine since last playing with cutting edge AI stuff, your releases page gives the distinct impression that -everything- you need is in the folder but mine failed because of no Git! Might be worth mentioning to salve the frustration of our newer friends. Installing now that I've put Git back on this machine. Thank you!
1
u/pheonis2 Jan 06 '25
Anyone tried trellis on human photos? How does it fare on realistic human image to 3d ?
1
u/Competitive-Device39 Jan 06 '25
It's good for props, but it would be amazing to insert a prompt and get a character with functional joints.
1
u/theneonscream Jan 06 '25
Commenting so I can come back later
1
u/ninjasaid13 Jan 06 '25
u/ai_happy how do you turn off remove background?
1
u/Aware-Swordfish-9055 Jan 07 '25
Interesting, can trellis do faces?
1
u/Bakedsoda Jan 07 '25
Damn we need a hosted one to churn out models.
1
u/psykikk_streams Jan 10 '25
late to the party but the latest installer still throws errors regarding gradio,
and the "fixes" I read in github are way above my head to apply.
any possibility to fix this that is understandable for a layman ?
thanks in advance
1
u/romanbolix Jan 18 '25
Is it possible to run this in Google Colab? I knew it’s going to fail but I’ve tried to run it on my gtx 1060 6gb anyway
1
u/RedBloodedGod Jan 20 '25
I am so excited to try this on some funko models and 3d printing
1
u/DinnerRecent3462 Jan 21 '25
i put this one in a docker container with all necessary dependencies and when i press generate it samples everything and after that it just quits and says „killed“ does anyone know what this means?
1
u/MathewKpotogbe May 15 '25 edited May 15 '25
Can anyone help me?
I have been trying to solve this for with chatgpt for 5 hours straight, but nothing worked.
It keeps giving me this error:
[SPARSE] Backend: spconv, Attention: xformers
Repository Not Found for url: https://huggingface.co/JeffreyXiang/TRELLIS-image-large/resolve/main/pipeline.json.
Please make sure you specified the correct `repo_id` and `repo_type`.
If you are trying to access a private or gated repo, make sure you are authenticated. For more details, see https://huggingface.co/docs/huggingface_hub/authentication
Something went wrong, consider removing code/trellis_init_done.txt and venv folder to re-initialize from scratch
Press any key to continue . . .
I tried reinstalling it, updating, switching on and off VPN, rebooting the PC, but still nothing helps.
I'm certeinly not a programmer, but is seems like at some step of the installation it tries to acces "https://huggingface.co/JeffreyXiang/TRELLIS-image-large/raw/main/pipeline.json"
But there this link leads to nothing.
1
u/Erdeem Jan 05 '25
This is awesome. I've been using the gradio demo, but ill give this a try. If I may, I'd like to request a feature but feel to tell me to fuck off, add support for .3mf including textures and color mapping. For those of us with bambu printers, it would be cool to 3d print our creation with colors without being a blender expert.
1
u/Rizzlord Jan 05 '25
awesome, now why dont work on Comfy-ui zluda to get it to work? I would do it myself, but other than gamedev with c++ im useless on the coding side of life
0
u/[deleted] Jan 05 '25
[deleted] — view deleted comment
3
u/[deleted] Jan 06 '25
[removed] — view removed comment
60
u/[deleted] Jan 05 '25
[removed] — view removed comment
1
u/[deleted] Jan 05 '25
[removed] — view removed comment
1
u/[deleted] Jan 06 '25
[removed] — view removed comment