Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing

  • Log In
  • Sign Up

black-forest-labs
/
FLUX.2-klein-base-4B

Image-to-Image
Diffusers
Safetensors
Diffusion Single File
English
Flux2KleinPipeline
text-to-image
image-editing
flux
Model card Files Files and versions
xet
Community
3

Instructions to use black-forest-labs/FLUX.2-klein-base-4B with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Diffusers

    How to use black-forest-labs/FLUX.2-klein-base-4B 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("black-forest-labs/FLUX.2-klein-base-4B", 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]
  • Diffusion Single File

    How to use black-forest-labs/FLUX.2-klein-base-4B with Diffusion Single File:

    # No code snippets available yet for this library.
    
    # To use this model, check the repository files and the library's documentation.
    
    # Want to help? PRs adding snippets are welcome at:
    # https://github.com/huggingface/huggingface.js
  • Inference
  • Notebooks
  • Google Colab
  • Kaggle
FLUX.2-klein-base-4B
23.7 GB
Ctrl+K
Ctrl+K
  • 4 contributors
History: 3 commits
huemin's picture
huemin
Update README.md
a3b4f48 verified 2 months ago
  • scheduler
    add diffusers weights (#2) 4 months ago
  • text_encoder
    add diffusers weights (#2) 4 months ago
  • tokenizer
    add diffusers weights (#2) 4 months ago
  • transformer
    add diffusers weights (#2) 4 months ago
  • vae
    add diffusers weights (#2) 4 months ago
  • .gitattributes
    1.58 kB
    add diffusers weights (#2) 4 months ago
  • LICENSE.md
    9.58 kB
    Release 4 months ago
  • README.md
    10.1 kB
    Update README.md 2 months ago
  • editing.jpg
    2.51 MB
    xet
    Release 4 months ago
  • flux-2-klein-base-4b.safetensors
    7.75 GB
    xet
    Release 4 months ago
  • model_index.json
    422 Bytes
    add diffusers weights (#2) 4 months ago
  • others.jpg
    3.39 MB
    xet
    Release 4 months ago
  • realism.jpg
    2.86 MB
    xet
    Release 4 months ago