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

Quantize Stable Diffusion examples #368

Open
LukeLIN-web opened this issue Jan 9, 2025 · 1 comment
Open

Quantize Stable Diffusion examples #368

LukeLIN-web opened this issue Jan 9, 2025 · 1 comment

Comments

@LukeLIN-web
Copy link

LukeLIN-web commented Jan 9, 2025

I am using A6000.
I tried python quantize_StableDiffusion.py --batch_size=1 --torch_dtype="fp16" , it can work well.
But python quantize_StableDiffusion.py --batch_size=1 --unet_qtype="fp8" , it is very slow. Why?

Because readme.md we have installed latest

git clone https://github.com/huggingface/quanto
cd quanto
pip install -e .

Problem

  1. What is different between this repo Optimum Quanto and https://github.com/huggingface/quanto
  2. what is different between torch_dtype and unet dtype
@dacorvo
Copy link
Collaborator

dacorvo commented Jan 9, 2025

  1. quanto has just been renamed to optimum-quanto
  2. the dtype is the type used in non-quantized operations (basically everything except Linear layers), and the qtype is the weight quantization for Linear in unet

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