Skip to content

Unofficial ComfyUI reference implementation of HSWQ (calibration + V1 FP8 conversion) #1

@Shiba-2-shiba

Description

@Shiba-2-shiba

以下、GPTが出してくれた英語ですが、ComfyUIで実装を試してみたカスタムノード案のリポジトリを作成しました。
Z-Imageにも使えるか分かりませんが、実装の参考になればと思います。

Hi, and thank you for releasing the HSWQ code and documentation.
I’ve been experimenting with your quantization method and found it very effective.

I recently implemented an unofficial reference integration of HSWQ for ComfyUI,
with the goal of making the original algorithm usable in practical SDXL workflows
without modifying its core logic.

What I implemented:

  • A ComfyUI custom-node implementation of HSWQ:
    • a calibration node that collects HSWQ statistics during normal image generation
    • a conversion node that applies V1-compatible FP8 quantization
  • The quantization logic itself follows your original design
    (layer sensitivity ranking + weighted histogram MSE for amax optimization)
  • The focus is strictly on workflow-level integration
    (UI, persistence, safety), not on changing or extending the algorithm

Repository:
https://github.com/Shiba-2-shiba/ComfyUI-HSWQ-Quantizer

This is not intended as a replacement or fork, but purely as a practical
reference implementation for users who work inside ComfyUI.
If you find it useful, feel free to reference it (for example as a community
implementation), or extract any ideas that might be helpful upstream.

If you’d like, I can also isolate specific parts (such as calibration handling
or persistence) as minimal patches or design notes.

Thanks again for sharing your work.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions