Skip to content

Using the CLIP coder with GGUF will pop up an error...RuntimeError: mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280) #324

@NiuRou520

Description

@NiuRou520

现在报错这个
got prompt
Requested to load WanVAE
loaded completely 2318.875 242.02829551696777 True
Requested to load QwenImageTEModel_
loaded completely 13499.675 7898.2685546875 True
!!! Exception during processing !!! mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)
Traceback (most recent call last):
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 496, in execute
output_data, output_ui, has_subgraph, has_pending_tasks = await get_output_data(prompt_id, unique_id, obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 315, in get_output_data
return_values = await _async_map_node_over_list(prompt_id, unique_id, obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb, hidden_inputs=hidden_inputs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 289, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\execution.py", line 277, in process_inputs
result = f(**inputs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy_extras\nodes_qwen.py", line 40, in encode
conditioning = clip.encode_from_tokens_scheduled(tokens)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 170, in encode_from_tokens_scheduled
pooled_dict = self.encode_from_tokens(tokens, return_pooled=return_pooled, return_dict=True)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd.py", line 232, in encode_from_tokens
o = self.cond_stage_model.encode_token_weights(tokens)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\qwen_image.py", line 51, in encode_token_weights
out, pooled, extra = super().encode_token_weights(token_weight_pairs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 689, in encode_token_weights
out = getattr(self, self.clip).encode_token_weights(token_weight_pairs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 45, in encode_token_weights
o = self.encode(to_encode)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 291, in encode
return self(tokens)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 253, in forward
embeds, attention_mask, num_tokens, embeds_info = self.process_tokens(tokens, device)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\sd1_clip.py", line 219, in process_tokens
emb, extra = self.transformer.preprocess_embed(emb, device=device)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\llama.py", line 397, in preprocess_embed
return self.visual(image.to(device, dtype=torch.float32), grid), grid
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\qwen_vl.py", line 425, in forward
hidden_states = block(hidden_states, position_embeddings, cu_seqlens_now, optimized_attention=optimized_attention)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\qwen_vl.py", line 252, in forward
hidden_states = self.attn(hidden_states, position_embeddings, cu_seqlens, optimized_attention)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\text_encoders\qwen_vl.py", line 195, in forward
qkv = self.qkv(hidden_states)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1736, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\python\lib\site-packages\torch\nn\modules\module.py", line 1747, in _call_impl
return forward_call(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 110, in forward
return self.forward_comfy_cast_weights(*args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\custom_nodes\ComfyUI-GGUF\ops.py", line 217, in forward_comfy_cast_weights
out = super().forward_comfy_cast_weights(input, *args, **kwargs)
File "F:\stable\ComfyUI\ComfyUI_windows_portable\ComfyUI\comfy\ops.py", line 106, in forward_comfy_cast_weights
return torch.nn.functional.linear(input, weight, bias)
RuntimeError: mat1 and mat2 shapes cannot be multiplied (5476x1280 and 3840x1280)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions