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
Issues with remote_text_encoder
I checked this API quantized version- https://huggingface.co/black-forest-labs/FLUX.2-dev
I am getting this error,
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 503 Server Error: Service Unavailable for url: /static-proxy?url=https%3A%2F%2Fremote-text-encoder-flux-2.huggingface.co%2Fpredict%3C%2Fa%3E%3C%2Fp%3E
when I try to open this link in browser - /static-proxy?url=https%3A%2F%2Fremote-text-encoder-flux-2.huggingface.co%2Fpredict%3C%2Fa%3E%2C it gives: The space is paused, ask a maintainer to restart it Please let me know any alternative solution for this to run remote text encoder!
Hi, I want to add that this is also happening for me, is there a solution to this yet?
same question
same issue, any solve?
+1
I want to use this model on 8 gb VRAM by trying example from here: https://huggingface.co/blog/flux-2
But it didn't work because of remote encoder issues... Fix pls
same question
Same question +1
You can use this model and better than it:
fal/FLUX.2-dev-Turbo