import torch
from diffusers import DiffusionPipeline
from diffusers.utils import load_image
# switch to "mps" for apple devices
pipe = DiffusionPipeline.from_pretrained("deAPI-ai/flux-2-klein-4b-bf16", 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]FLUX.2 Klein 4B BF16
A distilled 4B parameter image generation model optimized for speed, delivering state-of-the-art quality with end-to-end inference in under a second.
Author
License
Apache License 2.0
Hosted by deAPI-ai for use with GamerHash AI
- Downloads last month
- 70