ussoewwin/Hybrid-Sensitivity-Weighted-Quantization-SDXL-ConvRot-INT8
Hybrid-Sensitivity-Weighted-Quantization (HSWQ)
<p align="center"> <img src="https://raw.githubusercontent.com/ussoewwin/Hybrid-Sensitivity-Weighted-Quantization/main/icon.png" width="128"> </p>
High-fidelity ConvRot INT8 reverse hybrid quantization for SDXL diffusion models. HSWQ uses per-layer trajectory-impact measurement instead of naive uniform cast, converting only the K lowest-impact layers to ConvRot INT8 while keeping every other layer at FP16. This is highly useful for users who need to strictly manage their VRAM resources while maintaining maximum image quality.
Method
Reverse hybrid (diag → reverse): The FP16 checkpoint is the only input. A per-layer trajectory-impact measurement (sdxl/diag_impact_sdxl.py) injects each candidate layer's ConvRot INT8 reconstruction into the FP16 model one at a time and runs the production sampler — recording the final-latent drift. The K lowest-impact layers are then packed as FULL ConvRot INT8 (int8_tensorwise) while every other layer stays FP16 (sdxl/gen_reverse_int8_sdxl.py). The V3.1 selector (DualMonitor + V4 weighted-histogram MSE + full SVD, fixed 300 MiB FP16 protection budget) provides static protection, and the reverse step provides the dynamic trajectory-based criterion for the remaining pool.
Validated by the deterministic 25-seed latent-trajectory comparison (per-step cosine + bifurcation detection); production gate = cosine mean ≥ 0.95 and 0/25 bifurcated.
The quantized file does not embed a VAE (first_stage_model.* is removed at conversion): load it with a separate SDXL VAE.
Technical details: https://github.com/ussoewwin/Hybrid-Sensitivity-Weighted-Quantization
How to quantize (SDXL ConvRot INT8): md/How to quantize SDXL.md
Diag → Reverse SDXL Technical Guide: md/Diag_Reverse_SDXL_v1.1_Technical_Guide.md
ComfyUI Loader for ConvRot INT8 / INT8: To load these INT8 models in ComfyUI, please use the custom node: ComfyUI-HSWQ-Loader-and-Tools
SDXL ConvRot INT8 Benchmark Test Results (published tables): benchmark result/benchmark_sdxl_int8.md
Benchmark (Reference)
Production gate: deterministic 25-seed latent-trajectory comparison (benchmark/sdxl_int8_traj_compare.py). PASS = final-cosine mean ≥ 0.95 and 0/25 bifurcated.
📦 Available Models
Filename convention: <model>_hswq_1on_re<K>_convrot_int8.safetensors — reverse hybrid with K lowest-impact layers converted to ConvRot INT8, bias correction ON (1on), everything else FP16.
📜 Credits & License
🏆 Special Acknowledgement
We extend our deepest respect and gratitude to the Nunchaku Team for their groundbreaking work on SVDQ quantization and for sharing their models with the community. This collection relies heavily on their research and original implementation.
- Original Repository: nunchaku-tech/nunchaku-sdxl
Base Models
These models are derivatives of their respective creators. All credit for aesthetic tuning and model training belongs to the original creators.
- JANKU Trained Chenkin & Noobai-Rouwei (Illustrious-XL): Created by janxd.
- blue_pencil-XL: Created by Euge_us.
- epiCRealism XL: Created by epinikion.
- WAI-illustrious-SDXL / WAI-REAL_CN / WAI-REALISM / WAI-ANI-PONY-XL: Created by WAI0731.
- koronemixIllustrious / koronemixVpred: Created by koronen.
- Nova Anime XL / Nova Asian XL: Created by Crody.
- Prefect Illustrious XL: Created by Goofy_Ai.
- OneObsession: Created by Polyhedron.
- RealVisXL: Created by SG_161222.
- Unholy Desire Mix - Sinister: Created by UnholyDesiresStudio.
- UwazumiMix: Created by UWAZUMI.
Disclaimer: These models are provided for optimization and research purposes. Please adhere to the original licenses of the base models.
