NeurIPS 2026Coming to NeurIPS?Explore papers, orals & directions

LITHE: Lattice-Indexed Twin Hadamard Encoding for Diffusion Personalization

Jian Jiang, Oya Celiktutan, Yaohui Wang, Yutong BanNeurIPS 2026

TL;DR

Serving personalized image generation models at scale hits a painful GPU memory wall: a single 80 GB A100 running FLUX.1-dev can only hold about 150 custom LoRA adapters at once, forcing slow disk swaps whenever users request different styles or subjects. LITHE replaces bulky floating-point adapter weights with tiny streams of integer indices pointing to a fixed, mathematical Hadamard codebook. This shrinks adapters by 47× on disk and lets a single GPU hold 10,000 adapters in memory simultaneously—decoding and routing heterogeneous user requests in milliseconds within a single batch.

What Problem Does This Paper Address?

Modern text-to-image platforms rely on Low-Rank Adaptation (LoRA)—lightweight add-on weight matrices ($A$ and $B$) that teach a frozen base model specific art styles, lighting setups, or personal pets. While a single rank-16 LoRA for FLUX.1-dev is relatively small (~153 MB), hosting a community catalog of thousands of them creates three major serving bottlenecks:

  1. VRAM limits: After loading the base model, an 80 GB GPU can only keep ~150 dense adapters resident in memory.
  2. Hot-swap latency: When a user requests an out-of-memory adapter, loading it from disk, merging it into the base weights, and reverting it afterward takes ~900 ms—an eternity in real-time serving.
  3. Broken batching: Merging weights globally into the base model forces the server to process heterogeneous user requests one by one, throwing away GPU batch parallelism.
Figure 1: Co-resident index-bank serving with per-sample routing. LITHE at 10242/28-step on FLUX.1-dev in bit-packed index-residency mode: 10,000 residents at 75.7 GB peak, Bmax=14 heterogeneous adapters per forward (Tab. 5 P6, 13.04 s/sample); B=96 unique-adapter run at 2562/4-step is reported numerically in App. E (16.43 s vs. serial 163.5 s, 9.95×). Wall-time vs. LoRA+compile is a separate decoded compiled hot-set point in Tab. 2, not this 10,000-resident operating point.

Methods

Instead of compressing LoRA weights after training, LITHE trains adapters natively as discrete integer indices using straight-through gradient estimation (passing gradients through discrete lookups during backpropagation).

Here is how the pipeline works:

  • Block Partitioning & RVQ: LoRA matrices $A$ and $B$ are sliced into 64-value blocks. Each block is approximated by summing three levels of Residual Vector Quantization (RVQ)—essentially a coarse-to-fine sum of three codewords from a 512-entry codebook.
  • 0 KB Deterministic Codebook: Unlike standard vector quantization that learns and stores a lookup table, LITHE derives its codewords mathematically from a Sylvester–Hadamard matrix (patterns of $\pm 1$ signs). Because this pool is a fixed mathematical constant, the codebook requires 0 KB of storage on disk or network transfer, and enables ultra-fast, closed-form nearest-neighbor search and decoding.
  • Asymmetric Twin Scales: Crucially, while both $A$ and $B$ share the same Hadamard sign pool, LITHE applies separate scalar multipliers to each side ($\sigma_A = 0.06$, and a decaying schedule $\{0.0025, 0.001, 0.0005\}$ for $B$).
  • Dual Serving Modes: On disk, indices are compressed with standard LZMA-9. On the GPU, the same indices drive either a decoded compiled mode (for small hot-sets, maximizing speed) or a bit-packed index-residency mode (packing seven 9-bit indices per 64-bit integer to hold 10,000 adapters in VRAM), using custom Triton kernels to route different adapters per sample in one forward pass.
Figure 2: Hadamard-indexed LoRA factors. The diagram follows the deployed adapter path. (1) Each LoRA A/B factor is partitioned into 64-value blocks. (2) A 9-bit ID selects a deterministic row of the shared Hadamard sign table. (3) Three residual levels store IDs whose scaled sign rows reconstruct the block. (4) The deployed per-adapter payload is only the index stream over side, block, and RVQ level; H9, Φ, and the side-specific A/B scales are global procedural constants used by the runtime decoder.

Datasets

To evaluate image quality and identity preservation across FLUX.1-dev, SDXL 1.0, and Qwen-Image-20B, the authors test on four benchmarks:

  • Public Benchmarks: DreamBooth-30 (30 subjects) and CC101-20 (a 20-subject slice of CustomConcept101).
  • New Synthetic Benchmarks: Because modern generators like FLUX can already render common objects and styles zero-shot—leaving little work for a LoRA to actually do—the authors introduce SCIdentity (20 rare, visually demanding animal-like individuals) and SC-40 (40 controlled concepts across 5 axes like lighting, pose, and outfit).

