Skip to content

'TinyGemmWeightQBitsTensor' object has no attribute '_scale' #16

Description

@wikeeyang

Hi, I use optimum-quanto v0.2.7 to quantized the https://huggingface.co/tencent/HunyuanImage-3.0 model and save to safetensors file, the command is "quantize(model, weights=qint4)", the method according to https://github.com/huggingface/optimum-quanto#quantization-workflow-for-vanilla-pytorch-models-low-level-api.

I can reload successed by script "load_quantized_model.py" which you can find under my HF repo https://huggingface.co/wikeeyang/Hunyuan-Image-30-Qint4.

use mmgp 3.6.4 want to save GPU memory, it will pop the below error message:

Create Meta model and Loading quantized weights to CPU...
************ Memory Management for the GPU Poor (mmgp 3.6.4) by DeepBeepMeep ************
Quantization of model 'transformer' started to format 'quanto.qint8'
No quantization to do as model is already quantized
Traceback (most recent call last):
File "/home/tkadm/HunyuanImage3/app_me.py", line 375, in
load_pipeline(args)
File "/home/tkadm/HunyuanImage3/app_me.py", line 40, in load_pipeline
hyi3_pipeline = HunyuanImage3AppPipeline(args)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tkadm/HunyuanImage3/app/pipeline.py", line 83, in init
offload.profile( {"transformer":self.model.model}, profile_type.HighRAM_HighVRAM, verboseLevel = -1)
File "/home/tkadm/miniconda3/envs/video/lib/python3.11/site-packages/mmgp/offload.py", line 3074, in profile
return all(pipe_or_dict_of_modules, verboseLevel = verboseLevel, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/home/tkadm/miniconda3/envs/video/lib/python3.11/site-packages/mmgp/offload.py", line 2778, in all
dtype = p._scale.dtype
^^^^^^^^
AttributeError: 'TinyGemmWeightQBitsTensor' object has no attribute '_scale'

Please help to analyze the reason for this error, thank you a lot.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

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