Image-to-Image
Diffusers
Safetensors
Transformers
GGUF
English
Flux2Pipeline
image-generation
image-editing
text-to-image
flux2
flux
quantization
hqq
optimization
quantized
2bit
Instructions to use AlekseyCalvin/FLUX2_dev_2bit_hqq with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use AlekseyCalvin/FLUX2_dev_2bit_hqq 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("AlekseyCalvin/FLUX2_dev_2bit_hqq", 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] - Transformers
How to use AlekseyCalvin/FLUX2_dev_2bit_hqq with Transformers:
# Use a pipeline as a high-level helper from transformers import pipeline pipe = pipeline("image-to-image", model="AlekseyCalvin/FLUX2_dev_2bit_hqq")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AlekseyCalvin/FLUX2_dev_2bit_hqq", dtype="auto") - Notebooks
- Google Colab
- Kaggle
| { | |
| "crop_size": null, | |
| "data_format": "channels_first", | |
| "default_to_square": true, | |
| "device": null, | |
| "disable_grouping": null, | |
| "do_center_crop": null, | |
| "do_convert_rgb": true, | |
| "do_normalize": true, | |
| "do_pad": null, | |
| "do_rescale": true, | |
| "do_resize": true, | |
| "image_mean": [ | |
| 0.48145466, | |
| 0.4578275, | |
| 0.40821073 | |
| ], | |
| "image_processor_type": "PixtralImageProcessorFast", | |
| "image_std": [ | |
| 0.26862954, | |
| 0.26130258, | |
| 0.27577711 | |
| ], | |
| "input_data_format": null, | |
| "pad_size": null, | |
| "patch_size": 14, | |
| "processor_class": "PixtralProcessor", | |
| "resample": 3, | |
| "rescale_factor": 0.00392156862745098, | |
| "return_tensors": null, | |
| "size": { | |
| "longest_edge": 1540 | |
| } | |
| } | |