Key Insights and Ideas

  • Scale asymmetry is the secret sauce: In naturally trained LoRAs, the $A$ matrix values are roughly 25× larger than $B$ ($\sigma_A \gg \sigma_B$). In ablations, forcing both sides to share the same scale causes image generation quality to completely collapse (dropping from 4.01 to 1.00 on a 5-point scale). Decoupling their scales—not separating their sign pools—is what makes discrete LoRA training work.
  • Math beats learned tables for deployment: Replacing a learned codebook with fixed Hadamard projections sacrifices virtually zero quality (staying within trial noise of learned tables) while eliminating codebook storage overhead and unlocking closed-form GPU decoding in 4.56 ms.

Key Results

  • Massive Compression & Residency: On disk, a rank-16 LITHE adapter averages 3.23 MB—47× smaller than a matched 153.3 MB bf16 LoRA (and 190× smaller than rank-64). On an 80 GB A100, bit-packed residency holds 10,000 verified adapters (at 75.7 GB peak VRAM) vs. 156 for standard resident LoRA—a ~64× capacity jump.
  • Serving Speedups: Against production serial-fuse serving (when catalogs exceed VRAM), LITHE is 1.46× to 13.6× faster across resolutions. In hot-set compiled mode at $1024^2$, it runs within 0.8% of an upper-bound pre-loaded LoRA+compile baseline (133.4s vs. 132.4s) and 1.07–1.42× faster at lower resolutions. Warm adapter hot-swaps drop from ~900 ms to 4.56 ms.
  • Competitive Quality: Scored by a 3-LLM judge ensemble (GPT-5.1, Claude Sonnet 4.6, Gemini 2.5 Flash), LITHE is the highest-scoring non-LoRA method on all three FLUX identity benchmarks, staying within 0.05–0.18 points of full-precision LoRA while comfortably beating compression baselines like QLoRA-NF4 (22 MB) and VeRA.
Table 1: Storage–quality panel: LITHE vs PEFT baselines on DreamBooth-30, CC101-20, SCIdentity, and SC-40. Each trained-adapter entry is the mean over three training runs, with seeds 42/1/7 for LoRA and LITHE and 42/43/44 for the other adapters. For LLM-avg, ± is each judge’s standard deviation across the three runs, averaged over the three judges. All LoRA-family methods in this table use rank r=16 unless explicitly noted. Vanilla FLUX is the backbone without an adapter, rendered once, and its LLM-avg entry is the GPT-5.1 average alone. LLM-avg, a closed-model soft quality signal, averages the GPT-5.1, Gemini 2.5 Flash, and Claude Sonnet 4.6 benchmark-level judge averages on a 1–5 scale. Quality entries are rounded to two decimals. App. F reports per-model judge averages, and the prompt-level rubric sub-scores are in the code repository. DreamSim is reference-image similarity. Per-task storage is cold deploy-time MB per concept, measured on each method’s own r=16 adapter. LoRA, DyLoRA, LoRA-FA, and LITHE use the 304-Linear Kohya layout, which includes the modulation Linears. DoRA, VeRA, AdaLoRA, and QLoRA-NF4 wrap the 342 attention/FFN Linears of the PEFT trainer, LoRA-XS its 266 attention Linears, and T-LoRA follows its reference implementation. CLIP-T values for all rows and an analysis of CLIP-T’s coarseness as a personalization metric are reported in App. K.1. Baseline-row implementation, payload accounting, and the QLoRA-NF4† deployed-only convention are in App. D and App. H.

Limitations and Future Work

  • Strict Fidelity Trade-off: While prompt adherence and overall visual quality match dense LoRA closely, LITHE loses some strict subject-identity and intricate outfit/style fidelity compared to uncompressed rank-16 LoRA.
  • Latency in Max-Residency Mode: Operating in the 10,000-adapter bit-packed mode incurs ~37% higher per-sample wall-time compared to the decoded compiled hot-set mode.
  • Cross-Architecture Tuning: While FLUX-tuned scale constants transfer seamlessly to SDXL (0.02 judge gap), transferring to Qwen-Image-20B leaves a 0.21 quality gap that requires either a per-adapter depth schedule or a small (0.75 MiB) backbone-specific learned codebook to close. Video and vision-language models remain out of scope for now.

Summary updated

BibTeX
@inproceedings{jiang2026lithe,
  author = {Jian Jiang and Oya Celiktutan and Yaohui Wang and Yutong Ban},
  title = {{LITHE: Lattice-Indexed Twin Hadamard Encoding for Diffusion Personalization}},
  booktitle = {Advances in Neural Information Processing Systems},
  year = {2026},
  url = {https://openreview.net/forum?id=aFYphrxbNI},
}
Figure