Nodes/Skoogeer-Noise/Model (TurboQuant Attention)
ComfyUI Node

Model (TurboQuant Attention)

A ComfyUI node in model/patch with 16 inputs and 1 output.

By ttulttul·Created 8 months ago·Updated 2 months ago· 14
Model (TurboQuant Attention)
  • model
  • MODEL
bits8
qjl_dim64
use_qjl
quantize_values
min_token_product65536
max_token_product262144
attention_scope
layer_start-1
layer_end-1
rotation_seed0
max_head_dim256
force_fp32
memory_margin_mb1024
log_every50
log_fallbacks
Categorymodel/patch

Inputs (16)

NameTypeDefaultDescription
modelMODELModel to clone and patch with a TurboQuant-inspired attention approximation.
bitsINT81–8Bits per rotated coordinate for the scalar quantizer. Higher is safer for image quality; lower is more aggressive.
qjl_dimINT641–4096Projection width for the QJL-style residual correction on logits.
use_qjlCOMBOEnable the 1-bit residual correction term for key logits. Currently forced off in the runtime path.
quantize_valuesCOMBOQuantize values as well as keys. Disable is safer for image quality and is the default.
min_token_productINT655360–1073741824Only patch attention calls where query_tokens * key_tokens meets this threshold.
max_token_productINT2621440–1073741824Skip attention calls above this query_tokens * key_tokens threshold. Conservative default avoids the largest, most memory-sensitive layers.
attention_scopeCOMBOWhich attention calls to patch.
layer_startINT-1-1–4096First transformer block index to patch. -1 disables the lower bound.
layer_endINT-1-1–4096Last transformer block index to patch. -1 disables the upper bound.
rotation_seedINT00–18446744073709550000Seed used for the random orthogonal rotation and Gaussian residual projection.
max_head_dimINT2561–4096Skip heads larger than this to avoid excessive projection overhead.
force_fp32COMBOCast q/k/v to fp32 inside the override for extra numerical stability.
memory_margin_mbINT10240–65536Keep this much free CUDA memory in reserve before allowing the TurboQuant workspace allocation.
log_everyINT500–1000000Emit a TurboQuant runtime summary every N attention calls. Set 1 for per-call summaries, 0 to disable periodic summaries.
log_fallbacksCOMBOLog individual skip/fallback reasons when TurboQuant does not activate.

Outputs (1)

NameTypeDescription
MODELMODEL