floyo logobeta logo
Powered by
ThinkDiffusion
floyo logobeta logo
Powered by
ThinkDiffusion

ComfyUI-ModelQuantizer

34

Last updated
2025-06-14

A specialized node pack for ComfyUI, the ComfyUI Model Quantizer enhances the quantization of model weights to lower precision formats such as FP16, BF16, and true FP8, with added support for ControlNet models. This tool streamlines the process of reducing model size while maintaining performance, making it particularly useful for users working with diffusion models.

  • Offers advanced quantization capabilities specifically tailored for ControlNet models, ensuring precision and efficiency.
  • Includes a GGUF quantization feature that supports multiple formats and automatic architecture detection for various diffusion models.
  • Provides tools for extracting model state dictionaries and saving them in SafeTensor format, enhancing compatibility and usability.

Context

The ComfyUI Model Quantizer is a custom node pack designed to facilitate the quantization of diffusion models directly within the ComfyUI framework. Its primary purpose is to allow users to convert model weights into lower precision formats, thus optimizing memory usage and improving processing speeds, particularly for high-demand applications in AI art generation.

Key Features & Benefits

This tool includes several practical features such as standard quantization nodes, which enable users to extract state dictionaries from models, convert weights to FP8 formats, and save them in SafeTensor files. Additionally, the inclusion of specialized nodes for ControlNet models provides enhanced quantization strategies that maintain model performance while reducing size.

Advanced Functionalities

The Model Quantizer features advanced capabilities such as precision-aware quantization for ControlNet models, which involves tensor calibration and the ability to handle different quantization strategies (per-tensor and per-channel). It also includes a metadata viewer that allows users to analyze model structures and tensor information, aiding in debugging and optimization.

Practical Benefits

By integrating this tool into their workflows, users can achieve significant improvements in model size reduction without sacrificing quality. The Model Quantizer enhances overall efficiency in ComfyUI by streamlining the quantization process, allowing for faster loading and execution of models, which is particularly beneficial for artists and developers working with large datasets and complex models.

Credits/Acknowledgments

This project builds upon and extends the work of City96's GGUF tools for diffusion model quantization. Acknowledgments are given to the City96 team for their contributions and to the broader ComfyUI community for their support and collaboration. The tool is released under the MIT license, ensuring open access for users.