XLabs-AI / x-flux

Apache License 2.0
1.32k stars 89 forks source link

Error occurred when executing ApplyFluxIPAdapter: #65

Open plugcrypt opened 3 weeks ago

plugcrypt commented 3 weeks ago
Error occurred when executing ApplyFluxIPAdapter:

mat1 and mat2 shapes cannot be multiplied (1x1024 and 768x16384)

File "D:\SD\ComfyUI_Windows_portable\ComfyUI\execution.py", line 316, in execute
output_data, output_ui, has_subgraph = get_output_data(obj, input_data_all, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_Windows_portable\ComfyUI\execution.py", line 191, in get_output_data
return_values = _map_node_over_list(obj, input_data_all, obj.FUNCTION, allow_interrupt=True, execution_block_cb=execution_block_cb, pre_execute_cb=pre_execute_cb)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_Windows_portable\ComfyUI\execution.py", line 168, in _map_node_over_list
process_inputs(input_dict, i)
File "D:\SD\ComfyUI_Windows_portable\ComfyUI\execution.py", line 157, in process_inputs
results.append(getattr(obj, func)(**inputs))
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\x-flux-comfyui\nodes.py", line 504, in applymodel
ip_projes = ip_adapter_flux['ip_adapter_proj_model'](embeds.to(ip_projes_dev, dtype=torch.bfloat16)).to(device, dtype=torch.bfloat16)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_windows_portable\ComfyUI\custom_nodes\x-flux-comfyui\layers.py", line 283, in forward
clip_extra_context_tokens = self.proj(embeds).reshape(
^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1553, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\module.py", line 1562, in _call_impl
return forward_call(*args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "D:\SD\ComfyUI_Windows_portable\python_embeded\Lib\site-packages\torch\nn\modules\linear.py", line 117, in forward
return F.linear(input, self.weight, self.bias)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

2024-08-21 17_22_49-ComfyUI

Same error with different resolutions input, different models weights (default, fp8), same error on the provided example workflow, ComfyUI and dependencies up to date "ComfyUI: 25905e806f"

Vorzec commented 3 weeks ago

I was in the same situation but I used wrong clip vision model.

tripsitter-psy commented 2 weeks ago

(eddit) for anyone who needs it https://huggingface.co/openai/clip-vit-large-patch14/tree/main > I was in the same situation but I used wrong clip vision model.

like to tell us the correct one?

Hamstersteroon commented 2 weeks ago

(eddit) for anyone who needs it https://huggingface.co/openai/clip-vit-large-patch14/tree/main > I was in the same situation but I used wrong clip vision model.

like to tell us the correct one?

Download file - MODEL.SAFETENSORS thats 1.71gb