Krea 2 Layer Probe
Measure what Krea 2's conditioning layers are actually doing
- conditioning
- conditioning
- statistics_summary
Krea 2 has a refusal mechanism baked into its weights - the open checkpoint went through alignment training the hosted version never got, and the collateral damage isn't limited to NSFW prompts. Expressions flatten, prompt clauses about bodies and violence get ignored, and people call it "craters" in the model. If you want to do something about that surgically rather than with a sledgehammer, you first need to see where the refusals live. UC_Krea2LayerProbe is the microscope.
It sits in your conditioning path and measures what the 12 tapped layers of Krea 2's text encoder are doing for a given prompt. Run it on safe prompts, run it on prompts that get refused, and the difference between the two - layer by layer - is the refusal signal. That's the raw material the probe's sibling node, UC_Krea2LayerAblator, later subtracts.
How it works
Krea 2's text encoder packs its conditioning into a flat tensor of shape (B, seq, 30720). The probe unpacks that into the 12 original layer taps - each (B, seq, 2560), the last 12 layers of Qwen3-VL-4B - and computes per-layer activation statistics: mean, standard deviation, max, min, and L2 norm.
The three inputs you actually set:
- prompt_label - a tag for the run. This is the key to the whole method: tag safe prompts
safe_...and refused promptsrefused_..., then compare the logs. The difference vectors between the two groups are what you feed the ablator. - log_dir - where it writes. Defaults to
krea2_stats(relative to the ComfyUI working directory), as a JSONL of stats per run. - save_activations - when true, also writes the raw sequence-averaged activation tensors as
.ptfiles. You need this on to build the difference-vector dataset for the ablator; it's off by default because those files are big.
Outputs: a conditioning passthrough (the probe is non-destructive - your prompt still flows through unmodified) and a statistics_summary string you can preview or log.
The workflow it's meant for
The intended loop, per the author's own framing: probe a bunch of safe vs. refused prompts, compute the per-layer difference vectors, then use the ablator to subtract the refusal direction from the conditioning at runtime - or, better, use the probe data to surgically ablate weights on a diff LoRA instead of touching conditioning at runtime. The probe is the measurement half of a two-node scientific kit, not a one-click fix. If you just want images without refusals, an uncensor LoRA is the community's proven first choice; this pack of nodes is for people who want to understand and target the mechanism.
Install
Ships in silveroxides/ComfyUI-UtilsCollection:
cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection
Restart (or use ComfyUI Manager, search "ComfyUI-UtilsCollection"). Needs the Krea 2 stack - model, Qwen3-VL text encoder, Qwen-Image VAE - and the pack's own deps are just opencv-python and typing-extensions.
Fair warning: this is an analytical tool for people comfortable poking at tensors and .pt files. If that sentence made you wince, skip it - you don't need the microscope to generate good Krea 2 images. But if you've been fighting the expression craters and want to know exactly where the model is being told to flatten them, this is the only node in the pack that shows you.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| conditioning | CONDITIONING | — | |
| prompt_label | STRING | safe_prompt | A unique name/tag to log this prompt in the stats. Tag safe prompts with 'safe_...' and refused prompts with 'refused_...' to perform differential analysis. |
| log_dir | STRING | krea2_stats | The directory where JSONL statistical logs and optional raw tensor files (.pt) will be written. |
| save_activations | BOOLEAN | false | If True, saves raw 12-layer sequence-averaged activation tensors as .pt files in the log directory for difference-vector computations. |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| conditioning | CONDITIONING | — |
| statistics_summary | STRING | — |