kijai / ComfyUI-moondream

ComfyUI node to use the moondream tiny vision language model
84 stars 13 forks source link

comfyUI_portable size mismatch while trying moondream2 #20

Open lealcc opened 1 month ago

lealcc commented 1 month ago

Error occurred when executing MoondreamQuery:

Error(s) in loading state_dict for Moondream: size mismatch for vision_encoder.projection.mlp.fc1.weight: copying a param with shape torch.Size([8192, 2304]) from checkpoint, the shape in current model is torch.Size([8192, 1152]). You may consider adding ignore_mismatched_sizes=True in the model from_pretrained method.

File "S:\comfy2.0\ComfyUI_windows_portable\ComfyUI\execution.py", line 151, in recursive_execute output_data, output_ui = get_output_data(obj, input_data_all) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "S:\comfy2.0\ComfyUI_windows_portable\ComfyUI\execution.py", line 81, in get_output_data return_values = map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "S:\comfy2.0\ComfyUI_windows_portable\ComfyUI\execution.py", line 74, in map_node_over_list results.append(getattr(obj, func)(**slice_dict(input_data_all, i))) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "S:\comfy2.0\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-moondream\nodes.py", line 62, in process self.moondream = Moondream.from_pretrained(checkpoint_path).to(device=device, dtype=dtype) ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "S:\comfy2.0\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\modeling_utils.py", line 3677, in from_pretrained ) = cls._load_pretrained_model( ^^^^^^^^^^^^^^^^^^^^^^^^^^^ File "S:\comfy2.0\ComfyUI_windows_portable\python_embeded\Lib\site-packages\transformers\modeling_utils.py", line 4155, in _load_pretrained_model raise RuntimeError(f"Error(s) in loading state_dict for {model.class.name}:\n\t{error_msg}")

Trimad commented 1 month ago

I am getting this error also. moondream1 works, but not moondream2.

jeffreyrobeson commented 1 month ago

me too.

Jackaroo05 commented 1 month ago

Getting the same error.

hortom commented 2 weeks ago

I see the same issue.

edwios commented 1 week ago

Same here, it's totally broken :(