ejones / triposr-texture-gen Goto Github PK
View Code? Open in Web Editor NEWGenerates a texture for 3D models created by the TripoSR image-to-3D model
License: MIT License
Generates a texture for 3D models created by the TripoSR image-to-3D model
License: MIT License
Saw your tweet and tried to get it running in Google Colab. Seems to do the depth but doesn't generate the model texture. If you get a chance can you take a look and let me know any suggestions:
colab link
i really like that this generates textures significantly faster than TEXTurePaper
any recommendations on improving seams?
File "text2texture.py", line 329, in
tmesh = text2texture(
File "text2texture.py", line 229, in text2texture
tmesh.compute_uvatlas(size, parallel_partitions=2)
RuntimeError: [Open3D Error] (void open3d::t::geometry::kernel::uvunwrapping::{anonymous}::ComputeUVAtlasPartition(open3d::t::geometry::TriangleMesh, float, bool, open3d::t::geometry::kernel::uvunwrapping::{anonymous}::UVAtlasPartitionOutput&)) /root/Open3D/cpp/open3d/t/geometry/kernel/UVUnwrapping.cpp:124: UVAtlasPartition: Non-manifold mesh
how to solve it?thanks!
I'm sure there is a correct way to reference bash like this in windows that is also generalizable for mac and linux, but I couldn't find it.
I got past this bit by switching it to a full path, ex : 'C:\Program Files\Git\bin\bash.exe'
Also it would be super helpful to make it as a custom node for ComfyUI. Thanks & Great Work!
Traceback (most recent call last):
File "E:\Business\TripoSR\texture-gen\text2texture.py", line 345, in
tmesh = text2texture(
File "E:\Business\TripoSR\texture-gen\text2texture.py", line 282, in text2texture
np.array(Image.open(painted_path)),
File "D:\Users\ellio\miniconda3\envs\tripo\lib\site-packages\PIL\Image.py", line 3247, in open
fp = builtins.open(filename, "rb")
Isn't the script supposed to generate painted_path for color as well?
Could you possibly please turn this into a comfyui node to work with this https://github.com/flowtyone/ComfyUI-Flowty-TripoSR
Thank you :)
I have a error :
(textureautovenv) (base) C:\pinokio\api\triposr.git\app>python text2texture.py .\output\catgirl.obj "catgirl"
processing mesh
computing UV atlas for 9999 triangles
[Open3D INFO] actual parallel_partitions 3
saving depth map at output\mesh-preproc-depth.png
'C:\pinokio\api\triposr.git\app\depth_txt2img.py' catgirl 'output\mesh-preproc-depth.png' 'output\mesh-preproc-depth-paint.png' --steps 12 --image-model 'SG161222\Realistic_Vision_V5.1_noVAE'
Fatal Python error: _Py_HashRandomization_Init: failed to get random numbers to initialize Python
Python runtime state: preinitialized
Traceback (most recent call last):
File "C:\pinokio\api\triposr.git\app\text2texture.py", line 329, in
tmesh = text2texture(
File "C:\pinokio\api\triposr.git\app\text2texture.py", line 258, in text2texture
subprocess.run(
File "C:\pinokio\bin\miniconda\lib\subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['C:\pinokio\api\triposr.git\app\textureautovenv\Scripts\python.exe', 'C:\pinokio\api\triposr.git\app\depth_txt2img.py', 'catgirl', 'output\mesh-preproc-depth.png', 'output\mesh-preproc-depth-paint.png', '--steps', '12', '--image-model', 'SG161222\Realistic_Vision_V5.1_noVAE']' returned non-zero exit status 1.
see this stackoverflow question/answer
https://stackoverflow.com/questions/78652758/cryptic-oserror-winerror-10106-the-requested-service-provider-could-not-be-l
in text2tecture.py you have ~line 258
subprocess.run(
[sys.executable, *depth_paint_args],
check=True,
env={'PYTORCH_ENABLE_MPS_FALLBACK': '1'},
)
as described in the stack overflow answer, env= works fine on mac an linux, but causes errors on windows.
env should first be initialized by copying the system and then added to.
code should be something like this (tested on my system)
enviroment = os.environ.copy()
enviroment['PYTORCH_ENABLE_MPS_FALLBACK'] = '1'
subprocess.run(
[sys.executable, *depth_paint_args],
check=True,
env=enviroment
)
Great work! Note the resolution of TripoSR is only 256, can we use the multi view images and mesh file generated by TripoSR to generate texture to improve the resolution of the 3D model generated by TripoSR using your method. We can firstly use StableDiffusionUpScalePipeline to impove the resolution of rendered image of TripoSR.
I have a error message I use windows 10 :
[Open3D WARNING] Unable to load file ~/output/arcade.obj with ASSIMP
processing mesh
[Open3D WARNING] Creating from empty legacy TriangleMesh.
Traceback (most recent call last):
File "C:\Users\Shadow\Desktop\triposr-texture-gen\text2texture.py", line 329, in
tmesh = text2texture(
File "C:\Users\Shadow\Desktop\triposr-texture-gen\text2texture.py", line 228, in text2texture
print('computing UV atlas for', len(tmesh.triangle.indices), 'triangles')
KeyError: 'Key indices not found in TensorMap'
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.