Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

libpeng error for mixed-precision process #12

Open
Harahan opened this issue Jul 25, 2024 · 1 comment
Open

libpeng error for mixed-precision process #12

Harahan opened this issue Jul 25, 2024 · 1 comment

Comments

@Harahan
Copy link

Harahan commented Jul 25, 2024

Hi, thanks for releasing the wonderful work!

However, when I ran quant_content.py, I got the following error for both weight and activation quantization of SD-XL-turbo. Can you help me?

07/25/2024 10:23:39 - INFO - __main__ -   model.down_blocks.2.attentions.0.transformer_blocks.9.attn2.to_q: weight_quant=False, act_quant=True

Generating image samples for FID evaluation.:   0%|          | 0/1 [00:00<?, ?it/s]

  0%|          | 0/1 [00:00<?, ?it/s]�[A

100%|██████████| 1/1 [00:02<00:00,  2.54s/it]�[A
100%|██████████| 1/1 [00:02<00:00,  2.54s/it]

Generating image samples for FID evaluation.: 100%|██████████| 1/1 [00:10<00:00, 10.70s/it]
Generating image samples for FID evaluation.: 100%|██████████| 1/1 [00:10<00:00, 10.70s/it]libpng error: IDAT: CRC error

Traceback (most recent call last):
  File "mixed_precision_scripts/get_sensitivity/sdxl_turbo/quant_content.py", line 335, in <module>
    main()
  File "mixed_precision_scripts/get_sensitivity/sdxl_turbo/quant_content.py", line 194, in main
    SSIM_Layer(model=qnn, qnn=qnn, pipe=pipe, opt=opt, prompts=prompts, weight_quant=False, act_quant=True, weight_only=False, config_ssim_layer=config_ssim_layer, cur_bit=bit_width)
  File "mixed_precision_scripts/get_sensitivity/sdxl_turbo/quant_content.py", line 246, in SSIM_Layer
    SSIM_Layer(model=module, qnn=qnn, pipe=pipe, opt=opt, prompts=prompts, weight_quant=weight_quant, act_quant=act_quant, weight_only=weight_only, progressivly=False, config_ssim_layer=config_ssim_layer, cur_bit=cur_bit, prefix=full_name+".")
  File "mixed_precision_scripts/get_sensitivity/sdxl_turbo/quant_content.py", line 246, in SSIM_Layer
    SSIM_Layer(model=module, qnn=qnn, pipe=pipe, opt=opt, prompts=prompts, weight_quant=weight_quant, act_quant=act_quant, weight_only=weight_only, progressivly=False, config_ssim_layer=config_ssim_layer, cur_bit=cur_bit, prefix=full_name+".")
  File "mixed_precision_scripts/get_sensitivity/sdxl_turbo/quant_content.py", line 246, in SSIM_Layer
    SSIM_Layer(model=module, qnn=qnn, pipe=pipe, opt=opt, prompts=prompts, weight_quant=weight_quant, act_quant=act_quant, weight_only=weight_only, progressivly=False, config_ssim_layer=config_ssim_layer, cur_bit=cur_bit, prefix=full_name+".")
  [Previous line repeated 5 more times]
  File "mixed_precision_scripts/get_sensitivity/sdxl_turbo/quant_content.py", line 230, in SSIM_Layer
    ssim = SSIM(img_path1=opt.image_folder, 
  File "mixed_precision_scripts/get_sensitivity/sdxl_turbo/quant_content.py", line 316, in SSIM
    ssim_index = metrics.structural_similarity(img1, img2, multichannel=True, channel_axis=2, win_size=511)
  File "/home/huangyushi/miniconda3/envs/mixdq/lib/python3.8/site-packages/skimage/metrics/_structural_similarity.py", line 111, in structural_similarity
    check_shape_equality(im1, im2)
  File "/home/huangyushi/miniconda3/envs/mixdq/lib/python3.8/site-packages/skimage/_shared/utils.py", line 499, in check_shape_equality
    if not all(image0.shape == image.shape for image in images[1:]):
  File "/home/huangyushi/miniconda3/envs/mixdq/lib/python3.8/site-packages/skimage/_shared/utils.py", line 499, in <genexpr>
    if not all(image0.shape == image.shape for image in images[1:]):
AttributeError: 'NoneType' object has no attribute 'shape'
@A-suozhang
Copy link
Member

Thx for pointing out this issue, we will soon fix it in the upcoming commit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants