github mflux-community/mflux v0.6.0
Release v.0.6.0

latest releases: v.0.19.1, v.0.19.0, v.0.18.1...
18 months ago

MFLUX v.0.6.0 Release Notes

Major New Features

🌐 Third-Party HuggingFace Model Support

  • Comprehensive ModelConfig refactor to support compatible HuggingFace dev/schnell models
  • Added ability to use models like Freepik/flux.1-lite-8B-alpha and shuttleai/shuttle-3-diffusion
  • New --base-model parameter to specify which base architecture (dev or schnell) a third-party model is derived from
  • Maintains backward compatibility while opening up the ecosystem to community-created models

🎭 In-Context LoRA

  • Added support for In-Context LoRA, a powerful technique that allows you to generate images in a specific style based on a reference image without requiring model fine-tuning
  • Introduced a new command-line tool: mflux-generate-in-context
  • Includes 10 pre-defined styles from the Hugging Face ali-vilab/In-Context-LoRA repository
  • Detailed documentation on how to use this feature effectively with prompting tips and best practices

πŸ”Œ Automatic LoRA Downloads

  • Added ability to automatically download LoRAs from Hugging Face when specified by repository ID
  • Simplifies workflow by eliminating the need to manually download LoRA files before use

🧠 Memory Optimizations

  • Added --low-ram option to reduce GPU memory usage by constraining the MLX cache size and releasing text encoders and transformer components after use
  • Implemented memory saver for ControlNet to reduce RAM requirements
  • General memory usage optimizations throughout the codebase

πŸ—œοΈ Enhanced Quantization Options

  • Added support for 3-bit and 6-bit quantization (requires mlx > v0.21.0)
  • Expanded quantization options now include 3, 4, 6, and 8-bit precision

⚠️Breaking changes

Previously saved quantized models will not work for v.0.6.0 and later. See #149 for more details.

Interface Improvements

πŸ”§ Modified Parameters

  • The previous --init-image-path parameter is now --image-path
  • The previous --init-image-strength parameter is now --image-strength

πŸ–ΌοΈ Image Generation Enhancements

  • Added --auto-seeds option to generate multiple images with random seeds in a single command
  • Added option to override previously saved test images
  • Added --controlnet-save-canny option to save the Canny edge detection reference image used by ControlNet
  • Improved handling of edge cases for img2img generation

πŸ”„ Callback System

  • Implemented a general callback mechanism for more flexible image generation pipelines
  • Added support for before-loop callbacks to accept latents
  • Enhanced StepwiseHandler to include initial latent

Architecture Improvements

πŸ—οΈ Code Refactoring

  • Removed 'init' prefix for a more general interface
  • Removed ConfigControlnet - the controlnet_strength attribute is now on Config
  • Simplified quantization by removing unnecessary class predicates
  • Refactored model configuration system
  • Refactored transformer blocks for better maintainability
  • Unified attention mechanism in single and joint attention blocks
  • Added support for variable numbers of transformer blocks
  • Optimized with fast SDPA (Scaled Dot-Product Attention)
  • Added PromptCache for small optimization when generating with repeated prompts

🧰 Developer Tools

  • Added Batch Image Renamer tool as an isolated uv run script
  • Added descriptive comments for attention computations

Compatibility Updates

  • Updated to support the latest mlx version
  • Fixed compatibility issues with HuggingFace dev/schnell models

Bug Fixes

  • Fixed handling of edge cases for img2img generation
  • Various small fixes and improvements throughout the codebase

Contributors

Don't miss a new mflux release

NewReleases is sending notifications on new releases.