玩模型开放模型 · 清晰来源 · 自主选择
返回模型目录
artokun /

comfy_gemma_3_12B_it_abliterated

HF 源站

artokun/comfy_gemma_3_12B_it_abliterated is an uncensored open-source model hosted on Hugging Face.

Image-Text-to-TextComfyUILicense: gemma12Btransformerstext-encoderltxvgemma3
README.md说明 / 使用方法

license: gemma library_name: transformers pipeline_tag: image-text-to-text base_model: mlabonne/gemma-3-12b-it-abliterated tags:

  • comfyui
  • text-encoder
  • ltxv
  • gemma3

💎 Gemma 3 12B IT Abliterated — ComfyUI Text Encoder

This is a ComfyUI-compatible single-file repack of mlabonne/gemma-3-12b-it-abliterated, packaged as a drop-in replacement for the stock comfy_gemma_3_12B_it.safetensors text encoder used by the LTXV Audio Text Encoder Loader and other Gemma 3 12B ComfyUI nodes.

🔧 What's changed vs. the upstream abliterated model

The upstream model is an HF transformers checkpoint split across 5 safetensors shards with Gemma3ForConditionalGeneration's key layout. ComfyUI expects a single file with a slightly different layout and an embedded SentencePiece tokenizer. This repack does the following:

  1. Merged all 5 shards into one .safetensors file (~23GB, bf16).
  2. Remapped keys to match ComfyUI's expected layout:
    • language_model.model.* → model.*
    • vision_tower.vision_model.* → vision_model.*
    • multi_modal_projector.* → (unchanged)
  3. Embedded the SentencePiece tokenizer as a spiece_model uint8 byte tensor (~4.5MB), matching the official ComfyUI Gemma 3 12B text encoder layout. Without this, ComfyUI's SPieceTokenizer raises invalid tokenizer on load.
  4. Dropped nothing — all 1066 tensors (1065 weights + 1 tokenizer) match the stock encoder's structure exactly (zero missing, zero extra).

📦 Why

Activism / uncensored video generation workflows need a text encoder that doesn't refuse legitimate subject matter. The stock ComfyUI Gemma 3 12B encoder refuses many prompts that are harmless in context (protest imagery, political speech, etc.). This repack gives you the abliterated model's acceptance rate with zero changes to your ComfyUI nodes or workflow graph — just swap the file.

🚀 Usage

Drop the file into ComfyUI/models/text_encoders/ and select it in the LTXV Audio Text Encoder Loader node (or any node that accepts a Gemma 3 12B text encoder).

Recommended generation parameters (from upstream): temperature=1.0, top_k=64, top_p=0.95.


Original Upstream Model Card

💎 Gemma 3 12B IT Abliterated

image/png

This is an uncensored version of google/gemma-3-12b-it created with a new abliteration technique. See this article to know more about abliteration.

I was playing with model weights and noticed that Gemma 3 was much more resilient to abliteration than other models like Qwen 2.5. I experimented with a few recipes to remove refusals while preserving most of the model capabilities.

Note that this is fairly experimental, so it might not turn out as well as expected. I saw some garbled text from time to time (e.g., "It' my" instead of "It's my").

I recommend using these generation parameters: temperature=1.0, top_k=64, top_p=0.95.

⚡️ Quantization

  • GGUF: https://huggingface.co/mlabonne/gemma-3-12b-it-abliterated-GGUF

✂️ Layerwise abliteration

image/png

In the original technique, a refusal direction is computed by comparing the residual streams between target (harmful) and baseline (harmless) samples.

Here, the model was abliterated by computing a refusal direction based on hidden states (inspired by Sumandora's repo) for most layers (layer 3 to 45), independently. This is combined with a refusal weight of 0.6 to upscale the importance of this refusal direction in each layer.

This created a very high acceptance rate (>90%) and still produced coherent outputs.

HUGGING FACE

上游数据

HF 下载量0
HF 点赞量3

HF 下载量为源站最近 30 天统计,与本站点击分开。

SITE STATS

本站统计

下载点击—
请求数—
匿名去重—最近 7 天—

本站下载量记录按钮点击,不代表下载完成;短时连点会去重。

来源与版本

作者
artokun
最近更新
2026/04/15
最新创建
2026/04/15
HF 趋势
未知
数据快照
2026/09/17
版本
未知
许可证
gemma