Closed foreverlove944 closed 1 year ago
Hi, this seems to be a size mismatch problem due to not enabling shortcut splitting in the ddim model based on your error message. Can you set split_shortcut=True
when initializing the model and see if that fixes the issue?
Thank you for the suggestion, but it did not solve the problem.The command I entered is as shown in the screenshot.
I just tested this with python scripts/sample_diffusion_ddim.py --config configs/cifar10.yml --use_pretrained --timesteps 100 --eta 0 --skip_type quad --ptq --weight_bit 8 --quant_mode qdiff --quant_act --act_bit 8 --a_sym --split -l cifar_out --cali_ckpt cifar_w8a8_ckpt.pth
using the latest codebase and it works fine. However, It seems like the splitting was not done as expected in your case.
I am not sure what's going on, but my guess is there might be some discrepancies with the dependencies (or codes if you have changed some) that made splitting not get called properly. Could you try doing pip install .
and running the previous command using again? Also please try doing this with an unmodified codebase if you have done some modifications and it doesn't work in your current one.
Thank you for your help. I have resolved the issue after downloading the code again.
When executing this line of code:
resume_cali_model(qnn, args.cali_ckpt, cali_data, args.quant_act, "qdiff", cond=False)
, the model cannot be loaded properly when runningqnn.load_state_dict(ckpt, strict=(act_quant_mode=='qdiff'))
. Can you tell me how to solve this problem? Thank you.