Instructions to use fal/FLUX.2-Tiny-AutoEncoder with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Diffusers
How to use fal/FLUX.2-Tiny-AutoEncoder with Diffusers:
pip install -U diffusers transformers accelerate
import torch from diffusers import DiffusionPipeline # switch to "mps" for apple devices pipe = DiffusionPipeline.from_pretrained("fal/FLUX.2-Tiny-AutoEncoder", dtype=torch.bfloat16, device_map="cuda") prompt = "Astronaut in a jungle, cold color palette, muted colors, detailed, 8k" image = pipe(prompt).images[0] - Notebooks
- Google Colab
- Kaggle
Add Diffusers AutoModel support
#1
by dn6 HF Staff - opened
Allows the model to be loaded directly with Diffusers using AutoModel
from diffusers import AutoModel
tiny_vae = AutoModel.from_pretrained(
"fal/FLUX.2-Tiny-AutoEncoder",
trust_remote_code=True,
torch_dtype=torch.bfloat16
).to(device)
@dn6 would it be possible to natively integrate this with diffusers, like https://huggingface.co/docs/diffusers/api/models/autoencoder_tiny?
@isidentical we certainly can integrate natively, but I don't think we can get it done in time for this next release (can add to main shortly after though). Would it be possible to merge this change for now and I can update it once the native integration is available?
benjamin-paine changed pull request status to merged