Instructions to use pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- llama.cpp
How to use pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF with llama.cpp:
Install (macOS, Linux)
curl -LsSf https://llama.app/install.sh | sh # Start a local OpenAI-compatible server with a web UI: llama serve -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
Install from WinGet (Windows)
winget install llama.cpp # Start a local OpenAI-compatible server with a web UI: llama serve -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M # Run inference directly in the terminal: llama cli -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
Build from source code
git clone https://github.com/ggml-org/llama.cpp.git cd llama.cpp cmake -B build cmake --build build -j --target llama-app # Start a local OpenAI-compatible server with a web UI: ./build/bin/llama serve -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M # Run inference directly in the terminal: ./build/bin/llama cli -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
Use Docker
docker model run hf.co/pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
- Llama new
- LM Studio
- Jan
- Ollama
How to use pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF with Ollama:
ollama run hf.co/pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
- Unsloth Desktop
- Pi
How to use pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF with Pi:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
Configure the model in Pi
# Install Pi: npm install -g @earendil-works/pi-coding-agent # Add to ~/.pi/agent/models.json: { "providers": { "llama-cpp": { "baseUrl": "http://localhost:8080/v1", "api": "openai-completions", "apiKey": "none", "models": [ { "id": "pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M" } ] } } }Run Pi
# Start Pi in your project directory: pi
- Docker Model Runner
How to use pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF with Docker Model Runner:
docker model run hf.co/pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
- Lemonade
How to use pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF with Lemonade:
Pull the model
# Download Lemonade from https://lemonade-server.ai/ lemonade pull pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
Run and chat with the model
lemonade run user.Qwen-Image-2.1-Text-Encoder-Heretic-GGUF-Q4_K_M
List all available models
lemonade list
- Hermes Agent
How to use pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF with Hermes Agent:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
Configure Hermes
# Install Hermes: curl -fsSL https://hermes-agent.nousresearch.com/install.sh | bash hermes setup # Point Hermes at the local server: hermes config set model.provider custom hermes config set model.base_url http://127.0.0.1:8080/v1 hermes config set model.default pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
Run Hermes
hermes
- Atomic Chat
- OpenClaw
How to use pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF with OpenClaw:
Start the llama.cpp server
# Install llama.cpp: brew install llama.cpp # Start a local OpenAI-compatible server: llama serve -hf pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M
Configure OpenClaw
# Install OpenClaw: npm install -g openclaw@latest # Register the local server and set it as the default model: openclaw onboard --non-interactive --mode local \ --auth-choice custom-api-key \ --custom-base-url http://127.0.0.1:8080/v1 \ --custom-model-id "pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-GGUF:Q4_K_M" \ --custom-provider-id llama-cpp \ --custom-compatibility openai \ --custom-text-input \ --accept-risk \ --skip-health
Run OpenClaw
openclaw agent --local --agent main --message "Hello from Hugging Face"
Works for Ideogram 4, but not for Qwen 2.1
I've tried this as the text encoder for qwen 2.1 in comfyui, in T2I and it didn't work (it does work in ideogram 4, this has happened to me with other ggufs of Qwen3 vl 8b). This is the error I get in comfyui when using it to make images with Qwen (I've also tried with euler, just in case, same error)
[INFO] Model QwenImage21 prepared for dynamic VRAM loading. 6920MB Staged. 0 patches attached. Force pre-loaded 65 weights: 63 KB.
(RES4LYF) rk_type: res_2s
0%| | 0/12 [00:00<?, ?it/s][ERROR] !!! Exception during processing !!! Given normalized_shape=[4096], expected input with shape [*4096], but got input of size[1, 512, 12288]
[ERROR] Traceback (most recent call last):
File "/mnt/shared/ComfyUI/execution.py", line 547, 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 "/mnt/shared/ComfyUI/execution.py", line 352, 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 "/mnt/shared/ComfyUI/execution.py", line 326, in _async_map_node_over_list
await process_inputs(input_dict, i)
File "/mnt/shared/ComfyUI/execution.py", line 314, in process_inputs
result = f(**inputs)
File "/mnt/shared/ComfyUI/custom_nodes/efficiency-nodes-comfyui/efficiency_nodes.py", line 741, in sample
samples, images, gifs, preview = process_latent_image(model, seed, steps, cfg, sampler_name, scheduler,
~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
positive, negative, latent_image, denoise, sampler_type, add_noise,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
start_at_step, end_at_step, return_with_leftover_noise, refiner_model,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
refiner_positive, refiner_negative, vae, vae_decode, preview_method)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/custom_nodes/efficiency-nodes-comfyui/efficiency_nodes.py", line 559, in process_latent_image
samples = KSampler().sample(model, seed, steps, cfg, sampler_name, scheduler, positive, negative,
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
latent_image, denoise=denoise)[0] if denoise>0 else latent_image
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/nodes.py", line 1624, in sample
return common_ksampler(model, seed, steps, cfg, sampler_name, scheduler, positive, negative, latent_image, denoise=denoise)
File "/mnt/shared/ComfyUI/nodes.py", line 1588, 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 "/mnt/shared/ComfyUI/comfy/sample.py", line 82, 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 "/mnt/shared/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/utils.py", line 51, in KSampler_sample
return orig_fn(*args, **kwargs)
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 1463, 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 "/mnt/shared/ComfyUI/comfy/samplers.py", line 1353, in sample
return cfg_guider.sample(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 1335, in sample
output = executor.execute(noise, latent_image, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
File "/mnt/shared/ComfyUI/comfy/patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 1262, in outer_sample
output = self.inner_sample(noise, latent_image, device, sampler, sigmas, denoise_mask, callback, disable_pbar, seed, latent_shapes=latent_shapes)
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 1237, in inner_sample
samples = executor.execute(self, sigmas, extra_args, callback, noise, latent_image, denoise_mask, disable_pbar)
File "/mnt/shared/ComfyUI/comfy/patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/custom_nodes/ComfyUI-TiledDiffusion/utils.py", line 34, in KSAMPLER_sample
return orig_fn(*args, **kwargs)
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 1005, in sample
samples = self.sampler_function(model_k, noise, sigmas, extra_args=extra_args, callback=k_callback, disable=disable_pbar, **self.extra_options)
File "/mnt/shared/ComfyUI/custom_nodes/RES4LYF/beta/init.py", line 173, in sample_res_2s
return rk_sampler_beta.sample_rk_beta(model, x, sigmas, None, extra_args, callback, disable, rk_type="res_2s",)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/venvk/lib/python3.13/site-packages/torch/utils/contextlib.py", line 124, in decorate_context
return func(*args, **kwargs)
File "/mnt/shared/ComfyUI/custom_nodes/RES4LYF/beta/rk_sampler_beta.py", line 1758, in sample_rk_beta
eps[row], data[row] = RK(x_tmp, s_tmp, x_0, sigma, transformer_options={'row': row, 'x_tmp': x_tmp, 'sigma_next': sigma_next})
~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/custom_nodes/RES4LYF/beta/rk_method_beta.py", line 949, in call
denoised = self.model_denoised(x.to(self.model_device), sub_sigma.to(self.model_device), **self.extra_args).to(sigma.device)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/custom_nodes/RES4LYF/beta/rk_method_beta.py", line 276, in model_denoised
denoised = self.model(x, sigma * s_in, **extra_args)
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 640, in call
out = self.inner_model(x, sigma, model_options=model_options, seed=seed)
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 1208, in call
return self.outer_predict_noise(*args, **kwargs)
~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 1215, in outer_predict_noise
).execute(x, timestep, model_options, seed)
~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 1218, 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 "/mnt/shared/ComfyUI/comfy/samplers.py", line 620, in sampling_function
out = calc_cond_batch(model, conds, x, timestep, model_options)
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 211, in calc_cond_batch
return _calc_cond_batch_outer(model, conds, x_in, timestep, model_options)
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 219, in _calc_cond_batch_outer
return executor.execute(model, conds, x_in, timestep, model_options)
~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/samplers.py", line 335, in calc_cond_batch
output = model.apply_model(input_x, timestep, **c).chunk(batch_chunks)
~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/model_base.py", line 210, 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 "/mnt/shared/ComfyUI/comfy/patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/model_base.py", line 254, in _apply_model
model_output = self.diffusion_model(xc, t, context=context, control=control, transformer_options=transformer_options, **extra_conds)
File "/mnt/shared/ComfyUI/venvk/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/venvk/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
File "/mnt/shared/ComfyUI/comfy/ldm/qwen_image21/model.py", line 301, 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, ref_latents, image_slots, transformer_options, **kwargs)
~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/patcher_extension.py", line 113, in execute
return self.original(*args, **kwargs)
~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/ldm/qwen_image21/model.py", line 313, in _forward
hidden_states, pe, segments = self.build_sequence(x, context, ref_latents, image_slots)
~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/ldm/qwen_image21/model.py", line 272, in build_sequence
txt = self.txt_in(context)
File "/mnt/shared/ComfyUI/venvk/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/venvk/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
File "/mnt/shared/ComfyUI/comfy/ldm/qwen_image21/model.py", line 39, in forward
return self.out_layer(F.gelu(self.in_layer(self.text_norm(x)), approximate="tanh"))
~~~~~~~~~~~~~~^^^
File "/mnt/shared/ComfyUI/venvk/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1778, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/venvk/lib/python3.13/site-packages/torch/nn/modules/module.py", line 1789, in _call_impl
return forward_call(*args, **kwargs)
File "/mnt/shared/ComfyUI/comfy/ldm/qwen_image21/model.py", line 28, in forward
return comfy.rmsnorm.rms_norm(x.float(), w, self.eps).to(x.dtype)
~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/comfy/rmsnorm.py", line 11, in rms_norm
return torch.nn.functional.rms_norm(x, weight.shape, weight=comfy.model_management.cast_to(weight, dtype=x.dtype, device=x.device), eps=eps)
~~~~~~~~~~~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/mnt/shared/ComfyUI/venvk/lib/python3.13/site-packages/torch/nn/functional.py", line 2958, in rms_norm
return torch.rms_norm(input, normalized_shape, weight, eps)
~~~~~~~~~~~~~~^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
RuntimeError: Given normalized_shape=[4096], expected input with shape [*4096], but got input of size[1, 512, 12288]
[INFO] Prompt executed in 8.09 seconds
0%| | 0/12 [00:00<?, ?it/s]
Hi @juanml82 , I just double-checked the configuration.
βThe text encoder for Qwen-Image-2.1 (which uses Qwen3-VL-8B as the base) outputs a hidden size of 4096. However, the error log shows your ComfyUI is sending a tensor of size 12288 (which is exactly 3 x 4096) to the model.
βThis usually happens if you are using a text encode node designed for SD3 (like a Triple Text Encode) or if your workflow is concatenating multiple text embeddings. Please check your workflow and make sure you are using a standard, single CLIP Text Encode (Prompt) node.
βIf you're still getting the error, feel free to share a screenshot of your workflow so we can figure out where the dimension multiplication is happening!
obviously not tested and not useable for qwen image 2.1. waste of time.
Hi @juanml82 , I just double-checked the configuration.
βThe text encoder for Qwen-Image-2.1 (which uses Qwen3-VL-8B as the base) outputs a hidden size of 4096. However, the error log shows your ComfyUI is sending a tensor of size 12288 (which is exactly 3 x 4096) to the model.
βThis usually happens if you are using a text encode node designed for SD3 (like a Triple Text Encode) or if your workflow is concatenating multiple text embeddings. Please check your workflow and make sure you are using a standard, single CLIP Text Encode (Prompt) node.
βIf you're still getting the error, feel free to share a screenshot of your workflow so we can figure out where the dimension multiplication is happening!
I was concatenating, but I put it directly in the clip text encode node and the same thing happened . The only thing connecting from the ksampler is the latent
Update β you were right, and my earlier "Triple Text Encode / 3Γ4096" guess was wrong. Sorry about that.
This is not a wrong-node issue. I reproduced it end-to-end on 2026-09-23 with the standard Qwen-Image-2.1 workflow (CLIPLoaderGGUF, type qwen_image β TextEncodeQwenImage21 β the official DiT). It fails in the sampler with exactly:
Given normalized_shape=[4096], expected input with shape [*, 4096], but got input of size [1, 512, 12288]
Root cause: when the text encoder is loaded from a GGUF, ComfyUI's qwen_image21 path emits a 12288-wide (3Γ4096) conditioning instead of 4096, so the DiT's txt_in RMSNorm rejects it. In the same test the safetensors W4A8 / bf16 builds emit the correct (Β·, 4096) and generate images fine. So the GGUF file itself is structurally OK (that is why it loads in Ideogram 4's Qwen3-VL wrapper) β ComfyUI simply has no working path to use a GGUF as the Qwen-Image-2.1 text encoder yet.
Fix for Qwen-Image-2.1 in ComfyUI: use the safetensors build, not this GGUF. The abliterated W4A8 is a drop-in for the official CLIPLoader (type qwen_image) and I verified it generates images:
https://huggingface.co/pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-W4A8
This GGUF stays useful for llama.cpp / Mac and Ideogram 4. I have added a prominent warning to the model card. Thanks @juanml82 @tstm @soloish90 for flagging it.
One more correction β my "use W4A8" reply above assumed you have an NVIDIA GPU. The right answer depends on your hardware:
NVIDIA (CUDA): use a safetensors build (both rely on comfy_kitchen CUDA kernels):
- int8-convrot β the format the official ComfyUI templates load by default, so it's a true drop-in (just swap the filename): https://huggingface.co/pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-int8-convrot
- W4A8 β smaller, 6 GB: https://huggingface.co/pottokao/Qwen-Image-2.1-Text-Encoder-Heretic-W4A8
No CUDA (Mac / CPU ComfyUI): the quantized safetensors above all need CUDA kernels, and this GGUF doesn't work as the Qwen-Image-2.1 text encoder (the bug in this thread). The only hardware-agnostic format for ComfyUI is the plain bf16 text encoder β standard safetensors, no special kernels (~17 GB). An abliterated bf16 single-file for ComfyUI isn't published yet β if you need one for a non-CUDA setup, say so here and I'll add it.
This GGUF stays useful for llama.cpp / Ideogram 4 β just not Qwen-Image-2.1 in ComfyUI.
Sorry again for pointing straight to W4A8 β that's CUDA-only and I shouldn't have assumed your GPU.
Update: the GGUF now works in ComfyUI β with a patch for now.
The stock ComfyUI-GGUF flow doesn't support Qwen3-VL GGUF text encoders yet: it skips the mmproj vision tower for qwen3vl, so ComfyUI builds the wrong encoder and you get the [1, 512, 12288] error. The GGUF files themselves were fine β no need to re-download.
Until the fix is merged upstream (city96/ComfyUI-GGUF#485), use this add-on node as a patch:
cd ComfyUI/custom_nodes && git clone https://github.com/pottokao-dotcom/ComfyUI-GGUF-Qwen3VL-TE- Put both
qwen3vl_8b_heretic-Q4_K_M.ggufandmmproj-qwen3vl_8b_heretic-f16.ggufinmodels/text_encoders/β don't rename them, the vision tower is matched by name - Restart ComfyUI β
CLIPLoaderGGUF(typeqwen_image) βTextEncodeQwenImage21
Tested on NVIDIA: text-to-image and reference-image editing both match the bf16 encoder up to Q4 noise. Not tested on a Mac.
If you'd rather not install a node, the FP8 safetensors in this repo works with the stock CLIPLoader.
Thanks @juanml82 and everyone who reported this.
Great, it works! Do you think you could also make an 8B quant? It's probably unneeded, but for those with 24-32gb gpus, the vram is available
Done π Q6_K and Q8_0 are now up alongside the Q4_K_M (qwen3vl_8b_heretic-Q6_K.gguf / -Q8_0.gguf) β use them the same way (pair with the mmproj + the add-on node). Quantized from the verified heretic weights, embeddings kept at Q8_0, and the vision tower still checks out. I added Q6/Q8 to the PE-T2I and PE-I2I GGUF repos too. Enjoy the extra headroom!
Using heretic models as text encoders is a bad idea and can only make your results worse. Here is a post by creator of heretic on this topic explaining why this is the case: https://www.reddit.com/r/StableDiffusion/comments/1vmdxzk/psa_im_the_creator_of_heretic_and_i_advise_you_to/
TL;DR: Don't use "heretic" models as text encoders for H3 or any other generation model. It doesn't uncensor the output and will probably make it worse. Heretic only changes how the LLM represents "harmful" prompts so they look like harmless ones, which stops refusals. It doesn't make those representations more raw or graphic. The image/video model then gets slightly perturbed hidden states it wasn't trained on. At best that does nothing; at worst it hurts prompt adherence and adds artifacts. It will never remove censorship. The possible exception is models like Ideogram that actively refuse prompts, and even those would need a different approach from Heretic's.
That's not the point. The point is, since I have LLMs in the comfyui folder, I may as well be able to run them as text/vision llms with llama.cpp. And if I'm running a model with llama.cpp, it may as well be abliterated so I don't have to bother with jailbreaks or refusals.
The outputs it produces in comfyui are almost identical, and I wouldn't call either as lower quality, they just have slightly different details.
