Update README.md to include a quantization code snippet

#7
by sayakpaul HF Staff - opened
sayakpaul changed pull request title from Update README.md to Update README.md to include a quantization code snippet

I tested this PR with the latest diffusers, bitsandbytes, and transformers from git and I think there might be some issues.

  1. Steps is 4 in the quantized example which I believe is wrong. The non-quantized example uses 50 steps and using 4 steps with this code just results in a blur.
  2. This model seems extremely sensitive to NF4 quantization, and running this code (even modified for 50 steps) results in a very grainy image.
  3. The PR'd example removes the Ultra HD, 4K, cinematic composition. suffix which seems to be needed to get decent (if grainy) results.

EDIT: for anyone looking to run this quantized, Optimum Quanto (code taken from example here https://github.com/QwenLM/Qwen-Image/pull/6/files) seems to work much better than bitsandbytes NF4.

Ready to merge
This branch is ready to get merged automatically.

Sign up or log in to comment