Instructions to use leafmoone/RUM-FLUX.2-klein-4B-ConvRot-Quantized with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use leafmoone/RUM-FLUX.2-klein-4B-ConvRot-Quantized with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline from diffusers.utils import load_image # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("leafmoone/RUM-FLUX.2-klein-4B-ConvRot-Quantized", torch_dtype=torch.bfloat16, device_map="cuda") prompt = "Turn this cat into a dog" input_image = load_image("https://huggingface.co/datasets/huggingface/documentation-images/resolve/main/diffusers/cat.png") image = pipe(image=input_image, prompt=prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Add concise model card
Browse files
README.md
ADDED
|
@@ -0,0 +1,27 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
---
|
| 2 |
+
license: other
|
| 3 |
+
pipeline_tag: image-to-image
|
| 4 |
+
tags:
|
| 5 |
+
- flux
|
| 6 |
+
- quantization
|
| 7 |
+
- convrot
|
| 8 |
+
- int8
|
| 9 |
+
- int4
|
| 10 |
+
---
|
| 11 |
+
|
| 12 |
+
# RUM FLUX.2 Klein 4B ConvRot Quantized
|
| 13 |
+
|
| 14 |
+
Post-training ConvRot quantizations of [RUM-FLUX.2-klein-4B-preview](https://huggingface.co/rimochan/RUM-FLUX.2-klein-4B-preview), based on [FLUX.2-klein-base-4B](https://huggingface.co/black-forest-labs/FLUX.2-klein-base-4B). The repository provides a quality-first INT8 model and a smaller hybrid INT4 model. RUM's dual text-conditioning projections and sensitive input, output, normalization, and modulation layers remain in BF16.
|
| 15 |
+
|
| 16 |
+
## Files
|
| 17 |
+
|
| 18 |
+
- `rum-flux2-int8-convrot-adaround-realcal-hq.safetensors`: INT8 ConvRot + AdaRound with real-activation calibration.
|
| 19 |
+
- `rum-flux2-int4-hybrid-convrot-adaround-realcal-hq.safetensors`: hybrid INT4 ConvRot + AdaRound with real-activation calibration; incompatible or quality-sensitive layers remain BF16.
|
| 20 |
+
- `standalone_inference.py`: self-contained RUM architecture and quantized runtime entry point for text-to-image and image editing.
|
| 21 |
+
|
| 22 |
+
Download the FLUX.2 Klein 4B base model and the SDXL/WAI teacher checkpoint separately, then pass their local paths to `standalone_inference.py`. Run `python standalone_inference.py --help` for all options. The recommended defaults are 20 steps for text-to-image and 10 steps for editing.
|
| 23 |
+
|
| 24 |
+
## Comparison
|
| 25 |
+
|
| 26 |
+

|
| 27 |
+
|