ModelTC / TFMQ-DM

[CVPR 2024 Highlight] This is the official PyTorch implementation of "TFMQ-DM: Temporal Feature Maintenance Quantization for Diffusion Models".
https://modeltc.github.io/TFMQ-DM/
Apache License 2.0
55 stars 4 forks source link

A small bug during the inference #6

Closed IC-Yuan closed 3 months ago

IC-Yuan commented 3 months ago

Hi, Thanks for this work! I found a small bug during the inference phase:In the inference of DDIM, this example uses -- cali_save_path to load <PATH/TO/LOAD/QUANTIZED/MODEL>.

So in my opinion,i prefer to change python sample_diffusion_ddim.py --config ddim/configs/cifar10.yml --timesteps 100 --eta 0 --skip_type quad --wq <4 OR 8> --ptq --aq 8 -l <PATH/TO/SAVE/RESULT> --use_aq --cali_save_path <PATH/TO/LOAD/QUANTIZED/MODEL> --max_images 128

to python sample_diffusion_ddim.py --config ddim/configs/cifar10.yml --timesteps 100 --eta 0 --skip_type quad --wq <4 OR 8> --ptq --aq 8 -l <PATH/TO/SAVE/RESULT> --use_aq --cali_ckpt <PATH/TO/LOAD/QUANTIZED/MODEL> --max_images 128

Also, when I saw the function sample_fid aboutuntill_fake_t, I thought the code was really smelly

Thx.