🌟 Summary
v8.4.140 improves training reliability and model-state preservation, led by a fix for grayscale TIFF datasets that could previously crash YOLO26 segmentation training.
📊 Key Changes
-
🖼️ Fixed grayscale TIFF channel handling (PR #26061, @glenn-jocher)
Single-frame grayscale TIFF images now respect the requested color format. This prevents three-channel models from receiving one-channel batches and failing at the first convolution. Existing support for color TIFFs, multipage files, four-channel images, and multispectral stacking is preserved. -
🧪 Expanded regression coverage for TIFF training
The existing multichannel test now also trains, validates, predicts, and exports with grayscale TIFF data. -
🧠 Preserved model state during inference and validation (PR #26062)
Prediction and standalone validation now operate on independent model copies, preventing inference-time fusion, FP16 conversion, or end-to-end configuration changes from permanently modifying the caller’s model. -
🚀 More reliable distributed training (PR #26050)
DDP workers now receive the parent trainer’s prepared model, arguments, and callbacks. In-memory weight changes, custom class names, and application callbacks are therefore retained during multi-GPU training. The release addscloudpickleto support this state transfer. -
🎯 Improved weight loading and provenance (PR #26039)
Loading weights from modules, checkpoint dictionaries, or files now preserves the correct training source and prefers EMA weights when available. Predictor caches are refreshed after model changes, reducing the risk of stale inference behavior. -
🔧 Safer fusion detection and calibration (PR #26045)
Fused pretrained weights now generate a warning when loaded into an unfused model. Fusion detection is more accurate for convolutional, reparameterized, and end-to-end YOLO26 components. Depth calibration also preserves a trainable, saveable model state. -
📦 Safer exports (PR #26052)
Exporting works on an isolated model copy before modifying names or head settings. This keeps the original model unchanged and avoids copying YOLOWorld’s large cached CLIP encoder unnecessarily. -
🧬 Tuning now uses the caller’s loaded model (PR #26053)
Model.tune()preserves weights that were loaded or modified in memory instead of rebuilding each tuning iteration from the original model path. -
📈 Small dataset fractions no longer discard all data (PR #26049)
Positive sampling fractions now retain at least one image, avoiding dataset-loading failures caused by rounding very small fractions down to zero. Explicit zero splits remain supported. -
⚡ Faster single-image preprocessing (PR #25989)
Single-frame NumPy inputs bypass an unnecessary stacking operation, improving preprocessing speed while retaining batched-input behavior. -
🧹 Updated documentation and package version
Inference and validation documentation now reflects the corrected model-state behavior, and the package version is bumped to 8.4.140.
🎯 Purpose & Impact
- ✅ Grayscale TIFF training jobs should run successfully instead of failing because of an image/model channel mismatch.
- 🛡️ Models are less likely to be unexpectedly altered by prediction, validation, calibration, export, or precision changes.
- 🏋️ Training and tuning become more faithful to the model the user actually loaded, including in-memory edits and custom weights.
- 🌐 Multi-GPU training is more consistent with single-GPU training, including support for custom callbacks and prepared model state.
- 📊 Small dataset experiments become more robust, especially when using fractional sampling.
- ⚡ Single-image inference receives a modest preprocessing speed improvement.
- 🔄 Users working with YOLO26, multispectral data, TIFF datasets, model export, or DDP training are likely to see the greatest benefits from this release.
What's Changed
- Keep the caller's depth model unfused across calibrate() and warn when pretrained weights are fused by @raimbekovm in #26045
- Keep a nonzero fraction from selecting zero images by @ahmet-f-gumustas in #26049
- Export a copy of the model before writing its head and names by @raimbekovm in #26052
- Seed tuning iterations from the model the caller loaded by @raimbekovm in #26053
- Hand DDP workers the module the parent trainer prepared by @raimbekovm in #26050
- Preserve loaded weights and checkpoint provenance for training by @raimbekovm in #26039
- Single frame special case by @jahsef in #25989
- Preserve inference model state and automatic DDP callbacks by @glenn-jocher in #26062
- Fix grayscale TIFF training channel mismatch by @glenn-jocher in #26061
Full Changelog: v8.4.139...v8.4.140