---
title: DEPRECATED-qwen-image-gguf-test
canonical_url: "https://www.modelscope.cn/models/AI-ModelScope/DEPRECATED-qwen-image-gguf-test"
md_url: "https://www.modelscope.cn/models/AI-ModelScope/DEPRECATED-qwen-image-gguf-test.md"
repository: AI-ModelScope/DEPRECATED-qwen-image-gguf-test
last_updated: 2025-08-06
license: apache-2.0
library_name:
  - gguf
  - pytorch
frameworks:
  - pytorch
downloads: 280
stars: 0
tags:
  - gguf
---

# DEPRECATED-qwen-image-gguf-test

> DEPRECATED-qwen-image-gguf-test - AI-ModelScope 在 ModelScope 开源的模型。[!IMPORTANT] ⚠️ Deprecation Notice Please visit city96's repo https://huggingface.co/city96/Qwen-Image-gguf/tree/main for the full updated quants This project is now deprecated and was…

AI-ModelScope/DEPRECATED-qwen-image-gguf-test 是 ModelScope 魔搭社区上的机器学习模型，采用 apache-2.0 许可。

- **Repository**: AI-ModelScope/DEPRECATED-qwen-image-gguf-test
- **License**: apache-2.0
- **Tags**: gguf
- **Downloads**: 280
- **Stars**: 0
- **Last updated**: 2025-08-06

Source: https://www.modelscope.cn/models/AI-ModelScope/DEPRECATED-qwen-image-gguf-test

---

> [!IMPORTANT]
> ⚠️ **Deprecation Notice**
>
> Please visit city96's repo https://huggingface.co/city96/Qwen-Image-gguf/tree/main for the full updated quants
> 
> This project is now **deprecated** and was intended for **experimental use only**.
> 
> This contains **non-official and suboptimal patches**.
>

---

# Please visit city96's repo https://huggingface.co/city96/Qwen-Image-gguf/


--- 

