license:apache-2.0 region:us
---
license: apache-2.0
---
# Distillation for quantization on Textual Inversion models to personalize text2image with Intel® Neural Compressor

<p float="left">
  <img src="https://huggingface.co/datasets/Intel/textual_inversion_dicoo_dfq/resolve/main/FP32.png" width = "300" height = "300" alt="FP32" align=center />
  <img src="https://huggingface.co/datasets/Intel/textual_inversion_dicoo_dfq/resolve/main/INT8.png" width = "300" height = "300" alt="INT8" align=center />
</p>

Image on the top is generated from the FP32 finetuned stable diffusion model, bottom image is generated from the INT8 stable diffusion model which is quantized from the FP32 model by distillation for quantization approach.
<br>
Please refer to this <a href="https://github.com/intel/neural-compressor/tree/master/examples/pytorch/diffusion_model/diffusers/textual_inversion/distillation_for_quantization">example</a> of Intel® Neural Compressor for more detail.