smskk ethanfel commited on
Commit
a56eb4b
·
0 Parent(s):

Duplicate from ethanfel/Qwen3-VL-32B-Ultra-Heretic-H3-ComfyUI-INT8-ConvRot

Browse files
.gitattributes ADDED
@@ -0,0 +1,35 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ *.7z filter=lfs diff=lfs merge=lfs -text
2
+ *.arrow filter=lfs diff=lfs merge=lfs -text
3
+ *.bin filter=lfs diff=lfs merge=lfs -text
4
+ *.bz2 filter=lfs diff=lfs merge=lfs -text
5
+ *.ckpt filter=lfs diff=lfs merge=lfs -text
6
+ *.ftz filter=lfs diff=lfs merge=lfs -text
7
+ *.gz filter=lfs diff=lfs merge=lfs -text
8
+ *.h5 filter=lfs diff=lfs merge=lfs -text
9
+ *.joblib filter=lfs diff=lfs merge=lfs -text
10
+ *.lfs.* filter=lfs diff=lfs merge=lfs -text
11
+ *.mlmodel filter=lfs diff=lfs merge=lfs -text
12
+ *.model filter=lfs diff=lfs merge=lfs -text
13
+ *.msgpack filter=lfs diff=lfs merge=lfs -text
14
+ *.npy filter=lfs diff=lfs merge=lfs -text
15
+ *.npz filter=lfs diff=lfs merge=lfs -text
16
+ *.onnx filter=lfs diff=lfs merge=lfs -text
17
+ *.ot filter=lfs diff=lfs merge=lfs -text
18
+ *.parquet filter=lfs diff=lfs merge=lfs -text
19
+ *.pb filter=lfs diff=lfs merge=lfs -text
20
+ *.pickle filter=lfs diff=lfs merge=lfs -text
21
+ *.pkl filter=lfs diff=lfs merge=lfs -text
22
+ *.pt filter=lfs diff=lfs merge=lfs -text
23
+ *.pth filter=lfs diff=lfs merge=lfs -text
24
+ *.rar filter=lfs diff=lfs merge=lfs -text
25
+ *.safetensors filter=lfs diff=lfs merge=lfs -text
26
+ saved_model/**/* filter=lfs diff=lfs merge=lfs -text
27
+ *.tar.* filter=lfs diff=lfs merge=lfs -text
28
+ *.tar filter=lfs diff=lfs merge=lfs -text
29
+ *.tflite filter=lfs diff=lfs merge=lfs -text
30
+ *.tgz filter=lfs diff=lfs merge=lfs -text
31
+ *.wasm filter=lfs diff=lfs merge=lfs -text
32
+ *.xz filter=lfs diff=lfs merge=lfs -text
33
+ *.zip filter=lfs diff=lfs merge=lfs -text
34
+ *.zst filter=lfs diff=lfs merge=lfs -text
35
+ *tfevents* filter=lfs diff=lfs merge=lfs -text
README.md ADDED
@@ -0,0 +1,296 @@
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
+ ---
2
+ license: apache-2.0
3
+ language:
4
+ - en
5
+ pipeline_tag: image-text-to-text
6
+ library_name: comfyui
7
+ base_model:
8
+ - llmfan46/Qwen3-VL-32B-Instruct-ultra-uncensored-heretic
9
+ tags:
10
+ - comfyui
11
+ - h3
12
+ - qwen3-vl
13
+ - qwen3-vl-32b
14
+ - heretic
15
+ - abliterated
16
+ - uncensored
17
+ - bf16
18
+ - int8
19
+ - convrot
20
+ - nvfp4
21
+ - awq
22
+ - quantized
23
+ ---
24
+
25
+ # Qwen3-VL-32B Ultra Uncensored Heretic — H3 ComfyUI encoders + generation tails
26
+
27
+ This repository contains ComfyUI H3 conditioning encoders and optional
28
+ Qwen3-VL-32B generation tails. The conditioning encoders are built from
29
+ [`llmfan46/Qwen3-VL-32B-Instruct-ultra-uncensored-heretic`](https://huggingface.co/llmfan46/Qwen3-VL-32B-Instruct-ultra-uncensored-heretic).
30
+
31
+ - BF16 and INT8 ConvRot variants of the H3 text/vision conditioning encoder,
32
+ containing language layers 0–49; and
33
+ - generation-only tails containing layers 50–63, the final norm, and LM head
34
+ in BF16, INT8 ConvRot, and NVFP4/AWQ formats.
35
+
36
+ H3 consumes the unnormalized hidden state after language layer 49.
37
+ This checkpoint therefore includes the Qwen3-VL embedding, language layers
38
+ 0–49, and the complete vision tower. It intentionally omits language layers
39
+ 50–63, the final language norm, and the LM head.
40
+
41
+ ## H3 conditioning encoder — BF16
42
+
43
+ `qwen3vl_32b_h3_ultra_uncensored_heretic_bf16.safetensors`
44
+
45
+ - Size: 51,506,295,440 bytes (47.97 GiB)
46
+ - SHA-256:
47
+ `bbcd92a732e911cfafd86960e0e26aacc6efe949e02f16a9641f201c62984860`
48
+ - 902 tensors, all BF16
49
+ - Qwen3-VL embedding and language layers 0–49
50
+ - Complete vision tower
51
+ - Intentionally excludes layers 50–63, the final language norm, and LM head
52
+
53
+ This is the full-precision source used to create the ConvRot build below.
54
+
55
+ ## H3 conditioning encoder — INT8 ConvRot
56
+
57
+ `qwen3vl_32b_h3_ultra_uncensored_heretic_int8_convrot.safetensors`
58
+
59
+ - Size: 26,363,476,151 bytes (24.55 GiB)
60
+ - SHA-256:
61
+ `d84547412144b7c50a6ec77437a889b869d3ace88da77ef1775d3d2a4901c192`
62
+ - 1,604 tensors
63
+ - 350 learned row-wise INT8 ConvRot language matrices
64
+ - ConvRot group size 256 for every learned language matrix
65
+ - One simple tensorwise INT8 token embedding
66
+ - 551 tensors retained in BF16, including the complete vision tower and all
67
+ norms
68
+ - 351 FP32 weight scales and 351 ComfyUI quantization descriptors
69
+
70
+ Use BF16 when memory permits. The INT8 ConvRot build is intended for systems
71
+ where the 47.97 GiB conditioning encoder is too large.
72
+
73
+ ## Generation tails
74
+
75
+ Every tail contains Qwen3-VL language layers 50–63, the final language norm,
76
+ and LM head. A tail is not a standalone CLIP: it reuses the tokenizer,
77
+ embedding, vision tower, and layers 0–49 from the connected H3 conditioning
78
+ encoder.
79
+
80
+ | File | Source family | Format | Size |
81
+ | --- | --- | --- | ---: |
82
+ | `qwen3vl_32b_h3_generation_tail_50_63_int8_convrot.safetensors` | Ultra Heretic | INT8 ConvRot | 7,609,128,707 bytes |
83
+ | `qwen3vl_32b_h3_ultra_uncensored_heretic_generation_tail_50_63_bf16.safetensors` | Ultra Heretic | BF16 | 15,208,606,776 bytes |
84
+ | `qwen3vl_32b_h3_instruct_generation_tail_50_63_int8_convrot.safetensors` | Qwen3-VL-32B-Instruct | INT8 ConvRot | 7,609,128,659 bytes |
85
+ | `qwen3vl_32b_h3_instruct_generation_tail_50_63_bf16.safetensors` | Qwen3-VL-32B-Instruct | BF16 | 15,208,606,744 bytes |
86
+ | `qwen3vl_32b_h3_instruct_generation_tail_50_63_nvfp4_awq.safetensors` | Qwen3-VL-32B-Instruct | NVFP4/AWQ with BF16 norm and LM head | 5,396,902,102 bytes |
87
+
88
+ ### INT8 ConvRot tail details
89
+
90
+ `qwen3vl_32b_h3_generation_tail_50_63_int8_convrot.safetensors`
91
+
92
+ - Size: 7,609,128,707 bytes (7.09 GiB)
93
+ - SHA-256:
94
+ `b5bb9bb8dc87cf11cbee241a2d95d6d42fe52cf695ed26c093ac321f31160b20`
95
+ - 354 tensors
96
+ - Language layers 50–63, final language norm, and LM head
97
+ - 98 learned row-wise INT8 ConvRot matrices
98
+ - One simple row-wise INT8 ConvRot LM head, evaluated in chunks by the node
99
+ - ConvRot group size 256
100
+ - 57 tensors retained exactly in BF16
101
+
102
+ The tail does not duplicate the token embedding or vision tower. It is loaded
103
+ temporarily, then unloaded after generation while the connected conditioning
104
+ CLIP remains unchanged.
105
+
106
+ ## ComfyUI installation
107
+
108
+ Place the selected conditioning encoder and optional tail under:
109
+
110
+ ```text
111
+ ComfyUI/models/text_encoders/H3/
112
+ ```
113
+
114
+ Select it in `CLIPLoader` with the H3-compatible text-encoder type. Use a
115
+ current ComfyUI checkout with its pinned `comfy-kitchen` dependency.
116
+
117
+ For prompt enhancement:
118
+
119
+ 1. Load the 0–49 conditioning checkpoint with ComfyUI's standard
120
+ `CLIPLoader` using the H3-compatible text-encoder type.
121
+ 2. Connect that CLIP to **H3 Prompt Enhancer (optional CLIP tail)**.
122
+ 3. Select the 50–63 tail in the node's `clip_tail` dropdown.
123
+ 4. Send `enhanced_prompt` and the returned, unchanged `clip` to the normal
124
+ H3 guide node.
125
+
126
+ If the connected CLIP is already a complete generative model, leave
127
+ `clip_tail` at `[none — connected CLIP is already complete]`. The enhancer
128
+ then calls the connected CLIP's ordinary `generate()` path, without loading
129
+ or requiring this tail.
130
+
131
+ These are ComfyUI checkpoints, not a complete Transformers generation
132
+ repository.
133
+
134
+ ## Standalone text and vision-language generation
135
+
136
+ Install
137
+ [`ethanfel/ComfyUI-H3-Qwen3VL-TextGen`](https://github.com/ethanfel/ComfyUI-H3-Qwen3VL-TextGen)
138
+ to use the H3 0–49 conditioning encoder plus any compatible tail in this
139
+ repository as a standalone, general-purpose local Qwen3-VL text and
140
+ vision-language generator. It does not require the separate H3 prompt-guide
141
+ node pack.
142
+
143
+ ```text
144
+ Load CLIP (H3 0–49 encoder) ── clip ──────┐
145
+ ├─ H3 Qwen VL Generate Text (Standalone)
146
+ H3 Qwen VL Generation Tail Loader ─ tail_clip ─┘
147
+ Optional IMAGE batch ───────────── image ─┘
148
+ ```
149
+
150
+ 1. Install or link the TextGen repository under `ComfyUI/custom_nodes`.
151
+ 2. Put the H3 conditioning encoder and selected `generation_tail_50_63` file
152
+ under `ComfyUI/models/text_encoders`.
153
+ 3. Load the conditioning encoder with ComfyUI's standard `Load CLIP` node.
154
+ 4. Select the tail with **H3 Qwen VL Generation Tail Loader**.
155
+ 5. Connect both outputs to **H3 Qwen VL Generate Text (Standalone)**.
156
+
157
+ The standalone node supports editable system/user prompts, optional image
158
+ batches, deterministic or sampled decoding, and Qwen thinking mode. The base
159
+ CLIP is preserved; only the temporary tail is explicitly unloaded after
160
+ generation.
161
+
162
+ ## Runtime verification
163
+
164
+ The conditioning checkpoint and enhancer passed actual runtime tests:
165
+
166
+ - ComfyUI commit: `14b05228cef127ce529bc0c08660770d4af3e9a8`
167
+ - `comfy-kitchen==0.2.26`
168
+ - `comfy-aimdo==0.4.11`
169
+ - PyTorch `2.8.0+cu128`
170
+ - NVIDIA GeForce RTX 5090, 32 GB VRAM
171
+ - Detected the H3-compatible text-encoder model class
172
+ - Finite conditioning output: `(1, 12, 5120)`
173
+ - Correct modality-token tags: `(12,)`
174
+ - VRAM after encode: about 24.7 GiB allocated / 26.1 GiB reserved
175
+ - Standard `CLIPLoader` loaded the conditioning model with exactly 50
176
+ language layers and no final norm or LM head.
177
+ - The optional tail path generated a token through all 64 layers, returned the
178
+ exact same CLIP object, then left it at exactly 50 layers with no norm/head.
179
+ - The returned CLIP successfully encoded H3 conditioning after the tail
180
+ was unloaded: finite `(1, 4, 5120)` output with token tags.
181
+ - The no-tail path was tested with a complete Qwen3-VL-4B ComfyUI CLIP and
182
+ generated successfully without loading the H3 tail.
183
+ - The NVFP4/AWQ tail was tested with the matching 0–49 NVFP4/AWQ encoder on an
184
+ NVIDIA RTX PRO 6000 Blackwell. It generated through all 64 language layers,
185
+ unloaded cleanly, left the base at exactly 50 layers, and produced finite
186
+ `(1, 7, 5120)` H3 conditioning afterward.
187
+
188
+ The local CUDA 12.8 PyTorch build used fallback operations because this
189
+ `comfy-kitchen` release recommends CUDA 13.0+ for its optimized kernels. The
190
+ encode nevertheless completed successfully. A current ComfyUI environment
191
+ with its recommended PyTorch build is preferred.
192
+
193
+ ## Provenance
194
+
195
+ Pinned upstream source:
196
+
197
+ ```text
198
+ repository: llmfan46/Qwen3-VL-32B-Instruct-ultra-uncensored-heretic
199
+ revision: c44b949b30d111666a5ed9851c5cd633ed39b070
200
+ ```
201
+
202
+ Both upstream BF16 shards were downloaded at that revision and verified
203
+ against their Hugging Face LFS SHA-256 values before packaging.
204
+
205
+ The source model card reports Heretic v1.2.0 ARA edits targeting
206
+ `attn.o_proj` in language layers 31–40. All of those edited layers are inside
207
+ H3's retained 0–49 range, so the uncensoring edits are present in this
208
+ checkpoint. The source reports 4/100 refusals versus 99/100 for the original,
209
+ KL divergence 0.0421, PIQA 92.87%, and MMLU 79.87%.
210
+
211
+ Abliteration reduces refusal behavior but does not guarantee that every
212
+ refusal or safety behavior is removed, and it may affect model quality.
213
+
214
+ ## Conversion
215
+
216
+ The H3 BF16 package was converted with
217
+ [`silveroxides/convert_to_quant`](https://github.com/silveroxides/convert_to_quant)
218
+ 1.3.1. The successful build used AdamW AdaRound optimization with plateau
219
+ early stopping, not simple rounding:
220
+
221
+ ```bash
222
+ env PYTHONPATH=.deps python .deps/bin/ctq \
223
+ -i qwen3vl_32b_h3_ultra_uncensored_heretic_bf16.safetensors \
224
+ -o qwen3vl_32b_h3_ultra_uncensored_heretic_int8_convrot.safetensors \
225
+ --int8 \
226
+ --scaling_mode row \
227
+ --convrot \
228
+ --convrot-group-size 256 \
229
+ --comfy_quant \
230
+ --save-quant-metadata \
231
+ --custom-layers '^model\.embed_tokens\.weight$' \
232
+ --custom-type int8 \
233
+ --custom-scaling-mode tensor \
234
+ --custom-simple \
235
+ --exclude-layers '^visual\.' \
236
+ --low-memory \
237
+ --device cuda \
238
+ --manual-seed 42 \
239
+ --num-iter 4000 \
240
+ --optimizer adamw \
241
+ --verbose NORMAL
242
+ ```
243
+
244
+ The language block matrices use learned ConvRot. Only the token embedding uses
245
+ simple tensorwise INT8 because ComfyUI embedding lookup requires that layout.
246
+ The vision tower is retained exactly in BF16.
247
+
248
+ The generation tail was packaged from the same pinned source and converted
249
+ separately:
250
+
251
+ ```bash
252
+ env PYTHONPATH=.deps .deps/bin/ctq \
253
+ -i qwen3vl_32b_h3_generation_tail_50_63_bf16.safetensors \
254
+ -o qwen3vl_32b_h3_generation_tail_50_63_int8_convrot.safetensors \
255
+ --int8 \
256
+ --scaling_mode row \
257
+ --convrot \
258
+ --convrot-group-size 256 \
259
+ --comfy_quant \
260
+ --save-quant-metadata \
261
+ --low-memory \
262
+ --device cuda \
263
+ --manual-seed 42 \
264
+ --num-iter 4000 \
265
+ --optimizer adamw \
266
+ --verbose NORMAL \
267
+ --layer-config tools/qwen3vl32b_generation_tail_quant.json \
268
+ --fullmatch
269
+ ```
270
+
271
+ The 98 transformer matrices use learned AdamW ConvRot. The LM head uses
272
+ simple row-wise ConvRot so the enhancer can compute its 151,936 output rows in
273
+ small chunks and avoid a multi-gigabyte temporary dequantization peak.
274
+
275
+ ## Validation
276
+
277
+ The completed file passed structural validation of every tensor, dtype, shape,
278
+ scale, per-layer descriptor, and global quantization metadata entry. All 551
279
+ protected BF16 tensors were compared byte-for-byte against the packaged BF16
280
+ source and were unchanged.
281
+
282
+ The tail also passed exact structural validation: the retained 57 BF16
283
+ tensors (304,128 bytes) are byte-identical to the source; its 99 INT8 weights,
284
+ scales, descriptors, and global quantization metadata all match the declared
285
+ layout. Combining the base source topology (902 tensors) with the tail source
286
+ topology (156 tensors) reconstructs all 1,058 tensors of the full model with
287
+ no key collision.
288
+
289
+ ## Credits
290
+
291
+ - Uncensored source and evaluations:
292
+ [`llmfan46/Qwen3-VL-32B-Instruct-ultra-uncensored-heretic`](https://huggingface.co/llmfan46/Qwen3-VL-32B-Instruct-ultra-uncensored-heretic)
293
+ - Original model:
294
+ [`Qwen/Qwen3-VL-32B-Instruct`](https://huggingface.co/Qwen/Qwen3-VL-32B-Instruct)
295
+ - Quantization tooling:
296
+ [`silveroxides/convert_to_quant`](https://github.com/silveroxides/convert_to_quant)
SHA256SUMS ADDED
@@ -0,0 +1,7 @@
 
 
 
 
 
 
 
 
1
+ bbcd92a732e911cfafd86960e0e26aacc6efe949e02f16a9641f201c62984860 qwen3vl_32b_h3_ultra_uncensored_heretic_bf16.safetensors
2
+ d84547412144b7c50a6ec77437a889b869d3ace88da77ef1775d3d2a4901c192 qwen3vl_32b_h3_ultra_uncensored_heretic_int8_convrot.safetensors
3
+ b5bb9bb8dc87cf11cbee241a2d95d6d42fe52cf695ed26c093ac321f31160b20 qwen3vl_32b_h3_generation_tail_50_63_int8_convrot.safetensors
4
+ dac2060bfe1c3a8919878d5a316ca6511e8e6f77db6cd134491ab87b1b39ab83 qwen3vl_32b_h3_ultra_uncensored_heretic_generation_tail_50_63_bf16.safetensors
5
+ 8af81d26e9cd62b3f45b42df92f33247459e5c9e46c82752a26632ad9540e0d4 qwen3vl_32b_h3_instruct_generation_tail_50_63_int8_convrot.safetensors
6
+ c3bd172983077787f4c29a2113ff7ce1964778cbec51401048375dc9141b5899 qwen3vl_32b_h3_instruct_generation_tail_50_63_bf16.safetensors
7
+ 40a9a12feb0822b6eaa39bfb03f7f41415fc1f0fd041315391ea968627e01480 qwen3vl_32b_h3_instruct_generation_tail_50_63_nvfp4_awq.safetensors
qwen3vl_32b_h3_generation_tail_50_63_int8_convrot.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:b5bb9bb8dc87cf11cbee241a2d95d6d42fe52cf695ed26c093ac321f31160b20
3
+ size 7609128707
qwen3vl_32b_h3_instruct_generation_tail_50_63_bf16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:c3bd172983077787f4c29a2113ff7ce1964778cbec51401048375dc9141b5899
3
+ size 15208606744
qwen3vl_32b_h3_instruct_generation_tail_50_63_int8_convrot.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:8af81d26e9cd62b3f45b42df92f33247459e5c9e46c82752a26632ad9540e0d4
3
+ size 7609128659
qwen3vl_32b_h3_instruct_generation_tail_50_63_nvfp4_awq.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:40a9a12feb0822b6eaa39bfb03f7f41415fc1f0fd041315391ea968627e01480
3
+ size 5396902102
qwen3vl_32b_h3_ultra_uncensored_heretic_bf16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:bbcd92a732e911cfafd86960e0e26aacc6efe949e02f16a9641f201c62984860
3
+ size 51506295440
qwen3vl_32b_h3_ultra_uncensored_heretic_generation_tail_50_63_bf16.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:dac2060bfe1c3a8919878d5a316ca6511e8e6f77db6cd134491ab87b1b39ab83
3
+ size 15208606776
qwen3vl_32b_h3_ultra_uncensored_heretic_int8_convrot.safetensors ADDED
@@ -0,0 +1,3 @@
 
 
 
 
1
+ version https://git-lfs.github.com/spec/v1
2
+ oid sha256:d84547412144b7c50a6ec77437a889b869d3ace88da77ef1775d3d2a4901c192
3
+ size 26363476151