Text-to-Image
Diffusers
Safetensors
English
Russian
LensPipeline
LensPipeline
sdnq
quantized
uint4
static-quantization
ablation
Instructions to use WaveCut/Lens-Turbo-SDNQ-uint4-static with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use WaveCut/Lens-Turbo-SDNQ-uint4-static with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("WaveCut/Lens-Turbo-SDNQ-uint4-static", 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
- Draw Things
- DiffusionBee
| { | |
| "source_model": "microsoft/Lens-Turbo", | |
| "method": "SDNQ uint4 static", | |
| "scope": "transformer only, excluding modulation linears", | |
| "ablation_fix": "Transformer block img_mod and txt_mod linears are left in bfloat16 because UINT4 quantization caused periodic grid artifacts and severe text degradation.", | |
| "config": { | |
| "weights_dtype": "uint4", | |
| "quantized_matmul_dtype": "int8", | |
| "group_size": 0, | |
| "use_static_quantization": true, | |
| "use_dynamic_quantization": false, | |
| "use_quantized_matmul": true, | |
| "use_svd": false, | |
| "use_hadamard": false, | |
| "quant_conv": false, | |
| "quant_embedding": false, | |
| "dequantize_fp32": false, | |
| "modules_to_not_convert": [ | |
| "*.img_mod.*", | |
| "*.txt_mod.*" | |
| ], | |
| "modules_to_not_use_matmul": [], | |
| "quantization_device": "cuda", | |
| "return_device": "cuda" | |
| } | |
| } |