Instructions to use toxicdog/Lens-Turbo-INT4-ConvRot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use toxicdog/Lens-Turbo-INT4-ConvRot with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("toxicdog/Lens-Turbo-INT4-ConvRot", 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
File size: 2,071 Bytes
8688da6 8e8a03a 8688da6 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 | ---
license: mit
library_name: diffusers
pipeline_tag: text-to-image
base_model:
- microsoft/Lens-Turbo
tags:
- comfyui
- image-generation
- lens
- int4
- convrot
- quantized
---
# Microsoft Lens Turbo INT4 ConvRot
Repackaged model files for ComfyUI and others, with INT4 ConvRot converted for
testing in Radiant Canvas for fast macOS inference:
[Radiant Canvas on the App Store](https://apps.apple.com/us/app/radiant-canvas-ai-image-gen/id6802973075).
The original model was published as `microsoft/Lens-Turbo`. The original
Microsoft Hugging Face repository is currently unavailable through the Hub
API. The preserved ComfyUI single-file BF16 transformer used for this
conversion came from
[Comfy-Org/Lens](https://huggingface.co/Comfy-Org/Lens).
## File
- `lens-turbo-int4_convrot.safetensors`: the diffusion transformer in
ComfyUI's native ConvRot W4A4 format.
For ComfyUI, place the file in:
```text
ComfyUI/models/diffusion_models/
```
Use a recent ComfyUI build with Lens and native INT4 ConvRot support. The
GPT-OSS text encoder and FLUX.2 VAE are not included here. Get compatible
versions of those components from the Comfy-Org repack.
## Conversion details
- Comfy-Org repack revision: `393618fd7db3e370509f84390b9162b8fd839a25`
- Converter revision: `b477b06ecc3afe8c3896a6cef02f5b1b8a550a0b`
- Source format: BF16 single-file transformer, 1,264 tensors
- Quantized layers: 288 image-side attention and MLP weights
- ConvRot group size: 256
- Quantization group size: 64
- Output size: 6,003,704,896 bytes
- SHA-256: `1a13bea9febbed68b3d6205295b3eeaf09a87b1fda1f212ecae7d8b11655dcd0`
All text-side matrices are kept in BF16. This follows the Lens conversion
profile and avoids a known empty-prompt failure. Sensitive input, output,
modulation, normalization, and bias tensors are also kept in BF16.
This is a test conversion. Check output quality for your own prompts and
workflows before relying on it.
## License
The original Lens project and weights are released under the MIT License. A
copy of the license is included in this repository.
|