Patch Turing Attention Kernel Tuning (Experimental)
The kernel-tuning node whose defaults are the whole point
- model
- model
Every once in a while a new node shows up with "Experimental" tattooed on the label, and this is one of them. Patch Turing Attention Kernel Tuning (Experimental) deserves the warning, but it also deserves a straight answer up front: the author shipped it with the production policy baked in as the defaults, and the tooltip on its first input is basically a sign telling you not to use it - "use this node only for profiling until measured on the target Turing GPU."
So what does it actually do? It sits inside ComfyUI Turing Utils (the pack that shows up in ComfyUI Manager as "comfyui-svdint4"), and it overrides two families of knobs in the pack's bundled INT8 attention kernels: the logical CTA-K schedule - how many key tokens each thread block processes per iteration - plus the quality controls around quantizing Q and K before they hit the Tensor Cores. This is deep-end stuff. The people who need it are the ones running W8A8 attention on an RTX 20-series card and profiling kernel launches against their exact VRAM and clock speeds.
What the inputs do
There are exactly three, and they're all about the same quantized-attention path:
- model - the MODEL you already have from a loader (the ConvRot DiT loader, or a model that's been through the Sol patch). The node wraps it and hands the patched model back out.
- key_tile -
auto,64, or128. This is the CTA-K schedule, the "logical K tokens scheduled per CTA iteration."128reuses the same 32 KiB shared tile for two 64-token stages, which is a memory/scheduling trade.autois the production choice and the one the tooltip tells you to keep until you've measured on the target card. - hadamard_qk - default on. Applies a fused randomized Hadamard transform before the INT8 Q/K quantization. It's a classic trick: the transform spreads information across all elements so the fixed-point rounding hurts less. On is the production default, off is you experimenting.
- adaptive_k_anchor - default on. Conditionally subtracts an exact, softmax-invariant K anchor when it improves the quantization range. Ignored entirely if
hadamard_qkis off.
Output: a single model, straight into your sampler. There's no optional input, no second socket - it's a patch node in the purest sense.
When you'd actually touch it
Honestly? Almost never. If you're a normal Turing-GPU user who just wants ConvRot models to run, you never add this node at all. If you're trying to squeeze a bit more out of W8A8 attention on a specific card, the honest workflow is: measure, flip one knob, measure again, and expect to revert. The README is explicit that these are "explicit values intended for target-card profiling" and that they don't affect stable Sage attention at all.
How to install
It comes with the whole pack, and the pack's install is the fiddly kind:
cd ComfyUI/custom_nodes
git clone https://github.com/wjie98/comfyui-svdint4
cd comfyui-svdint4
python -m pip install -v --no-build-isolation -e ./kernel
That last line is the important one. This pack ships a compiled CUDA kernel, and it doesn't install itself - you build it with a local PyTorch that has CUDA and ninja available. The build detects every visible GPU (a 2080 Ti plus a 3070 gets you 7.5;8.6 in one go) and falls back to 7.5 on a GPU-less box. Manager can clone the pack for you, but it won't run the kernel build, so either way you still run that pip command. Skip it and the attention patch has nothing to patch.
The honest take
If you don't know what "logical K tokens scheduled per CTA iteration" means, this node is not for you yet - and that's fine, because the defaults are exactly what the author runs in production. Think of it as the tuning fork in the pack: it exists so the numbers that make your card fast are actually settable. Leave it out of your workflow until you have a benchmark and a question.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| key_tile | COMBO | auto | Logical K tokens scheduled per CTA iteration. 128 reuses the same 32 KiB shared tile for two 64-token stages; use this node only for profiling until measured on the target Turing GPU. |
| hadamard_qk | BOOLEAN | true | Apply the fused randomized Hadamard transform before INT8 Q/K quantization. Enabled is the production-quality default. |
| adaptive_k_anchor | BOOLEAN | true | Conditionally subtract an exact softmax-invariant K anchor when it improves quantization range. Ignored when Hadamard Q/K is disabled. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |