Error: RuntimeError: Cuda error: 304[cudaGraphicsGLRegisterBuffer(&s.cudaPosBuffer, s.glPosBuffer, cudaGraphicsRegisterFlagsWriteDiscard);]
- Dominant language
- Python
- Stars
- 188
- Forks
- 14
- PR merge metrics
- No merged PRs in 30d
Description
I tried to use the threefiner to enhance a glb file, but it gives this error, only using --force_cuda_rast I can run it, but the texture comes out different.
```
(env) D:\Documentos\3dGeneration>threefiner sd --mesh 316.glb --prompt 'bus'
```
```
[INFO] save to default output path: .\316_fine.glb.
[INFO] load trimesh: concatenating 1 meshes.
[INFO] load trimesh: use vertex color: torch.Size([46049, 3])
[INFO] load mesh, v: torch.Size([46049, 3]), f: torch.Size([91908, 3])
D:\Documentos\3dGeneration\env\Lib\site-packages\kiui\mesh.py:464: UserWarning: Using torch.cross without specifying the dim arg is deprecated.
Please either pass the dim explicitly or simply use torch.linalg.cross.
The default value of dim will change to agree with that of linalg.cross in a future release. (Triggered internally at ..\aten\src\ATen\native\Cross.cpp:67.)
face_normals = torch.cross(v1 - v0, v2 - v0)
[INFO] load mesh, vn: torch.Size([46049, 3]), fn: torch.Size([91908, 3])
[INFO] mesh cleaning: (46049, 3) --> (45358, 3), (91908, 3) --> (90709, 3)
D:\Documentos\3dGeneration\env\Lib\site-packages\transformers\utils\generic.py:441: UserWarning: torch.utils._pytree._register_pytree_node is deprecated. Please use torch.utils._pytree.register_pytree_node instead.
_torch_pytree._register_pytree_node(
[INFO] fitting texture...
0%| | 0/512 [00:17", line 198, in _run_module_as_main
File "", line 88, in _run_code
File "D:\Documentos\3dGeneration\env\Scripts\threefiner.exe\__main__.py", line 7, in
File "D:\Documentos\3dGeneration\env\Lib\site-packages\threefiner\cli.py", line 10, in main
gui = GUI(opt)
^^^^^^^^
File "D:\Documentos\3dGeneration\env\Lib\site-packages\threefiner\gui.py", line 63, in __init__
self.renderer = Renderer(opt, self.device).to(self.device)
^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Documentos\3dGeneration\env\Lib\site-packages\threefiner\renderer\diffmc_renderer.py", line 93, in __init__
self.fit_texture_from_mesh(self.opt.fit_tex_iters)
File "D:\Documentos\3dGeneration\env\Lib\site-packages\threefiner\renderer\diffmc_renderer.py", line 126, in fit_texture_from_mesh
image_mesh = self.render_mesh(pose, proj, resolution, resolution)['image']
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Documentos\3dGeneration\env\Lib\site-packages\threefiner\renderer\diffmc_renderer.py", line 96, in render_mesh
return render_mesh(
^^^^^^^^^^^^
File "D:\Documentos\3dGeneration\env\Lib\site-packages\threefiner\renderer\mesh_renderer.py", line 45, in render_mesh
rast, rast_db = dr.rasterize(glctx, v_clip, f, (h, w))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Documentos\3dGeneration\env\Lib\site-packages\nvdiffrast\torch\ops.py", line 310, in rasterize
return _rasterize_func.apply(glctx, pos, tri, resolution, ranges, grad_db, -1)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Documentos\3dGeneration\env\Lib\site-packages\torch\autograd\function.py", line 553, in apply
return super().apply(*args, **kwargs) # type: ignore[misc]
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\Documentos\3dGeneration\env\Lib\site-packages\nvdiffrast\torch\ops.py", line 246, in forward
out, out_db = _get_plugin(gl=True).rasterize_fwd_gl(raster_ctx.cpp_wrapper, pos, tri, resolution, ranges, peeling_idx)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Cuda error: 304[cudaGraphicsGLRegisterBuffer(&s.cudaPosBuffer, s.glPosBuffer, cudaGraphicsRegisterFlagsWriteDiscard);]
```
### The glb file:

### The glb refined file:

Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.