## ComfyUI Initial GGUF Tests
Update ComfyUI to pull the relevant updates ([Initial support for qwen image model](https://github.com/comfyanonymous/ComfyUI/commit/c012400240d4867cd63a45220eb791b91ad47617)) 

Update [ComfyUI-GGUF](https://github.com/city96/ComfyUI-GGUF) nodes.

| Type         | Name                                               | Location                       | Download         |
| ------------ | -------------------------------------------------- | ------------------------------ | ---------------- |
| Main Model   | Qwen_Image-GGUF                                    | `ComfyUI/models/unet`          | [GGUF](https://huggingface.co/city96/Qwen-Image-gguf/tree/main) |
| Text Encoder | qwen_2.5_vl_7b                                     | `ComfyUI/models/text_encoders` | [Safetensors](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/tree/main/split_files/text_encoders) |
| VAE          | qwen_image_vae                                     | `ComfyUI/models/vae`           | [Safetensors](https://huggingface.co/Comfy-Org/Qwen-Image_ComfyUI/tree/main/split_files/vae) |

[**ComfyUI example workflow**](https://docs.comfy.org/tutorials/image/qwen/qwen-image)

---

# References
Tensors: https://huggingface.co/Qwen/Qwen-Image/blob/main/transformer/diffusion_pytorch_model.safetensors.index.json

Tools: https://github.com/city96/ComfyUI-GGUF/tree/main/tools

Patches for unknown model: ([referring last commit for cosmos](https://github.com/city96/ComfyUI-GGUF/commit/b3ec875a68d94b758914fd48d30571d953bb7a54))

ComfyUI Implementation: https://github.com/comfyanonymous/ComfyUI/commit/c012400240d4867cd63a45220eb791b91ad47617

---

# Patches (non-official)

convert.py ([ref](https://github.com/city96/ComfyUI-GGUF/commit/b3ec875a68d94b758914fd48d30571d953bb7a54#diff-c704a6f85aa19f97e68414cba03fdc0b73ab84e0d08b38b48a0e2ccc69283e57))
```python
class ModelQwenImage(ModelTemplate):
    arch = "qwen_image"
    keys_detect = [
        (
            "img_in.weight",
            "transformer_blocks.59.attn.add_q_proj.weight",
            "transformer_blocks.59.attn.add_k_proj.weight",
        )
    ]
    keys_banned = []  # Don't ban anything here
```

```python
arch_list = [ModelQwenImage, ModelFlux, ModelSD3, ModelAura, ModelHiDream, ModelLTXV, ModelHyVid, ModelWan, ModelSDXL, ModelSD1]
```

loader.py ([ref](https://github.com/city96/ComfyUI-GGUF/commit/b3ec875a68d94b758914fd48d30571d953bb7a54#diff-86393d83b45516ef8888170f0149c4c74625a15d65eb084d7f74df2bbf41d1f1))
```
IMG_ARCH_LIST = {"qwen_image", "flux", "sd1", "sdxl", "sd3", "aura", "hidream", "cosmos", "ltxv", "hyvid", "wan"}
```

lcpp.patch ([ref](https://github.com/city96/ComfyUI-GGUF/commit/b3ec875a68d94b758914fd48d30571d953bb7a54#diff-9b1be04da7c789792aab70c44b25d3ff23da1a61f6ec575a480a4e987aaf9a66))
```
--- a/src/llama.cpp
+++ b/src/llama.cpp
@@ -205,6 +205,17 @@ enum llm_arch {
     LLM_ARCH_GRANITE,
     LLM_ARCH_GRANITE_MOE,
     LLM_ARCH_CHAMELEON,
+    LLM_ARCH_FLUX,
+    LLM_ARCH_SD1,
+    LLM_ARCH_SDXL,
+    LLM_ARCH_SD3,
+    LLM_ARCH_AURA,
+    LLM_ARCH_LTXV,
+    LLM_ARCH_HYVID,
+    LLM_ARCH_WAN,
+    LLM_ARCH_HIDREAM,
+    LLM_ARCH_COSMOS,
+    LLM_ARCH_QWEN_IMAGE,

@@ -258,6 +269,17 @@ static const std::map<llm_arch, const char *> LLM_ARCH_NAMES = {
     { LLM_ARCH_GRANITE,         "granite"      },
     { LLM_ARCH_GRANITE_MOE,     "granitemoe"   },
     { LLM_ARCH_CHAMELEON,       "chameleon"    },
+    { LLM_ARCH_FLUX,            "flux"         },
+    { LLM_ARCH_SD1,             "sd1"          },
+    { LLM_ARCH_SDXL,            "sdxl"         },
+    { LLM_ARCH_SD3,             "sd3"          },
+    { LLM_ARCH_AURA,            "aura"         },
+    { LLM_ARCH_LTXV,            "ltxv"         },
+    { LLM_ARCH_HYVID,           "hyvid"        },
+    { LLM_ARCH_WAN,             "wan"          },
+    { LLM_ARCH_HIDREAM,         "hidream"      },
+    { LLM_ARCH_COSMOS,          "cosmos"       },
+    { LLM_ARCH_QWEN_IMAGE,      "qwen_image"    },
     { LLM_ARCH_UNKNOWN,         "(unknown)"    },

@@ -1531,6 +1553,17 @@ static const std::map<llm_arch, std::map<llm_tensor, const char *>> LLM_TENSOR_N
             { LLM_TENSOR_ATTN_K_NORM,     "blk.%d.attn_k_norm" },
         },
     },
+    { LLM_ARCH_FLUX,       {}},
+    { LLM_ARCH_SD1,        {}},
+    { LLM_ARCH_SDXL,       {}},
+    { LLM_ARCH_SD3,        {}},
+    { LLM_ARCH_AURA,       {}},
+    { LLM_ARCH_LTXV,       {}},
+    { LLM_ARCH_HYVID,      {}},
+    { LLM_ARCH_WAN,        {}},
+    { LLM_ARCH_HIDREAM,    {}},
+    { LLM_ARCH_COSMOS,     {}},
+    { LLM_ARCH_QWEN_IMAGE, {}},
     {
         LLM_ARCH_UNKNOWN,

@@ -5403,6 +5436,25 @@ static void llm_load_hparams(
     // get general kv
     ml.get_key(LLM_KV_GENERAL_NAME, model.name, false);
 
+    // Disable LLM metadata for image models
+    switch (model.arch) {
+        case LLM_ARCH_FLUX:
+        case LLM_ARCH_SD1:
+        case LLM_ARCH_SDXL:
+        case LLM_ARCH_SD3:
+        case LLM_ARCH_AURA:
+        case LLM_ARCH_LTXV:
+        case LLM_ARCH_HYVID:
+        case LLM_ARCH_WAN:
+        case LLM_ARCH_HIDREAM:
+        case LLM_ARCH_COSMOS:
+        case LLM_ARCH_QWEN_IMAGE:
+            model.ftype = ml.ftype;
+            return;
+        default:
+            break;
+    }
```

---

### MSVC 19.44 Error and Fix

Error
```
error C2039: 'system_clock': is not a member of 'std::chrono'
```

common.cpp and log.cpp
```
#include <chrono>
```



---

### Compile and Quantize

Apply patch, recompile, and quantize: https://github.com/city96/ComfyUI-GGUF/tree/main/tools#quantizing-using-custom-llamacpp
