int8 models ComfyUI fix?

#1
by shiboishi - opened

Can you please explain what did you do to fix int8 model to be usable with native ComfyUI nodes? Does it need a new requanting from full weights?

The native ComfyUI loader reads a per-layer JSON config from a .comfy_quant byte tensor inside the safetensors file, and looks for a "format" field naming entry in QUANT_ALGOS to use (e.g. "int8_tensorwise"). If that field is missing, it raises errors "Unknown quantization format." The Int8-Fast node I use to quantize models was writing those per-layer configs with convrot, convrot_groupsize, and per_row, but no format. So the file looked quantized to the loader but couldn't be dispatched. I changed int8_save.py to include "format": "int8_tensorwise" in each per-layer config going forward, and wrote a patcher script that adds the field to existing quantized files.

Sign up or log in to comment