Hugging Face's logo Hugging Face
  • Models
  • Datasets
  • Spaces
  • Buckets new
  • Docs
  • Enterprise
  • Pricing
    • Website
      • Tasks
      • HuggingChat
      • Collections
      • Languages
      • Organizations
    • Community
      • Blog
      • Posts
      • Daily Papers
      • Learn
      • Discord
      • Forum
      • GitHub
    • Solutions
      • Team & Enterprise
      • Hugging Face PRO
      • Enterprise Support
      • Inference Providers
      • Inference Endpoints
      • Storage Buckets

  • Log In
  • Sign Up

camenduru
/
FLUX.1_Kontext-Lightning

Image-to-Image
Diffusers
Safetensors
FluxKontextPipeline
flux
flux.1
kontext
flux dev
lightning
turbo
Model card Files Files and versions
xet
Community

Instructions to use camenduru/FLUX.1_Kontext-Lightning with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Diffusers

    How to use camenduru/FLUX.1_Kontext-Lightning 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("camenduru/FLUX.1_Kontext-Lightning", 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]
  • Notebooks
  • Google Colab
  • Kaggle
FLUX.1_Kontext-Lightning
33.7 GB
Ctrl+K
Ctrl+K
  • 1 contributor
History: 2 commits
camenduru's picture
camenduru
thanks to LPX55 ❤
c510ad7 verified 10 months ago
  • scheduler
    thanks to LPX55 ❤ 10 months ago
  • text_encoder
    thanks to LPX55 ❤ 10 months ago
  • text_encoder_2
    thanks to LPX55 ❤ 10 months ago
  • tokenizer
    thanks to LPX55 ❤ 10 months ago
  • tokenizer_2
    thanks to LPX55 ❤ 10 months ago
  • transformer
    thanks to LPX55 ❤ 10 months ago
  • vae
    thanks to LPX55 ❤ 10 months ago
  • .gitattributes
    1.52 kB
    initial commit 10 months ago
  • LICENSE.md
    18.6 kB
    thanks to LPX55 ❤ 10 months ago
  • README.md
    1.2 kB
    thanks to LPX55 ❤ 10 months ago
  • model_index.json
    696 Bytes
    thanks to LPX55 ❤ 10 months ago