Gemma 3 12B IT - Heretic v2 (Abliterated)

An abliterated version of Google's Gemma 3 12B IT created using Heretic v1.3.0. This model has reduced refusals while maintaining model quality, making it suitable as an uncensored text encoder for video generation models like LTX-2.

Available in five quantization formats for ComfyUI — FP8, INT8 (ConvRot), NVFP4, and MXFP8 — covering everything from Ada GPUs to Blackwell.

You can see the docker, scripts and configurations used to make these files on Heretic Docker Github.

Update — July 11, 2026

Added INT8 (ConvRot) and MXFP8 quantization formats via convert-to-quant by silveroxides:

  • INT8 ConvRot: Near-lossless INT8 via SVD-guided learned rounding (Prodigy optimizer), tensor-wise scaling. Works on any GPU (Ampere+), natively supported in ComfyUI v0.27.0+. 13 GB.
  • MXFP8: Microscaling FP8 (OCP MX standard) with E8M0 per-block power-of-2 scales. Blackwell only. 13 GB.
  • FP8 upgraded: Now uses per-tensor scaling via convert-to-quant (previously naive unscaled cast).
  • Pipeline now uses convert-to-quant for FP8, INT8, and MXFP8 quantization with ComfyUI-compatible comfy_quant metadata output.

