Release 0.13.0
MFLUX v.0.13.0 Release Notes
🎨 New Model Support
- Z-Image Turbo Support: Added support for Z-Image Turbo, a fast distilled Z-Image variant optimized for speed
- New command:
mflux-generate-z-image-turbofor rapid image generation (with LoRA support, img2img, and quantization)
✨ New Features
-
FIBO VLM Quantization Support: The FIBO VLM commands (
mflux-fibo-inspire,mflux-fibo-refine) now support quantization via the-qflag (3, 4, 5, 6, or 8-bit) -
Unified
--modelargument: The--modelflag now accepts local paths, HuggingFace repos, or predefined model names- Local paths:
--model /Users/me/models/fibo-4bitor--model ~/my-model - HuggingFace repos:
--model briaai/Fibo-mlx-4bit - Predefined names:
--model dev,--model schnell,--model fibo - This mirrors how LoRA paths work for a consistent UX
- Local paths:
-
Scale Factor Dimensions for Img2Img: Generalized the scale factor feature (e.g.,
2x,0.5x,auto) from upscaling to all img2img commands- Specify output dimensions relative to input image:
--width 2x --height 2x - Use
autoto match input image dimensions:--width auto --height auto - Mix scale factors with absolute values:
--width 2x --height 512 - Supported in:
mflux-generate,mflux-generate-z-image-turbo,mflux-generate-fibo,mflux-generate-kontext,mflux-generate-qwen
- Specify output dimensions relative to input image:
-
DimensionResolver utility: New
DimensionResolver.resolve()for consistent dimension handling across commands
🔧 Architecture Improvements
- Unified Resolution System: New
resolution/module for consistent parameter resolution across all modelsPathResolution: Resolves model paths from local paths, HuggingFace repos, or predefined namesLoRAResolution: Handles LoRA path resolution from all supported formatsConfigResolution: Centralizes configuration resolution logicQuantizationResolution: Determines quantization from saved models or CLI args
- Unified Weight Loading System: Complete rewrite of weight handling with declarative mappings
- New
WeightLoaderwith singleload(model_path)interface WeightDefinitionclasses define model structure per model familyWeightMappingdeclarative mappings replace imperative weight handlers- Removed all per-model
weight_handler_*.pyfiles in favor of unified system
- New
- Unified Tokenizer System: New common tokenizer module
TokenizerLoader.load_all()with unifiedmodel_pathinterface- Removed model-specific tokenizer handlers (
clip_tokenizer.py,t5_tokenizer.py, etc.)
- Unified LoRA API: Simplified LoRA loading to a single
lora_pathsparameter- All LoRA formats now resolved through
LoRALibrary.resolve_paths():- Local paths:
/path/to/lora.safetensors - Registry names:
my-lora(fromLORA_LIBRARY_PATH) - HuggingFace repos:
author/model - New: HuggingFace collections:
repo_id:filename.safetensors
- Local paths:
- Simplified model initialization: just pass
lora_pathsand everything resolves automatically
- All LoRA formats now resolved through
- Unified Latent Creator Interface: Standardized
unpack_latents(latents, height, width)signature across all model familiesFluxLatentCreator,ZImageLatentCreator,FiboLatentCreator, andQwenLatentCreatornow share the same interface- Moved
FIBO._unpack_latentstoFiboLatentCreator.unpack_latentsfor consistency
- StepwiseHandler Refactor: Fixed
StepwiseHandlerto work with all model types by accepting alatent_creatorparameter- Previously hardcoded to
FluxLatentCreator, now model-agnostic - Each command passes its appropriate latent creator to
CallbackManager.register_callbacks()
- Previously hardcoded to
- CLI Reorganization: Moved CLI entry points to model-specific directories (e.g.,
mflux/models/flux/cli/)
🔄 Breaking Changes
- Simplified
generate_image()API (programmatic users only):- Removed
Configclass - parameters are now passed directly togenerate_image() - Removed
RuntimeConfigclass - internal complexity eliminated - Added
Flux1export to mainmfluxmodule for cleaner imports
- Removed
- LoRA API simplified (programmatic users only):
- Removed
lora_namesandlora_repo_idparameters from all model classes (Flux1,QwenImage,QwenImageEdit, etc.) - Removed
--lora-nameand--lora-repo-idCLI arguments - Removed
LoRAHuggingFaceDownloaderclass
- Removed
🔄 Breaking Changes (CLI)
--pathflag removed: The deprecated--pathflag for loading models has been removed. Use--modelinstead for local paths, HuggingFace repos, or predefined model names.
📦 Dependency Updates
- Updated
huggingface-hubfrom>=0.24.5,<1.0to>=1.1.6,<2.0- v1.1.6 includes fix for incomplete file listing in
snapshot_downloadwhich could cause cache corruption - Removed explicit
accelerateandfilelockdependencies (pulled in as transitive dependencies)
- v1.1.6 includes fix for incomplete file listing in
- Updated
transformersfrom>=4.57,<5.0to>=5.0.0rc0,<6.0- Required for
huggingface-hub1.x compatibility - Added workaround for
Qwen2Tokenizerbug in transformers 5.0.0rc0 where vocab/merges files are not loaded correctly viafrom_pretrained()
- Required for
🐛 Bug Fixes
-
Qwen empty negative prompt crash: Fixed crash when running Qwen models without a
--negative-promptargument. Empty prompts now use a space as fallback to ensure valid tokenization. -
--modelflag not working: Fixed bug where the--modelargument wasn't being used for loading models from HuggingFace or local paths. All CLI commands now correctly use--modelfor model path resolution. -
Model Saving Index File: Fixed issue where locally saved models (via
mflux-save) would fail to load when uploaded to HuggingFace, due to missingmodel.safetensors.index.json. The model saver now generates this index file alongside the safetensor shards, ensuring compatibility with both mflux and standard HuggingFace loading paths. (see #285)
🧪 Test Infrastructure
- Test markers: Added
fastandslowpytest markers to categorize tests- Fast tests: Unit tests that don't generate images (parsers, schedulers, resolution, utilities)
- Slow tests: Integration tests that generate actual images and compare to references
- New Makefile targets:
make test-fast- Run fast tests only (quick feedback during development)make test-slow- Run slow tests only (image generation tests)make test- Run all tests (unchanged)
- Run specific test categories:
pytest -m fastorpytest -m slow - GitHub Actions CI: Fast tests now run automatically on PRs and pushes to main
🔧 Internal Changes
- Simplified
WeightLoader.load()to take a singlemodel_pathparameter instead of separaterepo_idandlocal_path - Simplified
TokenizerLoader.load_all()with the same unifiedmodel_pathinterface - Renamed
local_pathparameter tomodel_pathin all model constructors for clarity - Removed
quantization_util.py- quantization now handled throughQuantizationResolution - Removed
lora_huggingface_downloader.py- downloading integrated intoLoRAResolution - Added comprehensive test coverage for resolution modules
👩💻 Contributors
- Filip Strand (@filipstrand): Z-Image Turbo support, architecture improvements, core development