Instructions to use toxicdog/FLUX.2-klein-4B-INT4-ConvRot with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use toxicdog/FLUX.2-klein-4B-INT4-ConvRot 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("toxicdog/FLUX.2-klein-4B-INT4-ConvRot", 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
FLUX.2 Klein 4B 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.
The original model is black-forest-labs/FLUX.2-klein-4B. This is the distilled 4B checkpoint, not the separate Base model.
File
flux-2-klein-4b-int4_convrot.safetensors: the diffusion transformer in ComfyUI's native ConvRot W4A4 format.
For ComfyUI, place the file in:
ComfyUI/models/diffusion_models/
Use a recent ComfyUI build with FLUX.2 Klein and native INT4 ConvRot support. The text encoder and VAE are not included in this repository. Use the original model files or another compatible ComfyUI package for those components.
Conversion details
- Source revision:
e7b7dc27f91deacad38e78976d1f2b499d76a294 - Converter revision:
b477b06ecc3afe8c3896a6cef02f5b1b8a550a0b - Source format: BF16 single-file transformer, 149 tensors
- Quantized layers: 70 weights
- ConvRot group size: 256
- Quantization group size: 64
- Sensitive input, output, conditioning, modulation, and normalization layers are kept in BF16.
- Output size: 2,517,047,416 bytes
- SHA-256:
b9d977513e37de4c0a347027295702ce7fb2760c8ec7883dae3d6989487788a2
This is a test conversion. Check output quality for your own prompts and workflows before relying on it.
License
The original model is released under the Apache License 2.0. A copy of the license is included in this repository.
- Downloads last month
- 25
Model tree for toxicdog/FLUX.2-klein-4B-INT4-ConvRot
Base model
black-forest-labs/FLUX.2-klein-4B