Image-to-Image
Diffusers
Safetensors
Transformers
GGUF
English
Flux2Pipeline
image-generation
image-editing
text-to-image
flux2
flux
quantization
hqq
optimization
quantized
2bit
8-bit precision
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", 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] - 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", device_map="auto")# Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("AlekseyCalvin/FLUX2_dev_2bit_hqq", dtype="auto", device_map="auto") - Notebooks
- Google Colab
- Kaggle
Upload tokenizer/processor_config.json with huggingface_hub
Browse files
tokenizer/processor_config.json
ADDED
|
@@ -0,0 +1,8 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"image_break_token": "[IMG_BREAK]",
|
| 3 |
+
"image_end_token": "[IMG_END]",
|
| 4 |
+
"image_token": "[IMG]",
|
| 5 |
+
"patch_size": 14,
|
| 6 |
+
"processor_class": "PixtralProcessor",
|
| 7 |
+
"spatial_merge_size": 2
|
| 8 |
+
}
|