What's new in v2

  • Heretic v1.3.0 with 200 trials (v1 used v1.1.0 with 100 trials)
  • Better trial selection: Trial 174 — 8/100 refusals at KL 0.0801 (v1: Trial 99, 7/100 refusals at KL 0.0826)
  • Vision preserved: All ComfyUI variants keep vision_model and multi_modal_projector keys for I2V prompt enhancement
  • Five quantization formats: FP8, INT8 (ConvRot), NVFP4, MXFP8, plus GGUF — for every GPU tier
  • INT8 ConvRot: Near-lossless INT8 via learned rounding optimization, works on any GPU (Ampere+), natively supported in ComfyUI v0.27.0+
  • MXFP8: Microscaling FP8 (OCP MX standard) with E8M0 block scales for Blackwell
  • Updated GGUF support: ComfyUI-GGUF now has merged Gemma 3 support (PR #402)

Model Details

  • Base Model: google/gemma-3-12b-it
  • Abliteration Method: Heretic v1.3.0
  • Trials: 200
  • Trial Selected: Trial 174
  • Refusals: 8/100 (vs 100/100 original)
  • KL Divergence: 0.0801 (minimal model damage)

Files

HuggingFace Format (for transformers, llama.cpp conversion)

model-00001-of-00005.safetensors
model-00002-of-00005.safetensors
model-00003-of-00005.safetensors
model-00004-of-00005.safetensors
model-00005-of-00005.safetensors
config.json
tokenizer.model
tokenizer.json
tokenizer_config.json

ComfyUI Format (with vision, for LTX-2 T2V and I2V)

File Format Size HW Description
gemma-3-12b-it-heretic-v2.safetensors bf16 23 GB Any Full precision
gemma-3-12b-it-heretic-v2_fp8_e4m3fn.safetensors FP8 E4M3 12 GB Ada+ Per-tensor scaled
gemma-3-12b-it-heretic-v2_int8.safetensors INT8 13 GB Any ConvRot learned rounding, tensor-wise
gemma-3-12b-it-heretic-v2_nvfp4.safetensors NVFP4 E2M1 7.8 GB Blackwell 4-bit float, double quantization
gemma-3-12b-it-heretic-v2_mxfp8.safetensors MXFP8 13 GB Blackwell Microscaling FP8, E8M0 block scales

All ComfyUI variants include vision (vision_model and multi_modal_projector weights). The vision weights are unused during T2V (text-to-video) and add minimal overhead (~1 GB). For I2V (image-to-video) workflows using TextGenerateLTX2Prompt with an image input, the vision weights are required.

Quantization Format Details

FP8 (E4M3) — Per-tensor scaled quantization via convert-to-quant. Works on Ada (RTX 4090) and newer. Good balance of size and quality.

INT8 (ConvRot) — Tensor-wise symmetric INT8 with ConvRot learned rounding optimization via convert-to-quant. For each weight tensor, an SVD-guided gradient descent loop (Prodigy optimizer) learns the optimal rounding direction to minimize output error, producing near-lossless INT8 quality. Works on any modern GPU (Ampere+), no Blackwell required. Natively supported in ComfyUI v0.27.0+.

NVFP4 (E2M1) — 4-bit floating point with double quantization (per-tensor f32 scale + per-block FP8 scale, block size 16). ~3x smaller than bf16, loads natively in ComfyUI without any plugins. Blackwell GPUs (RTX 5090/5080, SM100+) use native FP4 tensor cores for best performance. Software dequantization works on older GPUs (tested on RTX 4090).

MXFP8 — Microscaling FP8 (OCP MX standard). FP8 E4M3 data with E8M0 (power-of-2) per-block scales using 32-element blocks. Better dynamic range handling than per-tensor FP8. Requires SM100+ (Blackwell). Quantized via convert-to-quant.

GGUF Format (for llama.cpp and ComfyUI-GGUF)

Quant Size Notes
F16 22GB Lossless reference
Q8_0 12GB Excellent quality
Q6_K 9.0GB Very good quality
Q5_K_M 7.9GB Good quality
Q5_K_S 7.7GB Slightly smaller Q5
Q4_K_M 6.8GB Recommended balance
Q4_K_S 6.5GB Smaller Q4 variant
Q3_K_M 5.6GB For low VRAM only

GGUF files are text-only (no vision). They work with llama.cpp directly and with ComfyUI via ComfyUI-GGUF.

Do abliterated models make a difference for LTX-2?

I had a deep dive into this topic and found that the impact is nuanced. Abliteration does alter the embeddings Gemma produces, which slightly changes the generated video. However, there are fundamental limitations:

  • Gemma doesn't know what it wasn't trained on. The base model was never trained on more taboo content. Abliteration removes refusals, but the model simply doesn't have knowledge of things it was never exposed to. Even chatting with the heretic model in llama.cpp, it doesn't refuse — it just doesn't know.
  • LTX-2 was trained on original Gemma embeddings. The DiT expects the embedding distribution from the unmodified text encoder. Fine-tuning the text encoder itself would break the DiT, as it wouldn't know what to do with the new embedding distribution and would produce strange results.
  • Most abliteration happens on layer 48 (the final decision-making layer), but LTX-2 averages across all layers, which may wash out the difference.

A potential approach would be combining a fine-tuned abliterated text encoder with a LoRA trained to understand the new embeddings. LoRAs for LTX exist, but no fine-tuned text encoders have been released yet as far as I know.

That said, abliteration still removes the soft censorship in the embeddings, which can result in more faithful prompt encoding for creative content.

Usage

With Transformers

from transformers import AutoModelForCausalLM, AutoTokenizer
import torch

model = AutoModelForCausalLM.from_pretrained(
    "DreamFast/gemma-3-12b-it-heretic-v2",
    device_map="auto",
    torch_dtype=torch.bfloat16
)
tokenizer = AutoTokenizer.from_pretrained("DreamFast/gemma-3-12b-it-heretic-v2")

prompt = "Write a story about a bank heist"
inputs = tokenizer(prompt, return_tensors="pt").to(model.device)
outputs = model.generate(**inputs, max_new_tokens=200)
print(tokenizer.decode(outputs[0], skip_special_tokens=True))

With ComfyUI (LTX-2)

  1. Download a ComfyUI format file from the comfyui/ folder:

    • INT8 (recommended, any GPU): gemma-3-12b-it-heretic-v2_int8.safetensors (13 GB)
    • FP8 (fast, Ada+): gemma-3-12b-it-heretic-v2_fp8_e4m3fn.safetensors (12 GB)
    • NVFP4 (smallest, Blackwell): gemma-3-12b-it-heretic-v2_nvfp4.safetensors (7.8 GB)
    • MXFP8 (Blackwell): gemma-3-12b-it-heretic-v2_mxfp8.safetensors (13 GB)
    • bf16 (full precision): gemma-3-12b-it-heretic-v2.safetensors (23 GB)
  2. Place in ComfyUI/models/text_encoders/

  3. In your LTX-2 workflow, use the LTXAVTextEncoderLoader node and select the heretic file

Note: INT8 requires ComfyUI v0.27.0+ (native int8_tensorwise support). For best inference speed, launch ComfyUI with --enable-triton-backend.

Tip: For multi-GPU setups or CPU offloading, check out ComfyUI-LTX2-MultiGPU for optimized LTX-2 workflows.

With ComfyUI-GGUF

GGUF support for Gemma 3 text encoders is now merged in ComfyUI-GGUF (PR #402).

  1. Download a GGUF file (Q4_K_M recommended for most setups)
  2. Place in ComfyUI/models/text_encoders/
  3. Use the DualCLIPLoader (GGUF) node:
    • CLIP 1: the Gemma 3 GGUF file
    • CLIP 2: embedding connectors from Kijai/LTXV2_comfy (use the dev connectors, not distilled)

Note: GGUF text encoders are text-only (no vision). For I2V prompt enhancement with image input, use the safetensors variants.

With llama.cpp

# Using llama-server
llama-server -m gemma-3-12b-it-heretic-v2-Q4_K_M.gguf

# Or with llama-cli
llama-cli -m gemma-3-12b-it-heretic-v2-Q4_K_M.gguf -p "Write a story about a bank heist"

Why Abliterate?

Even when Gemma doesn't outright refuse a prompt, it may "sanitize" or weaken certain concepts in the embeddings. For video generation with LTX-2, this can result in:

  • Weaker adherence to creative prompts
  • Softened or altered visual outputs
  • Less faithful representation of requested content

Abliteration removes this soft censorship, resulting in more faithful prompt encoding.

Abliteration Process

Created using Heretic v1.3.0 with 200 optimization trials:

? Which trial do you want to use?
  [Trial  80] Refusals:  0/100, KL divergence: 0.6098
  [Trial  66] Refusals:  2/100, KL divergence: 0.2087
  [Trial  75] Refusals:  3/100, KL divergence: 0.1378
  [Trial  67] Refusals:  6/100, KL divergence: 0.1108
  [Trial 180] Refusals:  7/100, KL divergence: 0.0996
> [Trial 174] Refusals:  8/100, KL divergence: 0.0801  <-- selected
  [Trial 178] Refusals: 10/100, KL divergence: 0.0801
  [Trial 172] Refusals: 11/100, KL divergence: 0.0708
  ...

Trial 174 was selected for its low KL divergence (0.0801), indicating minimal model damage, while achieving 8/100 refusals (92% of previously-refused prompts now work).

Limitations

  • This model inherits all limitations of the base Gemma 3 12B model
  • Abliteration reduces but does not completely eliminate refusals
  • NVFP4 and MXFP8 quantization work best on Blackwell GPUs (RTX 5090/5080) with native tensor cores; NVFP4 also works on older GPUs via software dequantization
  • INT8 requires ComfyUI v0.27.0+ for native int8_tensorwise support

License

This model is subject to the Gemma license.

Acknowledgments

Downloads last month
7,995
Safetensors
Model size
12B params
Tensor type
BF16
·
Inference Providers NEW
Input a message to start chatting with DreamFast/gemma-3-12b-it-heretic-v2.

Model tree for DreamFast/gemma-3-12b-it-heretic-v2

Quantized
(161)
this model
Quantizations
1 model

Spaces using DreamFast/gemma-3-12b-it-heretic-v2 2

Collection including DreamFast/gemma-3-12b-it-heretic-v2