Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Update postprocessors.py #76

Merged
merged 1 commit into from
Feb 6, 2025
Merged

Conversation

NoviceArtisan
Copy link
Contributor

increase mesh output faces to 150k instead of 40k for finer details.

Increases runtime massively, but the finished meshs output by it are vastly superior.

I can add in a slider or dropdown to teh main UX if you want to integrate some user choice and suggest that as a parrallel change if you let me know that'd be handy?

increase mesh output faces to 150k instead of 40k for finer details. 

Increases runtime massively, but the finished meshs output by it are vastly superior. 

I can add in a slider or dropdown to teh main UX if you want to integrate some user choice and suggest that as a parrallel change if you let me know that'd be handy?
@FurkanGozukara
Copy link

FurkanGozukara commented Feb 3, 2025

awesome

can you post comparison of 40k vs 150k?

actually that variable should be set from gradio interface

@NoviceArtisan
Copy link
Contributor Author

set from gradi

Yeah, can do, just gimme a few, low vram lol And yeah, gradio is the better place to put it (i.e. a slider/drop down) i'm just not familiar enough with the source to write that out, I just recognise where to make the changes, and have been making sucessive manual changes to get the right level for my generations.

I'll spend a minute looking at gradi, add the button, and see if it does actaully effect teh changes to the postprocessor file when adjusted vs teh manual method (i never trust code to work as expected lol)

@NoviceArtisan
Copy link
Contributor Author

awesome

can you post comparison of 40k vs 150k?

actually that variable should be set from gradio interface

I tried adding the line

max_facenum = gr.Slider(maximum=150000, minimum=20000, value=40000, label='Faces')

to the advanced tab in the gradio.py file, but it didnt' behave as I was expecting, it shows in the app, but I can't change the values (up/down is locked off)
Maybe i need to remove the set entry from postprocessing.py so it doens't get locked?

First 150k image model here

image

I'll make the 40k one next, with same settings (512 octree and 50 steps, seed 1234 and guidance 5.5)

@NoviceArtisan
Copy link
Contributor Author

Okay, so here's the 40k model, left side, and right side is the 150k model. No artificial smoothing/shading like in the previous message, forgot i'd left that on.

image

image

image

As the stuff I generate is exclusively for use in jewellery, and these are 3D printed to start in a fine quality printer, every last little fine detail matters, as they'll be treasured and used for decades to come. The voxels/mesh is absolutley visible and strongly defined at just 40k size even on small 80mm tall models.
For these use cases, the additional costs and efforts that come with polishin away defects/visible polygons etc when they can just be fixed at generation is an issue that's nicer to have resolved than trying the model, and been unsatisfied with the quality and rejecting the use of it outright. Though i did start by running subdivisions and smoothing passes in my cad packages before i bothered to look into the code to try get it better to start with

I also sent a ?pull request? like this one with the correct (many more than i thought initially would be needed lol) changes to the gradio py app that add in the slider to control it, rather than this lowkey effort with a fixed imcrease in the output faces (least that's what i hope it does, my install is a bit modded and i'm bad at tracking, think it should work for the main anyway).

Hope I'm doing this the right way, I'm very new to working through github or sharing code changes in general.
Just this is one that I think will benefit a lot of people in a lot of ways

@wsbagnsv1
Copy link

Thats genuinely insane your a legend!

@Zeqiang-Lai Zeqiang-Lai merged commit c410aa2 into Tencent:main Feb 6, 2025
1 check passed
jclarkk pushed a commit to jclarkk/Hunyuan3D-2 that referenced this pull request Mar 18, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants