Run this model with HF Jobs
Run fal/FLUX.2-Tiny-AutoEncoder on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.
Paste one of these prompts into your coding agent:
Fine-tune on my dataset
Use HF Jobs to fine-tune https://huggingface.co/fal/FLUX.2-Tiny-AutoEncoder. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.
Run batch inference
Use HF Jobs to run batch inference with https://huggingface.co/fal/FLUX.2-Tiny-AutoEncoder on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.
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
Files changed (2)
- README.md+19-3
- config.json+3
11 unmodified lines121314151617181920212223242525 unmodified lines5152535411 unmodified lines# AboutTiny AutoEncoder trained on the latent space of [black-forest-labs/FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev)'s autoencoder. Works to convert between latent and image space up to 20x faster and in 28x fewer parameters at the expense of a small amount of quality.Code for this model is available [here](https://huggingface.co/fal/FLUX.2-Tiny-AutoEncoder/blob/main/flux2_tiny_autoencoder.py).# Round-Trip Comparisons| Source | Image || ------ | ----- || https://www.pexels.com/photo/mirror-lying-on-open-book-11495792/ |  || https://www.pexels.com/photo/brown-hummingbird-selective-focus-photography-1133957/ |  || https://www.pexels.com/photo/person-with-body-painting-1209843/ |  |25 unmodified linesrecon_image = F.to_pil_image(recon)recon_image.save("reconstituted.png")```11 unmodified lines121314151617181920212223242525 unmodified lines515253545556575859606162636465666768697011 unmodified lines# AboutTiny AutoEncoder trained on the latent space of [black-forest-labs/FLUX.2-dev](https://huggingface.co/black-forest-labs/FLUX.2-dev)'s autoencoder. Works to convert between latent and image space up to 20x faster and in 28x fewer parameters at the expense of a small amount of quality.Code for this model is available [here](https://huggingface.co/fal/FLUX.2-Tiny-AutoEncoder/blob/main/flux2_tiny_autoencoder.py).# Round-Trip Comparisons| Source | Image || ------ | ----- || https://www.pexels.com/photo/mirror-lying-on-open-book-11495792/ |  || https://www.pexels.com/photo/brown-hummingbird-selective-focus-photography-1133957/ |  || https://www.pexels.com/photo/person-with-body-painting-1209843/ |  |25 unmodified linesrecon_image = F.to_pil_image(recon)recon_image.save("reconstituted.png")```## Use with Diffusers 🧨```pyimport torchfrom diffusers import AutoModel, Flux2Pipelinedevice = torch.device("cuda")tiny_vae = AutoModel.from_pretrained("fal/FLUX.2-Tiny-AutoEncoder", trust_remote_code=True, torch_dtype=torch.bfloat16).to(device)pipe = Flux2Pipeline.from_pretrained("black-forest-labs/FLUX.2-dev", vae=tiny_vae, torch_dtype=torch.bfloat16).to(device)```
123456{"_class_name": "Flux2TinyAutoEncoder","_diffusers_version": "0.35.2","act_fn": "silu","decoder_block_out_channels": [64,123456789{"_class_name": "Flux2TinyAutoEncoder","_diffusers_version": "0.35.2","auto_map": {"AutoModel": "flux2_tiny_autoencoder.Flux2TinyAutoEncoder"},"act_fn": "silu","decoder_block_out_channels": [64,
README.md+19-3
config.json+3