8 Commits
Author SHA1 Message Date
Vyacheslav-TomashevskiyandVyacheslav-Tomashevskiy 035a13bc25 fix(tq3): apply the sign flips before the FWHT, not after (#7)
The randomized Hadamard transform needs its sign flips applied before the
transform. Applied afterwards they cannot spread anything: absmax and a
codebook symmetric about zero are both invariant under a sign flip, so the
reconstruction comes back bit-for-bit identical. The documented decorrelation
step was therefore a no-op, and any block carrying an offset or low-frequency
content stayed collapsed into a single Hadamard coefficient - a constant block
round-tripped at cosine 0.611 with a relative L2 error of 1.27, i.e. worse
than returning zeros.

Also make the test suite runnable (it errored out entirely, because pytest
imports the repository root __init__.py as a top-level module and the relative
imports failed) and stop the attention patch from raising AttributeError on
ComfyUI's attn2 path, which does not coerce a None context the way attn1 does.

Co-authored-by: Vyacheslav-Tomashevskiy <Vyacheslav-Tomashevskiy@users.noreply.github.com>
2026-08-20 10:53:14 -04:00
Scott 8d45798b9d license: restore full MIT text
The LICENSE file held only the boilerplate notice, with the operative
terms replaced by a URL. This restores the canonical text. The existing
copyright notice is unchanged and the licence is unchanged.

Signed-off-by: Scott <scottbphone12@gmail.com>
2026-08-05 20:42:56 -05:00
pengshenghai e473df7857 Add ComfyUI TurboQuant llms GEO profile (#6) 2026-06-14 21:54:19 -05:00
Scott Boudreaux 5e5e50fda2 bcos: BCOS-ready — BCOS.md, badge, SPDX (MIT) headers, MIT LICENSE 2026-06-09 19:25:21 -05:00
Andy Page ef9c36b77b Add TQ3 core unit tests (#2) 2026-05-18 09:33:44 -05:00
shindevlinandGrouchly fe08a77a80 docs: add contributing guide (#3)
Co-authored-by: Grouchly <ubuntclaw@Grouchly.tailbdd0ba.ts.net>
2026-05-18 09:08:54 -05:00
Scott BoudreauxandClaude Opus 4.6 c3e09ad1a5 Harden TQ3 core + honest node descriptions (Codex review)
- Replace assert-based validation with explicit checks in public API
- Correct node descriptions: round-trip experiment, not persistent KV cache
- Clear global state when TurboQuantPatch disabled
- Fix compression stats to use actual tensor bytes

Reviewed by GPT-5.4 (Codex). 14 issues found across session codebase.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-03 10:14:26 -05:00
Scott BoudreauxandClaude Opus 4.6 9810b22fa0 ComfyUI-TurboQuant: TQ3 KV cache compression for video generation
Custom ComfyUI node that compresses attention KV cache by 4.6x using
TurboQuant (Google ICLR 2026) 3-bit quantization. Enables LTX-2.3 22B
to run on a single V100-SXM2-32GB with 6GB headroom.

Verified: 41 frames generated, 26.5GB peak VRAM (down from 32.4GB).
First known TQ3 KV compression deployment in a video generation pipeline.

Nodes: TurboQuantPatch (model patcher), TurboQuantInfo (stats display)
Quality: 0.983 cosine similarity, 4.57x compression ratio

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-02 21:15:15 -05:00