GGUF Model Dimension Mismatch
2026-04-042 turns14,171 charsgpt-5-3
Summary
User encountered a dimension mismatch error while loading a GGUF model, likely due to incompatible model architecture or quantization settings.
Messages
oaded completely; 12738.98 MB loaded, full load: True
0%| | 0/4 [00:00<?, ?it/s]
!!! Exception during processing !!! Given normalized_shape=[3584], expected input with shape [*3584], but got input of size[1, 21, 2560]
Traceback (most recent call last):
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/execution.py", line 534, 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, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/execution.py", line 334, 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, v3_data=v3_data)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/execution.py", line 308, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/execution.py", line 296, in process_inputs
result = f(**inputs)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/nodes.py", line 1591, in sample
return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/nodes.py", line 1556, in common_ksampler
samples = comfy.sample.sample(model, noise, steps, cfg, sampler_name, scheduler, positive, negative, latent_image,
denoise=denoise, disable_noise=disable_noise, start_step=start_step, last_step=last_step,
force_full_denoise=force_full_denoise, noise_mask=noise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/sample.py", line 66, in sample
samples = sampler.sample(noise, positive, negative, cfg=cfg, latent_image=latent_image, start_step=start_step, last_step=last_step, force_full_denoise=force_full_denoise, denoise_mask=noise_mask, sigmas=sigmas, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 1180, in sample
return sample(self.model, noise, positive, negative, cfg, self.device, sampler, sigmas, self.model_options, latent_image=latent_image, denoise_mask=denoise_mask, callback=callback, disable_pbar=disable_pbar, seed=seed)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 1070, in sample
return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 1052, in sample
output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/patcher_extension.py", line 112, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 995, in outer_sample
output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 981, in inner_sample
samples = executor.execute(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/patcher_extension.py", line 112, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 751, in sample
samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
File "/Users/danielkliewer/Documents/Projects/Comfy/venv/lib/python3.14/site-packages/torch/utils/_contextlib.py", line 124, in decorate_context
return func(*args, **kwargs)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/k_diffusion/sampling.py", line 205, in sample_euler
denoised = model(x, sigma_hat * s_in, **extra_args)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 400, in __call__
out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 954, in __call__
return self.outer_predict_noise(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 961, in outer_predict_noise
).execute(x, timestep, model_options, seed)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/patcher_extension.py", line 112, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 964, in predict_noise
return sampling_function(self.inner_model, x, timestep, self.conds.get("negative", None), self.conds.get("positive", None), self.cfg, model_options=model_options, seed=seed)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 380, in sampling_function
out = calc_cond_batch(model, conds, x, timestep, model_options)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 205, in calc_cond_batch
return _calc_cond_batch_outer(model, conds, x_in, timestep, model_options)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 213, in _calc_cond_batch_outer
return executor.execute(model, conds, x_in, timestep, model_options)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/patcher_extension.py", line 112, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/samplers.py", line 325, in _calc_cond_batch
output = model.apply_model(input_x, timestep_, **c).chunk(batch_chunks)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/model_base.py", line 172, in apply_model
return comfy.patcher_extension.WrapperExecutor.new_class_executor(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...<2 lines>...
comfy.patcher_extension.get_all_wrappers(comfy.patcher_extension.WrappersMP.APPLY_MODEL, transformer_options)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
).execute(x, t, c_concat, c_crossattn, control, transformer_options, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/patcher_extension.py", line 112, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/model_base.py", line 211, in _apply_model
model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds)
File "/Users/danielkliewer/Documents/Projects/Comfy/venv/lib/python3.14/site-packages/torch/nn/modules/module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/venv/lib/python3.14/site-packages/torch/nn/modules/module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/ldm/qwen_image/model.py", line 427, in forward
return comfy.patcher_extension.WrapperExecutor.new_class_executor(
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
...<2 lines>...
comfy.patcher_extension.get_all_wrappers(comfy.patcher_extension.WrappersMP.DIFFUSION_MODEL, transformer_options)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
).execute(x, timestep, context, attention_mask, ref_latents, additional_t_cond, transformer_options, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/patcher_extension.py", line 112, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/ldm/qwen_image/model.py", line 500, in _forward
encoder_hidden_states = self.txt_norm(encoder_hidden_states)
File "/Users/danielkliewer/Documents/Projects/Comfy/venv/lib/python3.14/site-packages/torch/nn/modules/module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/venv/lib/python3.14/site-packages/torch/nn/modules/module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/ops.py", line 516, in forward
return self.forward_comfy_cast_weights(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/Users/danielkliewer/Documents/Projects/Comfy/comfy/comfy/ops.py", line 509, in forward_comfy_cast_weights
x = torch.nn.functional.rms_norm(input, self.normalized_shape, weight, self.eps)
File "/Users/danielkliewer/Documents/Projects/Comfy/venv/lib/python3.14/site-packages/torch/nn/functional.py", line 2958, in rms_norm
return torch.rms_norm(input, normalized_shape, weight, eps)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Given normalized_shape=[3584], expected input with shape [*3584], but got input of size[1, 21, 2560]
Prompt executed in 32.77 seconds
This is actually a **very specific (and very common) mismatch error** when working with GGUF + ComfyUI + Qwen image models.
Let’s strip it down to what matters:
---
## 🔥 The Core Error
```
expected input with shape [*3584]
but got input of size [1, 21, 2560]
```
### Translation:
Your model expects **embedding size = 3584**
But it’s receiving **embedding size = 2560**
---
## 🧠 What This REALLY Means
You have a **component mismatch in your graph**:
| Component | Expected Dim | Actual Dim |
|---------------------|-------------|------------|
| Qwen Image Model | 3584 | ❌ |
| Text Encoder (CLIP / GGUF) | ❌ | 2560 |
So:
> ❌ Your **text encoder does NOT match your diffusion model**
---
## 💥 Why This Happens (in your setup)
You said:
> “I am just using the gguf”
That’s the issue.
GGUF models (especially Qwen-based ones) often bundle:
- their own tokenizer
- their own text encoder
- specific embedding dimensions
But in ComfyUI, you likely:
- plugged a **separate CLIP or text encoder node**
- or used a **default one (like SDXL CLIP)**
👉 That encoder outputs **2560-dim embeddings**, not 3584.
---
## ✅ Fix Options (Pick ONE)
### ✅ Option 1 — Use the CORRECT Text Encoder for the GGUF model
You need the **matching Qwen text encoder**.
Look for something like:
- `Qwen Image Text Encoder`
- or a loader node that comes with the GGUF model
👉 In many custom nodes:
- The GGUF loader outputs BOTH:
- model
- conditioning / text encoder
**You must use THAT output — not a separate CLIP node**
---
### ✅ Option 2 — Use a Fully Integrated GGUF Node
If you're using something like:
- `GGUF Loader`
- `Qwen Image Loader`
Make sure your graph looks like:
```
[Prompt]
↓
[Tokenizer / Encoder FROM GGUF]
↓
[Conditioning]
↓
[KSampler]
↓
[Decode]
```
🚫 NOT:
```
[Prompt]
↓
[CLIP Text Encode (SDXL)]
↓
[KSampler] ← (this causes your error)
```
---
### ✅ Option 3 — Match Model + Encoder Pair Manually
If you're mixing:
- Qwen model
- SDXL encoder
It will NEVER work unless dimensions match.
So either:
- switch model → SDXL
- OR switch encoder → Qwen
---
## 🔍 Quick Debug Checklist
Ask yourself:
- Are you using **CLIPTextEncode** node? → ❌ remove it
- Does your GGUF loader provide **conditioning output?** → ✅ use that
- Are all nodes from the **same model ecosystem?** → must be YES
---
## 🧪 Why 2560 vs 3584?
This is actually useful:
- **2560** → typical of some CLIP variants / SDXL
- **3584** → Qwen image architecture
So the error literally tells you:
> “You mixed SDXL brain with Qwen body”
---
## 🧩 If You Want — I Can Fix Your Graph
If you paste your full workflow JSON again, I’ll:
- connect every node correctly
- ensure GGUF-only pipeline
- remove all incompatible pieces
No half-working fixes — I’ll make it clean and runnable.
---
You’re close — this isn’t a random crash.
It’s Comfy basically saying:
> “Your model and your language don’t speak the same dimension.”
gpt-5-3