Image-to-Image
Diffusers
Safetensors
Diffusion Single File
English
image-generation
image-editing
flux
Instructions to use black-forest-labs/FLUX.2-dev with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use black-forest-labs/FLUX.2-dev 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-dev", 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-dev 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
Which files to Download for ComfyUi?
#25
by esajad - opened
Hi, There are too many files.
I am using RTX 5090 with 64GB Ram.
Which files should I use? ComfyUi doesn't have text_encoder and transformer folder Under models. Should I create those folders?
No, don't download
Download from https://huggingface.co/Comfy-Org/flux2-dev or https://huggingface.co/gguf-org/flux2-dev-gguf
Is there a smaller safetensor? https://huggingface.co/Comfy-Org/flux2-dev/tree/main/split_files/diffusion_models 35.5GB can not run in a RTX5090