Diffusers welcomes FLUX-2
FLUX.2 from Black Forest Labs is a new image generation and editing model, not a drop-in replacement for Flux.1. It uses a single Mistral Small 3.1 text encoder that stacks intermediate-layer outputs, bias-free DiT layers, shared AdaLayerNorm-Zero modulation, and fully parallel single-stream blocks with SwiGLU MLPs, shifting to 8 double-stream and 48 single-stream blocks in the 32B model. Running it unmodified needs over 80GB of VRAM. Diffusers code covers CPU offload (~62GB), Flash Attention 3, NF4 4-bit quantization (~20GB), a remote text encoder (18GB), group offloading (8GB VRAM), multi-image references, structured JSON prompting and LoRA fine-tuning.
Related posts
- Welcome FLUX.3 Image Klein in Diffusers
Hugging Face mediumAdeptFLUX.3 Image Klein from Black Forest Labs is supported in Diffusers from launch. It is a single model for text-to-image, multi-reference image-to-image, and bounding-box layout control, where regions are written as JSON with normalized 0–1000 boxes to place new content or move content from a reference image. The distilled checkpoint renders 1024×1024 in about 1.9 s on an H100 in 16 steps without CFG. Reference images roughly double the time because each adds 4,096 tokens to the transformer sequence. The post also covers FP8 and NVFP4 single-file variants that cut peak memory to about 15–16 GiB, DreamBooth LoRA training scripts, the VAE tokenization (one token per 16×16 patch), and Modular Diffusers pipeline usage.
- State of open video generation models in Diffusers
Hugging Face mediumAdeptOpen video generation models such as HunyuanVideo, CogVideoX, LTX-Video, Mochi-1 and Allegro share a common architecture: T5-style text encoders, a DiT-based denoiser over 3D spatio-temporal tokens, a spatially and temporally compressing VAE, and a scheduler. Diffusers runs them in a few lines of code but they need a lot of memory, about 60 GB for HunyuanVideo at default settings. Benchmarks combining bitsandbytes/FP8 quantization, CPU and group offloading, VAE tiling and layerwise casting bring HunyuanVideo down to about 6.6 GB with little extra latency. Timestep and guidance distillation speed up generation, and the finetrainers repo supports LoRA fine-tuning.
- Run FLUX.1-dev three times faster
Modal mediumAdept
FLUX.1-dev image generation on Modal drops from ~6.75s to under three seconds per 1024x1024 image. About 1.5x comes from standard optimizations: torch.compile with max-autotune, fused QKV projections and channels-last memory layout. Another 2x comes from First Block Caching (via ParaAttention, based on TEACache), which skips denoising steps whose early-block residual change falls below a threshold. A threshold of 0.12 gave a good quality/speed tradeoff. The tens of minutes of compile time added to cold starts were cut roughly 30x by persisting Inductor, Triton and CUDA caches on a volume and using Modal memory snapshots.
- (LoRA) Fine-Tuning FLUX.1-dev on Consumer Hardware
Hugging Face hardMasterFLUX.1-dev can be LoRA fine-tuned on a single consumer GPU by combining QLoRA (4-bit NF4 base transformer via bitsandbytes), 8-bit AdamW, gradient checkpointing, cached VAE latents and precomputed CLIP/T5 text embeddings, so that only the quantized transformer plus adapters sit in GPU memory. On an RTX 4090, a rank-4 LoRA at 512x768 peaked around 9 GB VRAM, compared with 26 GB for BF16 LoRA and an estimated ~120 GB for full fine-tuning, and 700 steps took about 41 minutes to learn Alphonse Mucha's style. The guide includes the diffusers training script settings, an embedding precompute script, FP8 training with torchao for faster runs on compatible hardware, and options for loading or merging the trained adapters at inference.
- Diffusers welcomes Stable Diffusion 3.5 Large
Hugging Face mediumAdeptStable Diffusion 3.5 Large (8B) and a timestep-distilled Turbo variant are now usable in Diffusers. The architecture matches SD3 Medium except for QK normalization and dual attention layers in the MMDiT blocks. Code covers bf16 inference, few-step (4-8 step) Turbo generation without classifier-free guidance, NF4 quantization via bitsandbytes with CPU offload for consumer GPUs, and single-file checkpoint loading. LoRA fine-tuning on 24GB GPUs works with the existing SD3 DreamBooth script, combined with peft's k-bit training preparation.