Instructions to use Disty0/GLM-Image-SDNQ-4bit-dynamic with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use Disty0/GLM-Image-SDNQ-4bit-dynamic with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("Disty0/GLM-Image-SDNQ-4bit-dynamic", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
- Local Apps Settings
- Draw Things
- DiffusionBee
Download transformer/quantization_config.json from Disty0/GLM-Image-SDNQ-4bit-dynamic: direct link, hf CLI and curl.
- Browser
- Download file 11.3 kB
-
https://huggingface.co/Disty0/GLM-Image-SDNQ-4bit-dynamic/resolve/main/transformer/quantization_config.json
- Command line
-
hf download hf://Disty0/GLM-Image-SDNQ-4bit-dynamic/transformer/quantization_config.json
-
curl -L -o quantization_config.json https://huggingface.co/Disty0/GLM-Image-SDNQ-4bit-dynamic/resolve/main/transformer/quantization_config.json
11.3 kB
| { | |
| "add_skip_keys": false, | |
| "dequantize_fp32": false, | |
| "dynamic_loss_threshold": 0.01, | |
| "group_size": 0, | |
| "is_integer": true, | |
| "is_training": false, | |
| "modules_dtype_dict": { | |
| "float5_e3m1fn": [ | |
| "transformer_blocks.23.norm1.linear.weight", | |
| "transformer_blocks.24.norm1.linear.weight", | |
| "transformer_blocks.25.norm1.linear.weight" | |
| ], | |
| "int5": [ | |
| "transformer_blocks.0.attn1.to_k.weight", | |
| "transformer_blocks.0.attn1.to_v.weight", | |
| "transformer_blocks.0.ff.net.0.proj.weight", | |
| "transformer_blocks.1.attn1.to_k.weight", | |
| "transformer_blocks.1.attn1.to_q.weight", | |
| "transformer_blocks.1.attn1.to_v.weight", | |
| "transformer_blocks.1.ff.net.0.proj.weight", | |
| "transformer_blocks.10.attn1.to_v.weight", | |
| "transformer_blocks.2.attn1.to_k.weight", | |
| "transformer_blocks.2.attn1.to_q.weight", | |
| "transformer_blocks.2.attn1.to_v.weight", | |
| "transformer_blocks.3.attn1.to_k.weight", | |
| "transformer_blocks.3.attn1.to_q.weight", | |
| "transformer_blocks.3.attn1.to_v.weight", | |
| "transformer_blocks.3.ff.net.0.proj.weight", | |
| "transformer_blocks.4.attn1.to_k.weight", | |
| "transformer_blocks.4.attn1.to_q.weight", | |
| "transformer_blocks.4.attn1.to_v.weight", | |
| "transformer_blocks.5.attn1.to_v.weight", | |
| "transformer_blocks.6.attn1.to_v.weight", | |
| "transformer_blocks.7.attn1.to_v.weight", | |
| "transformer_blocks.8.attn1.to_v.weight", | |
| "transformer_blocks.9.attn1.to_v.weight", | |
| "transformer_blocks.21.norm1.linear.weight", | |
| "transformer_blocks.22.norm1.linear.weight", | |
| "transformer_blocks.25.ff.net.2.weight", | |
| "transformer_blocks.26.attn1.to_v.weight", | |
| "transformer_blocks.26.ff.net.2.weight", | |
| "transformer_blocks.26.norm1.linear.weight", | |
| "transformer_blocks.27.attn1.to_v.weight", | |
| "transformer_blocks.27.norm1.linear.weight", | |
| "transformer_blocks.28.attn1.to_v.weight", | |
| "transformer_blocks.29.attn1.to_v.weight" | |
| ], | |
| "uint4": [ | |
| "transformer_blocks.0.attn1.to_out.0.weight", | |
| "transformer_blocks.0.attn1.to_q.weight", | |
| "transformer_blocks.0.ff.net.2.weight", | |
| "transformer_blocks.1.attn1.to_out.0.weight", | |
| "transformer_blocks.1.ff.net.2.weight", | |
| "transformer_blocks.1.norm1.linear.weight", | |
| "transformer_blocks.10.attn1.to_k.weight", | |
| "transformer_blocks.10.attn1.to_out.0.weight", | |
| "transformer_blocks.10.attn1.to_q.weight", | |
| "transformer_blocks.10.norm1.linear.weight", | |
| "transformer_blocks.2.attn1.to_out.0.weight", | |
| "transformer_blocks.2.ff.net.0.proj.weight", | |
| "transformer_blocks.2.ff.net.2.weight", | |
| "transformer_blocks.2.norm1.linear.weight", | |
| "transformer_blocks.3.attn1.to_out.0.weight", | |
| "transformer_blocks.3.ff.net.2.weight", | |
| "transformer_blocks.3.norm1.linear.weight", | |
| "transformer_blocks.4.attn1.to_out.0.weight", | |
| "transformer_blocks.4.ff.net.0.proj.weight", | |
| "transformer_blocks.4.ff.net.2.weight", | |
| "transformer_blocks.4.norm1.linear.weight", | |
| "transformer_blocks.5.attn1.to_k.weight", | |
| "transformer_blocks.5.attn1.to_out.0.weight", | |
| "transformer_blocks.5.attn1.to_q.weight", | |
| "transformer_blocks.5.ff.net.0.proj.weight", | |
| "transformer_blocks.5.ff.net.2.weight", | |
| "transformer_blocks.5.norm1.linear.weight", | |
| "transformer_blocks.6.attn1.to_k.weight", | |
| "transformer_blocks.6.attn1.to_out.0.weight", | |
| "transformer_blocks.6.attn1.to_q.weight", | |
| "transformer_blocks.6.ff.net.0.proj.weight", | |
| "transformer_blocks.6.ff.net.2.weight", | |
| "transformer_blocks.6.norm1.linear.weight", | |
| "transformer_blocks.7.attn1.to_k.weight", | |
| "transformer_blocks.7.attn1.to_out.0.weight", | |
| "transformer_blocks.7.attn1.to_q.weight", | |
| "transformer_blocks.7.ff.net.0.proj.weight", | |
| "transformer_blocks.7.ff.net.2.weight", | |
| "transformer_blocks.7.norm1.linear.weight", | |
| "transformer_blocks.8.attn1.to_k.weight", | |
| "transformer_blocks.8.attn1.to_out.0.weight", | |
| "transformer_blocks.8.attn1.to_q.weight", | |
| "transformer_blocks.8.ff.net.0.proj.weight", | |
| "transformer_blocks.8.ff.net.2.weight", | |
| "transformer_blocks.8.norm1.linear.weight", | |
| "transformer_blocks.9.attn1.to_k.weight", | |
| "transformer_blocks.9.attn1.to_out.0.weight", | |
| "transformer_blocks.9.attn1.to_q.weight", | |
| "transformer_blocks.9.ff.net.0.proj.weight", | |
| "transformer_blocks.9.ff.net.2.weight", | |
| "transformer_blocks.9.norm1.linear.weight", | |
| "transformer_blocks.10.ff.net.0.proj.weight", | |
| "transformer_blocks.10.ff.net.2.weight", | |
| "transformer_blocks.11.attn1.to_k.weight", | |
| "transformer_blocks.11.attn1.to_out.0.weight", | |
| "transformer_blocks.11.attn1.to_q.weight", | |
| "transformer_blocks.11.attn1.to_v.weight", | |
| "transformer_blocks.11.ff.net.0.proj.weight", | |
| "transformer_blocks.11.ff.net.2.weight", | |
| "transformer_blocks.11.norm1.linear.weight", | |
| "transformer_blocks.12.attn1.to_k.weight", | |
| "transformer_blocks.12.attn1.to_out.0.weight", | |
| "transformer_blocks.12.attn1.to_q.weight", | |
| "transformer_blocks.12.attn1.to_v.weight", | |
| "transformer_blocks.12.ff.net.0.proj.weight", | |
| "transformer_blocks.12.ff.net.2.weight", | |
| "transformer_blocks.12.norm1.linear.weight", | |
| "transformer_blocks.13.attn1.to_k.weight", | |
| "transformer_blocks.13.attn1.to_out.0.weight", | |
| "transformer_blocks.13.attn1.to_q.weight", | |
| "transformer_blocks.13.attn1.to_v.weight", | |
| "transformer_blocks.13.ff.net.0.proj.weight", | |
| "transformer_blocks.13.ff.net.2.weight", | |
| "transformer_blocks.13.norm1.linear.weight", | |
| "transformer_blocks.14.attn1.to_k.weight", | |
| "transformer_blocks.14.attn1.to_out.0.weight", | |
| "transformer_blocks.14.attn1.to_q.weight", | |
| "transformer_blocks.14.attn1.to_v.weight", | |
| "transformer_blocks.14.ff.net.0.proj.weight", | |
| "transformer_blocks.14.ff.net.2.weight", | |
| "transformer_blocks.14.norm1.linear.weight", | |
| "transformer_blocks.15.attn1.to_k.weight", | |
| "transformer_blocks.15.attn1.to_out.0.weight", | |
| "transformer_blocks.15.attn1.to_q.weight", | |
| "transformer_blocks.15.attn1.to_v.weight", | |
| "transformer_blocks.15.ff.net.0.proj.weight", | |
| "transformer_blocks.15.ff.net.2.weight", | |
| "transformer_blocks.15.norm1.linear.weight", | |
| "transformer_blocks.16.attn1.to_k.weight", | |
| "transformer_blocks.16.attn1.to_out.0.weight", | |
| "transformer_blocks.16.attn1.to_q.weight", | |
| "transformer_blocks.16.attn1.to_v.weight", | |
| "transformer_blocks.16.ff.net.0.proj.weight", | |
| "transformer_blocks.16.ff.net.2.weight", | |
| "transformer_blocks.16.norm1.linear.weight", | |
| "transformer_blocks.17.attn1.to_k.weight", | |
| "transformer_blocks.17.attn1.to_out.0.weight", | |
| "transformer_blocks.17.attn1.to_q.weight", | |
| "transformer_blocks.17.attn1.to_v.weight", | |
| "transformer_blocks.17.ff.net.0.proj.weight", | |
| "transformer_blocks.17.ff.net.2.weight", | |
| "transformer_blocks.17.norm1.linear.weight", | |
| "transformer_blocks.18.attn1.to_k.weight", | |
| "transformer_blocks.18.attn1.to_out.0.weight", | |
| "transformer_blocks.18.attn1.to_q.weight", | |
| "transformer_blocks.18.attn1.to_v.weight", | |
| "transformer_blocks.18.ff.net.0.proj.weight", | |
| "transformer_blocks.18.ff.net.2.weight", | |
| "transformer_blocks.18.norm1.linear.weight", | |
| "transformer_blocks.19.attn1.to_k.weight", | |
| "transformer_blocks.19.attn1.to_out.0.weight", | |
| "transformer_blocks.19.attn1.to_q.weight", | |
| "transformer_blocks.19.attn1.to_v.weight", | |
| "transformer_blocks.19.ff.net.0.proj.weight", | |
| "transformer_blocks.19.ff.net.2.weight", | |
| "transformer_blocks.19.norm1.linear.weight", | |
| "transformer_blocks.20.attn1.to_k.weight", | |
| "transformer_blocks.20.attn1.to_out.0.weight", | |
| "transformer_blocks.20.attn1.to_q.weight", | |
| "transformer_blocks.20.attn1.to_v.weight", | |
| "transformer_blocks.20.ff.net.0.proj.weight", | |
| "transformer_blocks.20.ff.net.2.weight", | |
| "transformer_blocks.20.norm1.linear.weight", | |
| "transformer_blocks.21.attn1.to_k.weight", | |
| "transformer_blocks.21.attn1.to_out.0.weight", | |
| "transformer_blocks.21.attn1.to_q.weight", | |
| "transformer_blocks.21.attn1.to_v.weight", | |
| "transformer_blocks.21.ff.net.0.proj.weight", | |
| "transformer_blocks.21.ff.net.2.weight", | |
| "transformer_blocks.22.attn1.to_k.weight", | |
| "transformer_blocks.22.attn1.to_out.0.weight", | |
| "transformer_blocks.22.attn1.to_q.weight", | |
| "transformer_blocks.22.attn1.to_v.weight", | |
| "transformer_blocks.22.ff.net.0.proj.weight", | |
| "transformer_blocks.22.ff.net.2.weight", | |
| "transformer_blocks.23.attn1.to_k.weight", | |
| "transformer_blocks.23.attn1.to_out.0.weight", | |
| "transformer_blocks.23.attn1.to_q.weight", | |
| "transformer_blocks.23.attn1.to_v.weight", | |
| "transformer_blocks.23.ff.net.0.proj.weight", | |
| "transformer_blocks.23.ff.net.2.weight", | |
| "transformer_blocks.24.attn1.to_k.weight", | |
| "transformer_blocks.24.attn1.to_out.0.weight", | |
| "transformer_blocks.24.attn1.to_q.weight", | |
| "transformer_blocks.24.attn1.to_v.weight", | |
| "transformer_blocks.24.ff.net.0.proj.weight", | |
| "transformer_blocks.24.ff.net.2.weight", | |
| "transformer_blocks.25.attn1.to_k.weight", | |
| "transformer_blocks.25.attn1.to_out.0.weight", | |
| "transformer_blocks.25.attn1.to_q.weight", | |
| "transformer_blocks.25.attn1.to_v.weight", | |
| "transformer_blocks.25.ff.net.0.proj.weight", | |
| "transformer_blocks.26.attn1.to_k.weight", | |
| "transformer_blocks.26.attn1.to_out.0.weight", | |
| "transformer_blocks.26.attn1.to_q.weight", | |
| "transformer_blocks.26.ff.net.0.proj.weight", | |
| "transformer_blocks.27.attn1.to_k.weight", | |
| "transformer_blocks.27.attn1.to_out.0.weight", | |
| "transformer_blocks.27.attn1.to_q.weight", | |
| "transformer_blocks.27.ff.net.0.proj.weight", | |
| "transformer_blocks.27.ff.net.2.weight", | |
| "transformer_blocks.28.attn1.to_k.weight", | |
| "transformer_blocks.28.attn1.to_out.0.weight", | |
| "transformer_blocks.28.attn1.to_q.weight", | |
| "transformer_blocks.28.ff.net.0.proj.weight", | |
| "transformer_blocks.28.ff.net.2.weight", | |
| "transformer_blocks.28.norm1.linear.weight", | |
| "transformer_blocks.29.attn1.to_k.weight", | |
| "transformer_blocks.29.attn1.to_out.0.weight", | |
| "transformer_blocks.29.attn1.to_q.weight", | |
| "transformer_blocks.29.ff.net.0.proj.weight", | |
| "transformer_blocks.29.ff.net.2.weight", | |
| "transformer_blocks.29.norm1.linear.weight" | |
| ] | |
| }, | |
| "modules_to_not_convert": [ | |
| "transformer_blocks.0.norm1.linear.weight", | |
| "time_condition_embed", | |
| "image_projector", | |
| "proj_out", | |
| "prior_projector", | |
| "glyph_projector", | |
| "norm_out" | |
| ], | |
| "non_blocking": false, | |
| "quant_conv": false, | |
| "quant_method": "sdnq", | |
| "quantization_device": null, | |
| "quantized_matmul_dtype": null, | |
| "return_device": null, | |
| "sdnq_version": "0.1.4", | |
| "svd_rank": 32, | |
| "svd_steps": 8, | |
| "use_dynamic_quantization": true, | |
| "use_grad_ckpt": true, | |
| "use_quantized_matmul": false, | |
| "use_quantized_matmul_conv": false, | |
| "use_static_quantization": true, | |
| "use_stochastic_rounding": false, | |
| "use_svd": false, | |
| "weights_dtype": "uint4" | |
| } | |