MrForExample / ComfyUI-3D-Pack

An extensive node suite that enables ComfyUI to process 3D inputs (Mesh & UV Texture, etc) using cutting edge algorithms (3DGS, NeRF, etc.)
MIT License
2.07k stars 199 forks source link

MVDream model error #34

Closed kakachiex2 closed 6 months ago

kakachiex2 commented 6 months ago

I run the workflow first time it work but generate a cube with the model like in an ice cube, second time get this error:

Error occurred when executing [Comfy3D] MVDream Model:

Unable to infer channel dimension format

File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 152, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 82, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\execution.py", line 75, in map_node_over_list results.append(getattr(obj, func)(*slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI-3D-Pack\nodes.py", line 1213, in run_mvdream mv_images = mvdream_pipe(prompt, reference_image, generator=generator, negative_prompt=prompt_neg, guidance_scale=mv_guidance_scale, num_inference_steps=num_inference_steps, elevation=elevation) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\torch\utils_contextlib.py", line 115, in decorate_context return func(args, kwargs) ^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI-3D-Pack\lgm\mvdream\pipeline_mvdream.py", line 468, in call image_embeds_neg, image_embeds_pos = self.encode_image(image, device, num_images_per_prompt) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\ComfyUI\custom_nodes\ComfyUI-3D-Pack\lgm\mvdream\pipeline_mvdream.py", line 408, in encode_image image = self.feature_extractor(image, return_tensors="pt").pixel_values ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\transformers\image_processing_utils.py", line 552, in call return self.preprocess(images, kwargs) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\transformers\models\clip\image_processing_clip.py", line 296, in preprocess input_data_format = infer_channel_dimension_format(images[0]) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "K:\ComfyUI\ComfyUI_Ex\python_miniconda_env\ComfyUI\Lib\site-packages\transformers\image_utils.py", line 206, in infer_channel_dimension_format raise ValueError("Unable to infer channel dimension format")

kakachiex2 commented 6 months ago

by the way this is really slow it take a lot to in the fitting process

kakachiex2 commented 6 months ago

Solved looks like the BRIA background remover result comflict with the MVDream model I load the Cat example image and is working but the BRIA background remover is a good node for this workflow because it generate the mask perfectly. Here is the Workflow. 2D_ 2 _3DModel_WF_V1 0

kakachiex2 commented 6 months ago

Super nice Thanks MrForExample for this nice tool Screenshot 2024-02-12 200258

kakachiex2 commented 6 months ago

I solved the BRIA background remover problem by Vae-Encoding | Decoding the image

MrForExample commented 6 months ago

Glad you find the solution, if you have other problem feel free o let me know 👍