thu-nics / MixDQ

[ECCV24] MixDQ: Memory-Efficient Few-Step Text-to-Image Diffusion Models with Metric-Decoupled Mixed Precision Quantization
https://a-suozhang.xyz/mixdq.github.io/
25 stars 3 forks source link

Can it be used in sd1.5 and can it be combined with other acceleration methods such as ByteDance/Hyper SD #1

Open libai-lab opened 2 months ago

libai-lab commented 2 months ago

Can it be used in sd1.5 and can it be combined with other acceleration methods such as ByteDance/Hyper SD

A-suozhang commented 2 months ago

MixDQ supports SD1.5. By using the lcm_lora.yaml file, you can conduct quantization for SD1.50like models (Dreamlike) with LCM-lora. Our quantization code is independent of the timestep-wise acceleration method. By substituting the sdxl-turbo model ID in the config, it is compatible with HyperSD.

greasebig commented 2 months ago

Can it be used directly in sd1.5 or sdxl. What i mean is using W8A8 to accelerate normal 20 steps inference, without lcm_lora or sdxl turbo.

A-suozhang commented 2 months ago

Yes, it could be directly used. Just follow the example sdxl.yaml in our configs. For Sd1.5 model, you could remove the lora-related configs in lcm_lora.yaml, it`s compatible with standard Sd1.5.

greasebig commented 2 months ago

if I want to use normal sdxl 20steps inference in the pipeline from https://huggingface.co/nics-efc/MixDQ/tree/main, what should I do ?

greasebig commented 2 months ago

pipeline from https://huggingface.co/nics-efc/MixDQ/tree/main, seems to only compatible with lcm_lora and sdxl turbo.

greasebig commented 2 months ago

seems like i need to Generate Calibration Data and Post Training Quantization (PTQ) Process. it may cause very long time. do you have the quant parameters ckpt.pth that can be used directly in sdxl?