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

Duplicated from  nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap

ameno-tech
/
Flux.2-Klein-9B-SmartCharacterSwap

Image-to-Image
Diffusers
English
lora
flux
flux.2
flux.2-klein
character-swap
face-swap
occlusion-handling
photorealistic
Model card Files Files and versions
xet
Community

Instructions to use ameno-tech/Flux.2-Klein-9B-SmartCharacterSwap with libraries, inference providers, notebooks, and local apps. Follow these links to get started.

  • Libraries
  • Diffusers

    How to use ameno-tech/Flux.2-Klein-9B-SmartCharacterSwap 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-9B", dtype=torch.bfloat16, device_map="cuda")
    pipe.load_lora_weights("ameno-tech/Flux.2-Klein-9B-SmartCharacterSwap")
    
    prompt = "jhuangswap, masterpiece, high-end photography, realistic portrait, matching target lighting, highly detailed skin texture, 8k resolution"
    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
  • Local Apps Settings
  • Draw Things
Flux.2-Klein-9B-SmartCharacterSwap / example
4.99 MB
Ctrl+K
Ctrl+K
  • 2 contributors
History: 1 commit
jphn8211's picture
jphn8211
Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap
33a2e09 3 days ago
  • A1.jpg
    19.6 kB
    Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap 3 days ago
  • A2.jpg
    57.4 kB
    Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap 3 days ago
  • A3.jpg
    2.1 MB
    xet
    Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap 3 days ago
  • B1.jpg
    73.7 kB
    Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap 3 days ago
  • B2.jpg
    84.3 kB
    Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap 3 days ago
  • B3.jpg
    1.82 MB
    xet
    Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap 3 days ago
  • example.png
    0 Bytes
    Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap 3 days ago
  • screenshot.jpg
    833 kB
    xet
    Duplicate from nhathoangfoto/Flux.2-Klein-9B-SmartCharacterSwap 3 days ago