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
This is fantastic! But, can it use FLUX.1-dev's lora?
Furthermore, unlike VLM, image generation models don't have benchmarks, making it difficult to see improvements mathematically. Its functionality seems similar to Qwen-Image-Edit? I don't quite understand the concept of "combining image generation and editing functions into one."
However, are its hardware requirements lower than Qwen-Image-Edit? Since FLUX.1-Kontent-dev has much lower hardware requirements than Qwen-Image-Edit, I estimate that FLUX.2-dev's hardware requirements aren't very high either?
Compared to Qwen-Image-Edit, which requires 40GB of RAM to run, 32GB is more attractive, and if it can be run on 16GB (consumer-grade graphics cards) after optimization, that would be even better.
I discovered it has a 64GB model file and also includes an LLM chat template.
Therefore, I deduced that it's significantly larger than Qwen-Image-Edit.
If that's the case, it doesn't seem very competitive.
Because it's so large.
can it use FLUX.1-dev's lora?
No, it's a new model made from scratch
Simply, no it problably cannot, unless u find a way to reformat the lora. This is problably because the model architecture changed, and now requires its own pipeline. However, if you know what data previous loras were made with, maybe you can try to make a copy of the lora? ¯_(ツ)_/¯
Simply, no it problably cannot, unless u find a way to reformat the lora. This is problably because the model architecture changed, and now requires its own pipeline. However, if you know what data previous loras were made with, maybe you can try to make a copy of the lora? ¯_(ツ)_/¯
Forget it, I'll look for another way.