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
Update README.md
Browse files22 unmodified lines232425262728293031323334353637383940414243444522 unmodified lines| https://www.pexels.com/photo/brown-hummingbird-selective-focus-photography-1133957/ |  || https://www.pexels.com/photo/person-with-body-painting-1209843/ |  |# Usage```pyimport torchimport torchvision.transformers.functional as Ffrom PIL import Imagefrom flux2_tiny_autoencoder import Flux2TinyAutoEncodertiny_vae = Flux2TinyAutoEncoder.from_pretrained("fal/FLUX.2-Tiny-AutoEncoder")tiny_vae.eval()pil_image = Image.open("/path/to/your/image.png")with torch.inference_mode():latents = tiny_vae.encode(F.to_tensor(pil_image))recon = tiny_vae.decode(latents)recon_image = F.to_pil_image(recon)recon_image.save("reconstituted.png")22 unmodified lines232425262728293031323334353637383940414243444546474849505122 unmodified lines| https://www.pexels.com/photo/brown-hummingbird-selective-focus-photography-1133957/ |  || https://www.pexels.com/photo/person-with-body-painting-1209843/ |  |# Example Usage```pyimport torchimport torchvision.transforms.functional as Ffrom PIL import Imagefrom flux2_tiny_autoencoder import Flux2TinyAutoEncodertiny_vae = Flux2TinyAutoEncoder.from_pretrained("fal/FLUX.2-Tiny-AutoEncoder",device="cuda")tiny_vae.eval()pil_image = Image.open("/path/to/image.png")image_tensor = F.to_tensor(pil_image)image_tensor = image_tensor.unsqueeze(0) * 2.0 - 1.0with torch.inference_mode():latents = tiny_vae.encode(image_tensor, return_dict=False)recon = tiny_vae.decode(latents, return_dict=False)recon = recon.squeeze(0).clamp(-1, 1) / 2.0 + 0.5recon_image = F.to_pil_image(recon)recon_image.save("reconstituted.png")
README.md+12-6