Skip to content
New issue

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

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

Already on GitHub? Sign in to your account

Error occurred when executing [Comfy3D] Fitting Mesh With Multiview Images #167

Open
q576333 opened this issue Jun 13, 2024 · 3 comments
Open

Comments

@q576333
Copy link

q576333 commented Jun 13, 2024

Hi MrForExample,
I found an issue that DiffMesh class on diff_mesh.py without the self.gs_params. It seems that miss the gs_params input.
image

Following are my face issue in Multi-View-Images_to_3DGS_to_3DMesh(DMTet and DiffRast) workflow.
image

@807502278
Copy link

I also encountered it, it appeared after the last update

@synystersocks
Copy link

i also have this error, been through the scripts, as far as i can see is the params are shown in the nodes.py -

line 1097 -

with torch.inference_mode(False):

                gs_params = GSParams(
                    training_iterations,
                    batch_size,
                    ms_ssim_loss_weight,
                    alpha_loss_weight,
                    offset_loss_weight,
                    offset_opacity_loss_weight,
                    invert_background_probability,
                    feature_learning_rate,
                    opacity_learning_rate,
                    scaling_learning_rate,
                    rotation_learning_rate,
                    position_learning_rate_init,
                    position_learning_rate_final,
                    position_learning_rate_delay_mult,
                    position_learning_rate_max_steps,
                    initial_gaussians_num,
                    K_nearest_neighbors,
                    percent_dense,
                    density_start_iterations,
                    density_end_iterations,
                    densification_interval,
                    opacity_reset_interval,
                    densify_grad_threshold,
                    gaussian_sh_degree
                )
                
                
                if points_cloud_to_initialize_gaussian is not None:
                    gs_init_input = points_cloud_to_initialize_gaussian
                elif ply_to_initialize_gaussian is not None:
                    gs_init_input = ply_to_initialize_gaussian
                else:
                    gs_init_input = mesh_to_initialize_gaussian
                
                gs = GaussianSplatting(gs_params, gs_init_input)
                gs.prepare_training(reference_images, reference_masks, reference_orbit_camera_poses, reference_orbit_camera_fovy)
                gs.training()

                gs_ply = gs.renderer.gaussians.to_ply()

at line 1222 in nodes.py which passes

                mesh_fitter = DiffMesh(mesh, training_iterations, batch_size, texture_learning_rate, train_mesh_geometry, 
                geometry_learning_rate, ms_ssim_loss_weight, remesh_after_n_iteration, force_cuda_rasterize)

this is part of the - class Fitting_Mesh_With_Multiview_Images:

line - 1147.

i tried adding an input to the node, but i broke other things, any insight would be great :D

@807502278
Copy link

807502278 commented Jul 1, 2024

You can add a parameter to the DiffMesh.prepare_training method in the diff_mesh.py file to replace self.gs_params.invert_bg_prob, and then expose it for calling in nodes.py,

or use the diff_mesh.py file of April 29 but add the latest DiffMeshCameraController class

But it's better to wait for the author to update.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants