v0.4.0: Critical Image Normalization Fix
·
12 commits
to main
since this release
Immutable
release. Only release title and notes can be modified.
[0.4.0] - 2025-12-17
Fixed
- CRITICAL: Image Color and Contrast Bug
- Fixed incorrect image saving in
visualization.pythat caused severe contrast issues - Expander outputs images in
[-1, 1]range, butsave_image()was treating them as[0, 1] - This caused negative pixel values to be clamped to black, crushing 50% of the dynamic range
- Added
normalize=Trueandvalue_range=(-1, 1)to allsave_image()calls - Affected functions:
safe_vae_sample(),save_sample_images() - Impact: All training sample images and generated images now have correct colors and contrast
- Files:
src/fluxflow/utils/visualization.py - Note: fluxflow-ui and fluxflow-comfyui were not affected (they handle conversion manually)
- Fixed incorrect image saving in
Added
-
Model Versioning System
- Explicit model version metadata stored alongside checkpoints
- Automatic version detection and routing to appropriate loaders
- Backward compatibility with legacy checkpoints (auto-detection)
- Forward compatibility detection (clear errors for newer models)
- Semantic versioning support (MAJOR.MINOR.PATCH)
- Architecture metadata eliminates config inference
- Checksum validation for integrity verification
- Files:
src/fluxflow/models/versioning.py,docs/VERSIONING.md,docs/MIGRATION.md - Migration tool:
scripts/migrate_checkpoints.pyfor upgrading legacy checkpoints - API Changes:
FluxPipeline.from_pretrained()gainsuse_versioningparameter (opt-in, default: False)FluxFlowPipeline.from_pretrained()gainsuse_versioningparameter (opt-in, default: False)save_model()gainssave_metadata,model_version, andtraining_infoparameters- New functions:
load_versioned_checkpoint(),save_versioned_checkpoint()
- Testing: Comprehensive unit tests in
tests/unit/test_versioning.py
-
CFG Support in Sample Generation
- Added
use_cfgandguidance_scaleparameters tosave_sample_images()function - New
_generate_with_cfg()helper function for CFG-guided sample generation - Enables classifier-free guidance during training sample generation
- Default guidance scale: 5.0 (balanced quality/creativity)
- Compatible with models trained with
cfg_dropout_prob > 0 - Files:
src/fluxflow/utils/visualization.py
- Added