Nodes/ComfyUI-UtilsCollection/Krea 2 Layer Pinpoint Ablator
ComfyUI Node

Krea 2 Layer Pinpoint Ablator

Subtracting Krea 2's refusal direction, layer by layer

By silveroxides·Created 2 months ago·Updated about 7 hours ago· 24
Krea 2 Layer Pinpoint Ablator
  • conditioning
  • CONDITIONING
vectors_pathkrea2_stats/refusal_directions.pt
ablation_strength1.00
layers_mask0,0,0,0,0,0,0,1,1,1,1,0

The Krea 2 refusal problem is real and it's not only about NSFW - the alignment pass the open checkpoint went through also flattens expressions and drops prompt clauses about bodies and violence. The blunt fixes (the conditioning-rebalance node, the uncensor LoRA) work but cost something in quality or prompt adherence. UC_Krea2LayerAblator is the surgical alternative: instead of rebalancing the whole conditioning, it subtracts the refusal direction - the specific component of the activation that pushes a prompt toward being ignored - from whichever of the 12 tapped encoder layers you choose.

It's the hammer half of the two-node kit this pack ships. The probe measures where the refusals live; the ablator removes them.

How it works

Krea 2's conditioning carries an embedded refusal direction per layer - the shift in activation space that happens when the model decides a prompt is "unsafe" and declines to follow it. This node loads pre-computed difference vectors for each of the 12 layers and performs an orthogonal projection: it decomposes the conditioning activation into a component along the refusal vector and a component perpendicular to it, then drops the parallel part. ablation_strength at 1.0 is a pure orthogonal projection - the full subtraction. Below that, partial; above (up to 2.0), it over-subtracts, which you'd use only when testing how much headroom there is.

The three inputs matter:

  • vectors_path - the .pt file with the pre-computed difference vectors, defaulting to krea2_stats/refusal_directions.pt. You generate this file, using the probe node on safe vs. refused prompts (safe_... / refused_... labels) with save_activations enabled, then computing the differences. If the file doesn't exist, the node has nothing to subtract.
  • layers_mask - a 12-integer binary string picking which layers get the projection. The default 0,0,0,0,0,0,0,1,1,1,1,0 targets the deep layers, which is where the strongest refusal signal usually lives.
  • ablation_strength - as above, 1.0 for pure projection.

One CONDITIONING in, one CONDITIONING out. It's a drop-in node on your conditioning line.

The honest warning

Read the author's own note here: direct activation manipulation can have subtle side effects on photographic style, and they call this "primarily an analytical testbed." The recommended production path is to use probe results to surgically ablate weights on a diff LoRA - a permanent fix - rather than swapping conditioning at runtime every generation. For actually getting usable Krea 2 output today, the community's proven tool remains the uncensor LoRA, which fixes the expression craters too and costs less. This node is for people who want to understand where the filter lives and build their own targeted fix.

Install

cd ComfyUI/custom_nodes
git clone https://github.com/silveroxides/ComfyUI-UtilsCollection

Restart (or ComfyUI Manager → search "ComfyUI-UtilsCollection"). You need the Krea 2 model stack (checkpoint, Qwen3-VL text encoder, Qwen-Image VAE); the pack itself only depends on opencv-python and typing-extensions. And a heads-up on license posture: Krea's acceptable-use policy bans circumventing safety measures, so if you're using this commercially you're making a judgment call - locally, nobody's enforcing anything, but know what you're signing up for.

Categoryadvanced/conditioning

Inputs (4)

NameTypeDefaultDescription
conditioningCONDITIONING
vectors_pathSTRINGkrea2_stats/refusal_directions.ptPath to the .pt file containing pre-computed difference vectors for each of the 12 tapped layers.
ablation_strengthFLOAT1.000–2Ablation scale. 1.0 performs pure orthogonal projection (subtraction of the refusal vector component).
layers_maskSTRING0,0,0,0,0,0,0,1,1,1,1,012 comma-separated binary integers (0 or 1) selecting which layers undergo orthogonal projection (e.g., '0,0,0,0,0,0,0,1,1,1,1,0' to target deep layers).

Outputs (1)

NameTypeDescription
CONDITIONINGCONDITIONING