r/StableDiffusion • • 2d ago

News Spellcast3D: free, open-source pipeline for 3D generation, from Image to a textured Retopo. Qwen Image 2.1, Pixal3D/Hi3D, on 8GB gpus. Win, Linux

Hello friends!

back a while, I made StableProjectorz for texturing 3D asset using AI, optimized Trellis to 8GB.

Now, I made a new open-surce Spellcast3D for creating batches of game-ready 3D assets fast:

Core idea:

People usually need many 3D assets.
To make each 3D asset, devs load many neural nets, which quickly adds time.

Instead, Spellcast3D loads one neural net, processes all assets, then loads a next net.
It saves a lot of time, because we're not loading neural nets back and fourth.

Free, local, for 8GB nvidia cards, 16GB ram,
runs on Qwen Image 2.1 + Pixal3D/Hi3D
Windows, Linux

Features:

Contains very heavy C++/Cuda optimizations, by Claude Fable:
overlaps loading time, uses int8 where it has no visual differences, etc.

  • 1536 voxels for 3D generation, multiview Pixal3D / Hi3D, 4K textures, on 8GB gpus.
  • Qwen Image 2.1 Turbo: makes images in just 8 steps, on 8GB gpus.
  • My custom Albedo LoRA, trained by me for Qwen Image 2.1
  • Upscale / Detail via 4xNomos2 and SeedVR2-3B
  • Retopo TriFlow / LATO.2 / InstantMeshes (with brush controls)
  • Texture-Transfer (Projection) from high to low poly.

Download: https://spellcast3d.com/
Github: https://github.com/IgorAherne/Spellcast3d

502 Upvotes

60 comments sorted by

11

u/Enshitification 2d ago

How do we build it from source instead of downloading a zip file and running a shell script?

18

u/ai_happy 2d ago

Hey!
The app is Python, so there is nothing to compile. Clone the repository and run it with your own Python 3.11 instead of my scripts:

