How to use from the
Use from the
Diffusers library
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("SamuelTallet/FLUX.2-klein-4B-SDNQ-8bit-dynamic-hadamard256", 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]

This is FLUX.2 [klein] 4B optimized using SDNQ with INT8 dynamic quantization and Hadamard Rotation (Group size: 256).

Sample

Prompt:

A cat holding a sign that says hello world

Seed: 922520

Usage

Install Torch, Diffusers (Git), SDNQ 0.2.0 and Triton.

Use CFG 1 and 4 steps.

Downloads last month
-
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for SamuelTallet/FLUX.2-klein-4B-SDNQ-8bit-dynamic-hadamard256

Quantized
(25)
this model