Gemma 4 E2B Heretic — ComfyUI int8 ConvRot (prompt enhancer for LTX 2.5)
gemma4_e2b_heretic_ltx25_int8_convrot.safetensors (5.2 GB)
A drop-in replacement for ComfyUI's gemma4_e2b_it_int8_convrot.safetensors, with the language model swapped for the decensored p-e-w/gemma-4-E2B-it-heretic-ara. It was made and tested as the prompt_enhance_model of the LTX 2.5 workflows.
Why
When the prompt enhancer rewrites or waters down a prompt, the video no longer matches what was asked for. This file is meant for that problem: it may remove unnecessary censorship in the prompt-enhancing step, including harmless prompts that get softened by mistake (for example "sumo wrestling on water in swimsuits" or "eating ice cream").
How it was made
Only the language model was replaced. Everything else is byte-identical to the stock ComfyUI file.
| Keys | Count | Source |
|---|---|---|
model.* (language model) |
600 tensors | Heretic (model.language_model.* renamed to model.*) |
audio_model.* |
1015 keys | stock file, unchanged |
vision_model.* |
882 keys | stock file, unchanged |
audio_projector.*, multi_modal_projector.* |
1 key each | stock file, unchanged |
tokenizer_json |
1 key | stock file, unchanged |
Of the 600 language-model tensors, the same 317 weights that are quantized in the stock file were quantized again with comfy_kitchen (int8, per-row scale, ConvRot group size 256). The other 283 stay BF16. Key names, shapes and quantization metadata match the stock file exactly.
Stock file: text_encoders/gemma4_e2b_it_int8_convrot.safetensors from Comfy-Org/gemma-4.
Usage
Put the file in ComfyUI/models/text_encoders/ and select it as prompt_enhance_model. It only has an effect when prompt_enhance is ON.
Recommended pair, so that neither stage softens the prompt:
| Slot | File |
|---|---|
clip_name (text encoder) |
gemma4_12b_ltx25_uncensored-int8.safetensors from ChrisColeTech/LTX-2.5-uncensored-v1.1-FP8 (split/text_encoders/) |
prompt_enhance_model |
gemma4_e2b_heretic_ltx25_int8_convrot.safetensors (this file) |
This is a ComfyUI-format file. It does not load in transformers.
Included workflow
video_ltx2_5_flf2v_e2b_heretic_pe.json — based on the official ComfyUI template "First & Last Frame to Video (LTX-2.5)", with these changes:
- Last frame is optional. Bypass the "Load Last Frame" node to run from the first frame only; un-bypass it to use both.
first_frame_strength/last_frame_strength(default 0.8) andvideo_cfg/audio_cfg(default 1) are exposed on the main node.- Defaults: 1024×1024, 5 seconds,
prompt_enhanceON, the two models above selected.
Both image loaders point at ComfyUI's example.png; replace them with your own images. The other models (LTX 2.5 transformer and VAEs) are the ones listed in the model-links note inside the workflow. Only core ComfyUI nodes are used.
Troubleshooting: garbage output from the prompt enhancer
If the enhanced prompt looks like A medium close cl�<|tool_call><pad><pad><pad>…, check how ComfyUI is started. With --disable-cuda-malloc, Gemma 4 E2B text generation breaks after the first few tokens. This also happens with the stock file.
Fix: remove --disable-cuda-malloc, or keep it and add --disable-cuda-graphs.
Limitations
- In a small side-by-side test against the stock file (3 prompts, 1 seed each), neither model refused, and the difference in how directly prompts were followed was small. Treat the benefit as a possibility, not a guarantee.
- Tested on ComfyUI v0.39.2, comfy-kitchen 0.2.37, RTX 3090.
Credits
- google/gemma-4-E2B-it — base model
- p-e-w/gemma-4-E2B-it-heretic-ara — decensored weights, made with Heretic
- Comfy-Org/gemma-4 — ComfyUI packaging of the stock model
日本語
ComfyUI の gemma4_e2b_it_int8_convrot.safetensors と差し替えて使えるファイルです。言語モデル部分だけを無検閲版(Heretic)に置き換えています。LTX 2.5 の prompt_enhance_model 用として作成・動作確認しました。
目的:プロンプト拡張の段階で内容が弱められ、意図と違う映像が出る問題への対策です。無駄に検閲に掛かるケース(例:水着で水上相撲/アイスクリームを食べる)を排除できる可能性があります。
変換内容:差し替えたのは言語モデル(model.*)だけです。音声モデル・視覚モデル・プロジェクション・トークナイザは元ファイルのままです。
推奨の組み合わせ:clip_name に gemma4_12b_ltx25_uncensored-int8.safetensors、prompt_enhance_model にこのファイル。片方だけ無検閲にしても、もう片方で弱められることがあるためです。
同梱ワークフロー:公式テンプレートを元に、ラストフレームを任意(バイパスで first frame のみ)にし、画像の強度とCFGを外に出したものです。初期値は 1024×1024・5秒です。
出力が壊れる場合:--disable-cuda-malloc 付きで ComfyUI を起動していると、プロンプト拡張の出力が <pad> などの羅列になります。このオプションを外すか、--disable-cuda-graphs を追加してください。
注意:元ファイルとの小規模な比較(3プロンプト・各1回)では、差は小さいものでした。効果は保証ではなく可能性として捉えてください。