git clone https://github.com/IgorAherne/spellcast3d.git 
cd spellcast3d
python code/install.py        (your own Python 3.11, 64-bit: it builds every tool's environment with it)
cd code
venvs/hub/bin/python -m spellcast        (Windows: venvs\hub\Scripts\python.exe -m spellcast)

- The only prebuilt binaries are the GPU extensions (cumesh, nvdiffrast, sageattention and the others) and the Qwen-Image engine (stable-diffusion.cpp). They come prebuilt so nobody needs CUDA or Visual Studio.

Their build scripts, with the exact source commits, are in code/release/wheels/ and code/release/engine/; DEVELOPERS.md explains how to swap in your own build.

If you want to recompile them, you will need those from my forks on https://github.com/IgorAherne?tab=repositories

7

u/Lesteriax 2d ago

Can I upload multipleangle images of creations I already made like 3 to 4 pictures per model? Or i have to generate from scratch with qwen?

10

u/ai_happy 2d ago

You can import your own;
In fact, if you have folder with images, you can import folder and it will spawn required Assets. Just make sure names contain _front _left _back etc.

4

u/Hironmaiden 2d ago

If it's c++ based, maybe you can ask Claude vulkan support since it's possible on trellis 2 cpp version. I know NVIDIA is masterace for AI, but actually is hard to get quality / price ^^

3

u/ai_happy 2d ago

yes I can do it, but the problem is I don't have access to AMD cards.
And in cloud can rent only Nvidia gpus to test, from what I know.
So it's not possible for me to check first-handed

1

u/More-Curious816 1d ago

Nvidia also support Vulkan by the way. it's an industry standard and fully supported by NVIDIA, AMD and Intel. I would even say Nvidia Vulkan driver is better and more mature than AMD and Intel ones.

1

u/ai_happy 1d ago

Ah, sorry, for some reason I though of ROCM.
Yes, Vulkan can be very fast. It's very difficult to setup, I remember reading a lesson for making a triangle, and it was like complex wizardry

4

u/NakedxCrusader 2d ago

Can this Export to CAD or other editors? How well made is the Mesh usually? Usable for animation or printing?

4

u/ai_happy 2d ago

the models can be exported as .glb, .fbx and .obj, so it directly goes into Maya, Blender, 3ds, unity/unreal/godot.

Mesh quality is much better than 1 year ago, lightweight and game-ready.
For animations, I always remember legendary PS1 games. Always made from a few triangles and had excellent animations nonetheless. Tbh, good anims come down to skill, and topology for bends/distortions is like a cherry on the cake.

4

u/Bigbagdaddy9x19 2d ago

Free, open source AND it does retopo? Retopo is the part every 3D person would outsource to a cursed demon if they could. How's it do on hard-surface stuff vs organic?

2

u/ai_happy 1d ago

It offers 3 retopo algorithms: TriFlow, LATO.2 and InstantMeshes.

the instant meshes is an older approach for organic characters. It works best for 10k+ vertices.
My port made it possible to use flow-brush in browser.
So we can use it to guide the flow of quads.

TriFlow does more optimization, and uses triangles of different size for smarter coverage. Better than decimate, if you don't need uniform quads.

3

u/Bigbagdaddy9x19 1d ago

That's super useful, thanks. InstantMeshes for organic at 10k+ verts tracks, and the in-browser flow-brush is sick. Which of those three holds sharp edges better on hard-surface / CAD-y stuff? I'm always hunting cheap or free hw/compute so I can actually try all three instead of just drooling at the readme.

2

u/ai_happy 1d ago

AUDI's TriFlow algorithm is the best one we have right now, it's what the dragon and the table in the video use

3

u/_half_real_ 2d ago

What I'd like for 3D model generators is a way to refine the texture and/or geometry for the parts that look off.

Essentially, like how you would do manual inpainting fixes for raw generated images.

4

u/ai_happy 2d ago

texture can be refined, via inpaint projections.
In fact, Spellcast3D has a Reverse-Perspective algorithm, which stretches out object on screen, allowing us to see sides better than an orthographic would, and to inpaint easier. For example, all sides of a building, or both cheeks of a face
Kinda like this: https://www.youtube.com/shorts/NZFhxbfCj_k

3

u/tipsy_Pup 1d ago

I tried it. Overall, I liked how simple everything is set up; you can get straight to work and everything runs very fast, even on my weak hardware. However, I would like to be able to disable functions I don't need from the start so that the program doesn't load a bunch of models that I won't use anyway. For example, I only need mesh generation and that's all. Everything else will just be dead weight. Also, I don't understand how to properly close the program. When I close the console window, the process still remains in memory and I have to kill it manually.

2

u/ai_happy 1d ago

thank you for feedback, I'll work on it further.
I only had 1 quick testing round by a few people this weekend so it's very fresh at the moment.

I don't need from the start so that the program doesn't load a bunch of models that I won't use anyway. - so, during the installation, or after everything is installed? Maybe we can add a config file.

what is the process called, and is it the ram or vram?

2

u/tipsy_Pup 1d ago edited 1d ago

I would make it possible to choose, upon the first launch after installation of the main program, which models to load immediately and which to leave for later, for example. And if I choose a function for which the model is not yet loaded, it warns that the model is not available and suggests loading it to unlock that function.

In the processes, python.exe remains hanging after i close console window, so it has to be closed forcibly.

2

u/und3rtow623 2d ago

How does this hold up against trellis2?

4

u/ai_happy 2d ago

Pixal3D is an enhancement over trellis2, so we intrinsically use it.
And Spellcast3D also offers 4k retexture + retopology to make good lowpoly

2

u/und3rtow623 1d ago

Thanks for the reply and post

2

u/Silonom3724 8h ago edited 8h ago

The TriFlow retopo is impressive. Unfortunately the targeted poly count seems to be extremely low. It does not look like the settings can be adjusted to a high topology budget.

3

u/ai_happy 6h ago

nono, we can specify any polygon count.
In the left column, where asset icon is, each one has 3 small input boxes.

In the video (1:35) I type 2 1 in there. This means 2k and 1k vertices. You can type 20 15 10, to have 20k, 15k, 10k - as much as you wish. For characters we can go with 20k for example. Or .5 for 500 verts

2

u/Silonom3724 6h ago

Oh I did not see that. Thank you so much!

6

u/IronDrop 1d ago

Hi Igor ! Great job !
I've been following your projects and I tried StableProjectorz a while ago. The UI was a little over complicated for my use case so I ended up building my own tool but it's really great to see your new project and I see this one seems to have a really nice UI/UX as well. Thanks a lot for making it free and opensource.

5

u/silver_404 2d ago

I'm actually working on a same app for my personal usage, why did you choose pixal over treillis 2 ?

6

u/CuriouslyCultured 2d ago

Pixal produces slightly better results for single reference generations with parameter tuning.

1

u/Arctic_Shadow_Aurora 2d ago

Is it nvidia only?

4

u/ai_happy 2d ago

yes, nvidia 8gb vram, 16gb ram; windows, linux

4

u/Arctic_Shadow_Aurora 2d ago

Oh dang, thanks anyways!

1

u/moopops 2d ago

Not working for me on a GTX 1080 8GB VRAM, even closing everything else raise this error, but good work anyway.

2

u/ai_happy 2d ago

Hm, maybe the black cmd has to be restarted after closing other programs?
I did test on gtx 1070, 1080 and ti cards, always worked. Though I tested on linux

7

u/thesolewalker 2d ago

No love for AMD 😢

4

u/DonKeehot 2d ago

Yeah ROCM would be nice

2

u/thesolewalker 2d ago

I guess it would be easier to use comfyui as backend. Comfyui now supports trellis2/pixal3d, Hi3d node works, and skintokens (auto rigging) node also seems to work too.

1

u/bronkula 1d ago

that retopo is... rough. but i suppose it's better than nothing.

1

u/ai_happy 1d ago

Currently it's three from the best ones we have:
TriFlow, LATO.2, InstantMeshes, can be picked from top of viewport

the instant meshes is an older approach, but my port made it possible to use flow-brush in browser.
So we can use it to guide the flow of quads. But it does have more polys than TriFlow, and they're uniform

3

u/dwarvenstyle 1d ago

Works great on a 5070 mobile 8gb. The workflow is intuitive and I was pleasently surprised by the results. Thanks for sharing this!

5

u/tipsy_Pup 2d ago

Looks amazing, gonna try it now

1

u/hideo_kuze_ 2d ago

This looks amazing.

Do you think there's any chance for animations in the future? Have it create a skeleton rig and make an animation maybe based on a video or just an LLM agent instructions?

2

u/ai_happy 2d ago

Yes, it can be just 2 additional stages after the
All Images -> 3D -> Texture all -> Retopo all -> Rig all -> Animate all
Will upgrade soon, now that we have this first version of Spellcast3D published

1

u/JamesWander 1d ago

I may be asking for too much, But would It be possible to rig to a existing provided skeleton/armature from a diferente model instead of creating a new one?

1

u/ai_happy 1d ago

So, like an animation-retargeting. Yes, it's a great idea, I'll look into it once I work on this
Make sure to add suggestions into #features-request channel on our discord: https://discord.gg/yg4dABJpyZ

2

u/hideo_kuze_ 1d ago

great stuff! looking forward to it

4

u/mobileposter 2d ago

Very cool. Thanks for sharing

2

u/intermundia 2d ago

this looks pretty good. have you looked into auto rigging as well? thats the problem im trying to over come right now.

2

u/aizumanga 1d ago

I wonder if any of it works well for 3d printing...

2

u/vcruz_miami_vip 1d ago

Amazing to see an open-source 3D pipeline running smoothly on 8GB GPUs! Thanks for sharing this 🔥

3

u/Jolanoff 2d ago

seems pretty cool! ill give it a try

1

u/ghost_010010001 2d ago

I’m going to test your solution. I used to use Trellis2 on an older, downgraded version of ComfyUI back when it wasn’t supported in the current version.

It was slower and the quality was lower than what I get now, but the key advantage was that it generated 3D models without any holes—which meant I could successfully slice them for 3D printing.

Since it was integrated into the current version of ComfyUI, both speed and quality have improved significantly; however, the 3D objects now end up with thousands of holes, making them impossible to slice for printing. I’ve tried various software programs to fill these holes, but because there are thousands of them, nothing has worked—so I eventually gave up on generating 3D models locally for printing.

Now, I’m going to test your solution. For a 3D file to be truly functional for 3D printing, it cannot have any holes in its mesh. While there are excellent online AI tools for this purpose, they are all paid, expensive, and come with limited credits—so having a functional local solution would be a huge breakthrough for this use case.

2

u/OpusFinale 2d ago

I was running into a similar issue, with holes and the mesh being generated with inner shells that were disconnected. Hours of frustration trying to fix it in other software, but for me what did the trick was changing one setting. I don't have access to my ComfyUI install on this pc atm, but if you're using the default comfyui pixal3D multiview template, I believe it was the RemeshMesh node.... by default "sign_mode" is set to "udf", but you need to switch it over to "solid" to help fill small holes/prevent double shells, etc. Also, generating and baking the final textures in the default workflow causes all the vertices to become unwelded, but that's a quick fix in any 3D software with just selecting them all and merging/welding them back together.

Not sure if it's the same exact issue you're experiencing, but that significantly improved the structure of the mesh for me.

1

u/ghost_010010001 1d ago

Man, switching to "solid" really does fix the holes! I had tried that once before, but it didn't solve the issue—however, since you mentioned it, I took the opportunity to tweak some parameters I hadn't touched previously. Specifically, I adjusted the "Fill" value (which defaults to 20); lowering it actually fills in the holes as you decrease the setting. You have to find the right balance, though—I’ll be running several tests to figure out the optimal configuration. Thanks for sharing this; I honestly thought this node wasn't working correctly!

This will be incredibly useful for generating files suitable for 3D printing. While tools like Trellis2 and Pixal3D don't quite measure up to paid models—like those from Meshy, Hi3D, or Tripo—they are open-source and completely unlimited, making them the best options we have right now.

1

u/OpusFinale 1d ago

Glad to hear it worked for you with a bit of tweaking some parameters! And for sure, even though Trellis2/Pixal3D are still lagging far behind the paid models, I'm still always blown away that we can do all this locally.. haven't tried it for 3D printing yet though, I might have to give that a try!

1

u/ghost_010010001 2d ago

I downloaded and tested it; it still generates models with holes, making them unusable for 3D printing. The best alternative remains Trellis2 via ComfyUI, using a downgrade node by visualbrunoBruno.

1

u/MalaMadre211 1d ago

Hey, I'm building something similar with a 5090 and 32 gigs of RAM and I think I'm getting worse results. If you had a similar rig, what would you change in your pipeline to get even better quality?

1

u/OprahsSaggyTits 1d ago

Mind-blowing, can't wait to try this. How does it do with things that are more leading towards functionality? I'm guessing similarly well, as long as the photos uploaded are useful enough for it?

1

u/AlexicoDeCoco 2d ago

nice! might try it later.

1

u/woswoissdenniii 2d ago

Solid. Respekt.